Skip to content

Commit 48e897c

Browse files
committed
Release 3.1.0
1 parent 8e4b3ce commit 48e897c

File tree

33 files changed

+846
-83
lines changed

33 files changed

+846
-83
lines changed

.gitlab-ci.yml

+482
Large diffs are not rendered by default.

build.gradle.kts

+56-11
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ import com.moowork.gradle.node.task.NodeTask
44
import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
55
import org.gradle.api.tasks.testing.logging.TestLogEvent.*
66

7+
buildscript {
8+
repositories {
9+
if (gitLabCICD) {
10+
maven { url = uri("https://artifacts.ncei.noaa.gov/artifactory/gradle-plugins/") }
11+
}
12+
}
13+
extra.apply{ set("gitLabCICD", gitLabCICD) }
14+
}
15+
16+
717
plugins {
818
`kotlin-dsl`
919

@@ -52,7 +62,7 @@ plugins {
5262
// https://docs.spring.io/spring-boot/docs/current/gradle-plugin/reference/html/
5363
// - A Gradle plugin that allows you to package executable jar or war archives,
5464
// run Spring Boot applications, and use the dependency management provided by spring-boot-dependencies
55-
id("org.springframework.boot").version("2.7.9").apply(false)
65+
id("org.springframework.boot").version("2.7.12").apply(false)
5666

5767
// Gogradle plugin
5868
// https://github.com/gogradle/gogradle
@@ -61,9 +71,13 @@ plugins {
6171

6272
}
6373

64-
// resolve build dependencies from Bintray
6574
repositories {
66-
mavenCentral()
75+
if (gitLabCICD) {
76+
maven(url = uri("https://artifacts.ncei.noaa.gov/artifactory/gradle.mavencentral/"))
77+
maven(url = uri("https://artifacts.ncei.noaa.gov/artifactory/gradle-plugins/"))
78+
} else {
79+
mavenCentral()
80+
}
6781
}
6882

6983
subprojects {
@@ -138,11 +152,22 @@ dependencyCheck {
138152
}
139153

140154
allprojects {
141-
// resolve all subproject dependencies from these repos
155+
// resolve subproject dependencies through repos based on build environment
142156
repositories {
157+
if (gitLabCICD) {
158+
maven(url = "https://artifacts.ncei.noaa.gov/artifactory/spring-milestone/")
159+
maven(url = "https://artifacts.ncei.noaa.gov/artifactory/confluent-maven/")
160+
161+
maven(url = "https://artifacts.ncei.noaa.gov/artifactory/gradle.mavencentral/")
162+
maven(url = "https://artifacts.ncei.noaa.gov/artifactory/gradle-plugins/")
163+
} else {
143164
mavenCentral()
144-
maven(url= "https://repo.spring.io/milestone")
165+
maven(url = "https://repo.spring.io/milestone")
145166
maven(url = "https://packages.confluent.io/maven/")
167+
}
168+
// Switch based on artifactory access. Check logs during build to ensure jitpack isn't used on-prem.
169+
if (System.getenv("ARTIFACTORY_API_KEY") != null) {
170+
project.logger.lifecycle("Using NCEI Artifactory for dependency resolution")
146171
maven {
147172
name = "NCEI_MAVEN_PROD"
148173
url = uri("https://artifacts.ncei.noaa.gov/artifactory/ncei-maven/")
@@ -154,7 +179,10 @@ allprojects {
154179
create<HttpHeaderAuthentication>("header")
155180
}
156181
}
157-
182+
} else {
183+
project.logger.lifecycle("*** WARNING: using jitpack for dependency resolution. This is NOT allowed for NCEI on-prem builds ***")
184+
maven(url = "https://jitpack.io")
185+
}
158186
}
159187
}
160188

@@ -249,7 +277,14 @@ subprojects {
249277
// apply a common node/npm version to all projects using node
250278
configure<com.moowork.gradle.node.NodeExtension> {
251279
version = Versions.NODE
252-
npmVersion = Versions.NPM
280+
// pull the node dist from artifactory if in GitLab CI/CD
281+
if (gitLabCICD) {
282+
distBaseUrl = "https://artifacts.ncei.noaa.gov/artifactory/node-dist"
283+
// npmVersion is intentionally not set; use the one bundled with node
284+
// since we cannot set the url to artifactory for the npm dist
285+
} else {
286+
npmVersion = Versions.NPM
287+
}
253288
workDir = file("${rootProject.buildDir}/nodejs")
254289
npmWorkDir = file("${rootProject.buildDir}/npm")
255290
nodeModulesDir = file("${project.projectDir}")
@@ -305,6 +340,16 @@ subprojects {
305340
configurations.all {
306341
resolutionStrategy.eachDependency {
307342

343+
if (requested.group == "org.xerial.snappy" && requested.name == "snappy-java") {
344+
useVersion("1.1.10.1")
345+
because("override version since kafka-clients only use up to version 1.1.8.4")
346+
}
347+
348+
if (requested.group == "org.mozilla" && requested.name == "rhino") {
349+
useVersion("1.7.14")
350+
because("override version since json-schema-validator only uses up to version 1.7.7.2")
351+
}
352+
308353
if (requested.group == "com.github.everit-org.json-schema" && requested.name == "org.everit.json.schema") {
309354
useTarget("com.github.erosb:everit-json-schema:1.14.2")
310355
}
@@ -400,14 +445,14 @@ subprojects {
400445
}
401446
if (requested.group.startsWith("org.apache.tomcat") &&
402447
requested.name.contains("tomcat") &&
403-
requested.version!! < "9.0.68") {
404-
useVersion("9.0.68")
448+
requested.version!! < "9.0.75") {
449+
useVersion("9.0.75")
405450
because("Enforce tomcat 9.0.58+ to avoid vulnerabilities CVE-2022-23181\n" +
406451
"9.0.68+ to avoid CVE-2022-34305")
407452
}
408453
if (requested.group.startsWith("org.apache.tomcat.embed") &&
409-
requested.version!! < "9.0.58") {
410-
useVersion("9.0.58")
454+
requested.version!! < "9.0.75") {
455+
useVersion("9.0.75")
411456
because("Fixes CVE-2022-23181")
412457
}
413458
if (requested.group.startsWith("io.netty.incubator") &&

buildSrc/build.gradle.kts

+9-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,16 @@ plugins {
22
`kotlin-dsl`
33
}
44

5+
val gitLabCICD: Boolean = System.getProperty("gitLabCICD").toBoolean()
6+
57
repositories {
6-
mavenCentral()
7-
maven { url = uri("https://jcenter.bintray.com") }
8+
if (gitLabCICD) {
9+
maven { url = uri("https://artifacts.ncei.noaa.gov/artifactory/gradle-plugins/") }
10+
maven { url = uri("https://artifacts.ncei.noaa.gov/artifactory/gradle.mavencentral/") }
11+
} else {
12+
mavenCentral()
13+
maven { url = uri("https://jcenter.bintray.com") }
14+
}
815
}
916

1017
dependencies {

buildSrc/settings.gradle.kts

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
pluginManagement {
2+
repositories {
3+
if (System.getProperty("gitLabCICD").toBoolean()) {
4+
maven { url = uri("https://artifacts.ncei.noaa.gov/artifactory/gradle-plugins/") }
5+
maven { url = uri("https://artifacts.ncei.noaa.gov/artifactory/gradle.mavencentral/") }
6+
} else {
7+
// plugins resolved elsewhere?
8+
}
9+
}
10+
}

buildSrc/src/main/kotlin/utils.kt

+6-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ object Versions {
1818
// https://github.com/opencontainers/image-spec/blob/master/annotations.md#annotations
1919
const val LABEL_SCHEMA: String = "1.0"
2020

21-
const val NODE: String = "14.17.0"
21+
const val NODE: String = "16.19.1"
2222
const val NPM: String = "8.4.1"
2323

2424
const val ELASTIC: String = "7.17.9"
@@ -44,8 +44,13 @@ object Versions {
4444
const val JACKSON_CORE = "2.14.2" // A lot of other dependencies bring this in though.
4545

4646
const val ONESTOP_SCHEMAS: String = "0.7.6"
47+
48+
// From schemas subproject
49+
const val COMMONS_TEXT = "1.10.0"
4750
}
4851

52+
val gitLabCICD: Boolean = System.getProperty("gitLabCICD").toBoolean()
53+
4954
// data classes
5055
data class Author(
5156
val name: String,
@@ -59,9 +64,6 @@ fun environment(variable: String, default: String = ""): String {
5964
}
6065

6166

62-
63-
64-
6567
fun formatAuthors(authors: Collection<Author>, pretty: Boolean = false): String {
6668
// Your Name <[email protected]> (http://example.com)
6769
val multipleAuthors: Boolean = authors.size > 1

client/build.gradle.kts

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ task<com.moowork.gradle.node.npm.NpmTask>("formatCheck") {
77
}
88

99
task<com.moowork.gradle.node.npm.NpmTask>("retire") {
10-
setArgs(mutableListOf("run", "retire"))
10+
if (gitLabCICD) {
11+
setArgs(mutableListOf("run", "retireGitLabCICD"))
12+
} else {
13+
setArgs(mutableListOf("run", "retire"))
14+
}
1115
}
1216

1317
tasks.getByName("check") {

client/package-lock.json

+20-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@
1414
"build": "npm install && NODE_ENV=production ./node_modules/.bin/webpack --mode production",
1515
"clean": "rm -rf node_modules && rm -rf build && rm -rf coverage",
1616
"retire": "retire -p",
17+
"retireGitLabCICD": "retire -p --jsrepo https://artifacts.ncei.noaa.gov/artifactory/jsretire-repository/jsrepository.json --noderepo https://artifacts.ncei.noaa.gov/artifactory/jsretire-repository/npmrepository.json --cacert /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem",
1718
"dependencies": "npm list -depth=8",
1819
"auditFix": "npm audit fix --force",
19-
"audit": "npm audit --trace-deprecation"
20+
"audit": "npm audit --trace-deprecation",
21+
"updateBrowsers": "echo updating browsers;npx browserslist@latest --update-db"
2022
},
2123
"dependencies": {
2224
"@chakra-ui/react": "^1.8.3",

client/src/actions/routing/GranuleSearchRouteActions.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import _ from 'lodash'
2+
import Immutable from 'seamless-immutable'
23
import {fetchGranuleSearch} from './AsyncHelpers'
34
import {
45
assembleSearchRequest,
@@ -235,7 +236,11 @@ const granulesForCartPromise = (
235236

236237
// Ensure the filter page offset is 0, since we are grabbing as much as we can
237238
// from the beginning -- up to `maxCartAddition` in a single request.
238-
const filterStateModifiedForCartRequest = granuleFilter.set('pageOffset', 0)
239+
const filterStateModifiedForCartRequest = Immutable.set(
240+
granuleFilter,
241+
'pageOffset',
242+
0
243+
)
239244

240245
// generate the request body based on filters, and if we need facets or not
241246
const body = granuleBodyBuilder(

client/src/components/collections/detail/DescriptionView.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,11 @@ export default class DescriptionView extends React.Component {
214214
const xmlLink = (
215215
<a
216216
href={
217-
getApiRegistryPath() + '/metadata/collection/' + itemUuid + '/raw/xml'
217+
getApiRegistryPath() + '/metadata/collection/' + itemUuid + '/raw'
218218
}
219219
target={'_blank'}
220220
>
221-
Download full XML metadata here
221+
Download the full metadata here
222222
</a>
223223
)
224224

client/src/components/common/ui/Drawer.jsx

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
import React, {useRef, useState} from 'react'
2-
import {animated, useChain, useSpring, config} from 'react-spring'
2+
import {
3+
animated,
4+
useChain,
5+
useSpring,
6+
useTransition,
7+
config,
8+
} from 'react-spring'
39
import {useMeasure, usePrevious} from '../../../effects/CommonEffects'
410

511
export const DIRECTION_DOWN = 'down'
@@ -122,11 +128,7 @@ const Drawer = ({
122128
})
123129

124130
// chain animations and reverse the chain when drawer is closing
125-
useChain(
126-
drawer.open
127-
? [ {current: downRef.current}, {current: overRef.current} ]
128-
: [ {current: overRef.current}, {current: downRef.current} ]
129-
)
131+
useChain(drawer.open ? [ downRef, overRef ] : [ overRef, downRef ])
130132

131133
const styleContent = {
132134
overflow: 'hidden',

client/src/components/landing/TopicsMenu.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class TopicsMenu extends React.Component {
6262
]
6363
topics = topics.map((topic, i) => {
6464
return (
65-
<li>
65+
<li key={i}>
6666
<TopicsMenuButton key={i} topic={topic} onClick={this.search} />
6767
</li>
6868
)

client/src/components/results/granules/GranuleItem.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ export default function GranuleItem(props){
8989

9090
const xmlLink = (
9191
<a
92-
href={getApiRegistryPath() + '/metadata/granule/' + itemId + '/raw/xml'}
92+
href={getApiRegistryPath() + '/metadata/granule/' + itemId + '/raw'}
9393
target={'_blank'}
9494
>
95-
XML
95+
Download raw metadata
9696
</a>
9797
)
9898

data-common/src/main/java/org/cedar/onestop/data/api/JsonApiError.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public Builder setTitle(String title) {
120120
}
121121

122122
/**
123-
* A human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
123+
* A human-readable explanation specific to this occurrence of the problem. Like title, the value of this field can be localized.
124124
* @param detail String
125125
* @return
126126
*/
@@ -141,7 +141,7 @@ public Builder setMeta(JsonApiMeta meta) {
141141

142142
/**
143143
* An object containing references to the source of the error,
144-
* @param source ErrorSource An object containing references to the source of the error,
144+
* @param source ErrorSource An object containing references to the source of the error.
145145
* @return
146146
*/
147147
public Builder setSource(ErrorSource source) {

indexer/build.gradle

-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ import org.testcontainers.elasticsearch.ElasticsearchContainer
22
import org.testcontainers.utility.DockerImageName
33

44
buildscript {
5-
repositories {
6-
mavenCentral()
7-
}
85
dependencies {
96
classpath "org.testcontainers:elasticsearch:${Versions.TEST_CONTAINERS}"
107
classpath "org.testcontainers:kafka:${Versions.TEST_CONTAINERS}"

indexer/src/main/java/org/cedar/onestop/indexer/IndexerApp.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public IndexerApp(AppConfig appConfig) throws IOException {
4848
streamsProps = KafkaHelpers.buildStreamsConfig(appConfig);
4949
streamsApp = new KafkaStreams(streamsTopology, streamsProps);
5050
var maxFailures = appConfig.getOrDefault("streams.exception.max.failures", 2, Integer.class);
51-
var maxTimeInterval = appConfig.getOrDefault("streams.exception.max.time.millis", 3600000L, Long.class);
51+
var maxTimeInterval = appConfig.getOrDefault("streams.exception.max.time.millis", 3600000, Integer.class);
5252
exceptionHandler = new UncaughtExceptionHandler(maxFailures, maxTimeInterval);
5353
probeServer = new KafkaHealthProbeServer(streamsApp);
5454
}

kafka-common/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ dependencies {
2020

2121
// reactor release train BOM governs reactor dependency versions
2222
implementation(platform("io.projectreactor:reactor-bom:${Versions.REACTOR_BOM}"))
23-
implementation("io.projectreactor.netty:reactor-netty:1.0.28")
23+
implementation("io.projectreactor.netty:reactor-netty:1.0.33")
2424

2525
testImplementation("org.codehaus.groovy:groovy:${Versions.GROOVY}")
2626
testImplementation("org.spockframework:spock-core:${Versions.SPOCK}")
@@ -36,7 +36,7 @@ dependencies {
3636
testImplementation("io.confluent:kafka-schema-registry:${Versions.CONFLUENT}:tests")
3737
testImplementation("io.confluent:kafka-streams-avro-serde:${Versions.CONFLUENT}")
3838
testImplementation("com.github.everit-org.json-schema:org.everit.json.schema:1.9.2")
39-
testImplementation("org.json:json:20180813")
39+
testImplementation("org.json:json:20230227")
4040
}
4141

4242
jar {

0 commit comments

Comments
 (0)