Skip to content

Commit

Permalink
Merge branch 'main' into clone-cohort
Browse files Browse the repository at this point in the history
  • Loading branch information
dexamundsen committed Sep 13, 2024
2 parents d54f477 + 9442c99 commit be2ef12
Show file tree
Hide file tree
Showing 59 changed files with 1,575 additions and 347 deletions.
8 changes: 5 additions & 3 deletions annotationProcessor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {

// These plugins are needed to resolve versions of spring dependencies
// transitively added by terra-common-lib
id 'org.springframework.boot' version '3.3.1'
id 'org.springframework.boot' version '3.3.3'
id 'io.spring.dependency-management' version '1.1.5'
}

Expand Down Expand Up @@ -53,8 +53,10 @@ dependencies {
implementation project(path: ':service')

// explicity declare libs and version to address synk warnings
implementation 'org.springframework:spring-web:6.1.12'
testFixturesImplementation 'org.springframework:spring-web:6.1.12'
implementation "org.springframework:spring-web:${gradle.vSpringWeb}"
implementation "org.springframework:spring-webmvc:${gradle.vSpringWeb}"
testFixturesImplementation "org.springframework:spring-web:${gradle.vSpringWeb}"
testFixturesImplementation "org.springframework:spring-webmvc:${gradle.vSpringWeb}"

// Static analysis
pmd "net.sourceforge.pmd:pmd-ant:${gradle.vPmd}"
Expand Down
129 changes: 64 additions & 65 deletions annotationProcessor/gradle.lockfile

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ buildscript {
}

gradle.ext {
vSpringBoot = '3.3.1'
vSpringBoot = '3.3.3'
vSpringWeb = '6.1.13'
vPmd = '7.1.0'
vTerraCommonLib = '1.1.16-SNAPSHOT'
vApacheCommonsText = '1.12.0'
vSlf4jApi = '2.0.16'
vSpotBugs = '4.8.5'
vJackson = '2.17.1'
vJersey3 = '3.1.7' // Java 17 compatible
vJackson = '2.17.2'
vJersey = '3.1.8' // Java 17 compatible
vSwaggerAnnotations = '2.2.22'
vSwaggerCodegen = '3.0.57'
vPicocliVersion = '4.7.6'
Expand Down
10 changes: 5 additions & 5 deletions cli/gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
# This file is expected to be part of source control.
ch.qos.logback:logback-classic:1.5.6=compileClasspath,runtimeClasspath,testCompileClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
ch.qos.logback:logback-core:1.5.6=compileClasspath,runtimeClasspath,testCompileClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.fasterxml.jackson.core:jackson-annotations:2.17.1=compileClasspath,runtimeClasspath,testCompileClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.fasterxml.jackson.core:jackson-core:2.17.1=compileClasspath,runtimeClasspath,testCompileClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.fasterxml.jackson.core:jackson-databind:2.17.1=compileClasspath,runtimeClasspath,testCompileClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.1=compileClasspath,runtimeClasspath,testCompileClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.fasterxml.jackson:jackson-bom:2.17.1=compileClasspath,runtimeClasspath,testCompileClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.fasterxml.jackson.core:jackson-annotations:2.17.2=compileClasspath,runtimeClasspath,testCompileClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.fasterxml.jackson.core:jackson-core:2.17.2=compileClasspath,runtimeClasspath,testCompileClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.fasterxml.jackson.core:jackson-databind:2.17.2=compileClasspath,runtimeClasspath,testCompileClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.2=compileClasspath,runtimeClasspath,testCompileClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.fasterxml.jackson:jackson-bom:2.17.2=compileClasspath,runtimeClasspath,testCompileClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.github.oowekyala.ooxml:nice-xml-messages:3.1=pmd
com.github.spotbugs:spotbugs-annotations:4.8.5=compileClasspath,spotbugs,testCompileClasspath
com.github.spotbugs:spotbugs:4.8.5=spotbugs
Expand Down
10 changes: 5 additions & 5 deletions client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
id 'com.jfrog.artifactory' version '5.2.2'
id 'io.spring.dependency-management' version '1.1.5'
id 'org.hidetake.swagger.generator' version '2.19.2'
id 'org.springframework.boot' version '3.3.1'
id 'org.springframework.boot' version '3.3.3'
}

repositories {
Expand Down Expand Up @@ -53,10 +53,10 @@ dependencies {
implementation "com.fasterxml.jackson.core:jackson-core:${gradle.vJackson}"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${gradle.vJackson}"

implementation "org.glassfish.jersey.core:jersey-client:${gradle.vJersey3}"
implementation "org.glassfish.jersey.media:jersey-media-json-jackson:${gradle.vJersey3}"
implementation "org.glassfish.jersey.media:jersey-media-multipart:${gradle.vJersey3}"
implementation "org.glassfish.jersey.connectors:jersey-jdk-connector:${gradle.vJersey3}"
implementation "org.glassfish.jersey.core:jersey-client:${gradle.vJersey}"
implementation "org.glassfish.jersey.media:jersey-media-json-jackson:${gradle.vJersey}"
implementation "org.glassfish.jersey.media:jersey-media-multipart:${gradle.vJersey}"
implementation "org.glassfish.jersey.connectors:jersey-jdk-connector:${gradle.vJersey}"
}

bootJar {
Expand Down
7 changes: 7 additions & 0 deletions docs/generated/UNDERLAY_CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ When set to true, an indexing job will try to compute a display hint for this at

*Default value:* `false`

### SZAttribute.isDataTypeRepeated
**optional** boolean

True if the data type is repeated (e.g. an array of ints).

*Default value:* `false`

### SZAttribute.isSuppressedForExport
**optional** boolean

Expand Down
21 changes: 14 additions & 7 deletions indexer/gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@ ch.qos.logback:logback-classic:1.5.6=runtimeClasspath,testFixturesRuntimeClasspa
ch.qos.logback:logback-core:1.5.6=runtimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.charleskorn.kaml:kaml-jvm:0.60.0=runtimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.charleskorn.kaml:kaml:0.60.0=runtimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.fasterxml.jackson.core:jackson-annotations:2.17.1=compileClasspath,runtimeClasspath,testCompileClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.fasterxml.jackson.core:jackson-core:2.17.1=compileClasspath,runtimeClasspath,testCompileClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.fasterxml.jackson.core:jackson-databind:2.17.1=compileClasspath,runtimeClasspath,testCompileClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.17.1=compileClasspath,runtimeClasspath,testCompileClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.fasterxml.jackson.datatype:jackson-datatype-joda:2.17.1=compileClasspath,runtimeClasspath,testCompileClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.1=compileClasspath,runtimeClasspath,testCompileClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.fasterxml.jackson:jackson-bom:2.17.1=compileClasspath,runtimeClasspath,testCompileClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.fasterxml.jackson.core:jackson-annotations:2.17.1=compileClasspath,testCompileClasspath
com.fasterxml.jackson.core:jackson-annotations:2.17.2=runtimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.fasterxml.jackson.core:jackson-core:2.17.1=compileClasspath,testCompileClasspath
com.fasterxml.jackson.core:jackson-core:2.17.2=runtimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.fasterxml.jackson.core:jackson-databind:2.17.1=compileClasspath,testCompileClasspath
com.fasterxml.jackson.core:jackson-databind:2.17.2=runtimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.17.1=compileClasspath,testCompileClasspath
com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.17.2=runtimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.fasterxml.jackson.datatype:jackson-datatype-joda:2.17.1=compileClasspath,testCompileClasspath
com.fasterxml.jackson.datatype:jackson-datatype-joda:2.17.2=runtimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.1=compileClasspath,testCompileClasspath
com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.2=runtimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.fasterxml.jackson:jackson-bom:2.17.1=compileClasspath,testCompileClasspath
com.fasterxml.jackson:jackson-bom:2.17.2=runtimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.fasterxml:classmate:1.5.1=runtimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath
com.github.oowekyala.ooxml:nice-xml-messages:3.1=pmd
com.github.spotbugs:spotbugs-annotations:4.8.5=compileClasspath,spotbugs,testCompileClasspath
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ public void run(boolean isDryRun) {
Field.newBuilder(
columnSchema.getColumnName(),
BigQueryBeamUtils.fromDataType(columnSchema.getDataType()))
.setMode(
columnSchema.isDataTypeRepeated()
? Field.Mode.REPEATED
: Field.Mode.NULLABLE)
.build())
.collect(Collectors.toList());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,18 @@ public void run(boolean isDryRun) {
.collect(Collectors.joining(",", "[", "]")),
sourceQueryField.getType());
}

// Check that the schema repeated flags match those of the index table columns.
boolean sourceQueryFieldIsRepeated = sourceQueryField.getMode().equals(Field.Mode.REPEATED);
boolean isRepeatedFlagsMatch = attribute.isDataTypeRepeated() == sourceQueryFieldIsRepeated;
if (!isRepeatedFlagsMatch) {
foundError = true;
LOGGER.info(
"Data type repeated mismatch found for attribute {}: entity declared {}, SQL schema returns {}",
attribute.getName(),
attribute.isDataTypeRepeated(),
sourceQueryField.getMode());
}
}
if (foundError) {
throw new InvalidConfigException("Data type mismatch found for entity: " + entity.getName());
Expand Down
Loading

0 comments on commit be2ef12

Please sign in to comment.