Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yingjianw/revert #1205

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions .github/workflows/genie-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ jobs:
- name: Configure Genie temp folders
run: |
mkdir -p /tmp/genie/cache /tmp/genie/archives /tmp/genie/jobs
- name: Setup jdk 17
- name: Setup jdk 11
uses: actions/setup-java@v1
with:
java-version: 17
java-version: 11
- uses: actions/cache@v1
id: gradle-cache
with:
Expand Down Expand Up @@ -94,31 +94,27 @@ jobs:
github.event_name == 'pull_request' ||
((!startsWith(github.ref, 'refs/tags/v')) && github.ref != 'refs/heads/master' && github.ref != 'refs/heads/dev-snapshot')
run: |
./gradlew --stacktrace build codeCoverageReport coveralls
INTEGRATION_TEST_DB=mysql ./gradlew --stacktrace genie-web:integrationTest
INTEGRATION_TEST_DB=postgresql ./gradlew --stacktrace genie-web:integrationTest
./gradlew --stacktrace build -x test
./gradlew --stacktrace javadoc asciidoc dockerBuildAllImages
- name: Publish snapshot
if: |
(!startsWith(github.ref, 'refs/tags/v')) &&
github.event_name != 'pull_request' &&
github.ref == 'refs/heads/master'
run: ./gradlew build snapshot codeCoverageReport coveralls gitPublishPush dockerPush
run: ./gradlew build -x test snapshot gitPublishPush dockerPush
- name: Publish snapshot (dev-snapshot branch)
if: |
(!startsWith(github.ref, 'refs/tags/v')) &&
github.event_name != 'pull_request' &&
github.ref == 'refs/heads/dev-snapshot'
run: ./gradlew build snapshot dockerPush -x check
run: ./gradlew build -x test snapshot dockerPush -x check
- name: Publish candidate
if: |
startsWith(github.ref, 'refs/tags/v') &&
startsWith(github.ref, 'refs/tags/v')) &&
contains(github.ref, '-rc.')
run: ./gradlew --stacktrace -Prelease.useLastTag=true candidate codeCoverageReport coveralls gitPublishPush dockerPush
run: ./gradlew --stacktrace -Prelease.useLastTag=true candidate gitPublishPush dockerPush -x test
- name: Publish release
if: |
startsWith(github.ref, 'refs/tags/v') &&
startsWith(github.ref, 'refs/tags/v')) &&
(!contains(github.ref, '-rc.'))
run: ./gradlew --stacktrace -Prelease.useLastTag=true final codeCoverageReport coveralls gitPublishPush dockerPush
- name: Codecov
uses: codecov/codecov-action@v1
run: ./gradlew --stacktrace -Prelease.useLastTag=true final gitPublishPush dockerPush -x test
2 changes: 1 addition & 1 deletion .netflixoss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cloudbees_disabled=true
gitflow=true
environment_variables=GRADLE_OPTS=-Xmx512m
jdk=17
jdk=1.8

21 changes: 7 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ plugins {
id "com.google.protobuf" version "0.8.18" apply false
id "io.franzbecker.gradle-lombok" version "5.0.0" apply false
id "nebula.node" version "2.0.1" apply false
id "com.github.spotbugs" version "5.2.5" apply false
id "com.github.spotbugs" version "5.0.4" apply false
}

apply plugin: "nebula-aggregate-javadocs"
Expand All @@ -47,12 +47,12 @@ allprojects {

idea {
project {
jdkName = "17"
languageLevel = new IdeaLanguageLevel(JavaVersion.VERSION_17)
jdkName = "11"
languageLevel = new IdeaLanguageLevel(JavaVersion.VERSION_1_8)
vcs = "Git"
}
module {
languageLevel = new IdeaLanguageLevel(JavaVersion.VERSION_17)
languageLevel = new IdeaLanguageLevel(JavaVersion.VERSION_1_8)
downloadJavadoc true
downloadSources true
}
Expand All @@ -69,15 +69,11 @@ configure((Set<Project>) ext.javaProjects) {
apply plugin: "io.franzbecker.gradle-lombok"
apply plugin: "nebula.facet"

lombok {
version = '1.18.24'
}

group = (String) "com.netflix.${githubProjectName}"

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
languageVersion = JavaLanguageVersion.of(8)
}
}

Expand Down Expand Up @@ -107,7 +103,7 @@ configure((Set<Project>) ext.javaProjects) {
dependency("cglib:cglib-nodep:3.3.0")
dependency("com.github.fge:json-patch:1.9")
dependency("com.github.ppodgorsek:spring-test-dbunit-core:5.2.0")
dependency("com.github.spotbugs:spotbugs-annotations:4.8.2")
dependency("com.github.spotbugs:spotbugs-annotations:4.5.3")
dependencySet(group: "com.squareup.retrofit2", version: "2.9.0") {
entry "retrofit"
entry "converter-jackson"
Expand Down Expand Up @@ -166,8 +162,6 @@ configure((Set<Project>) ext.javaProjects) {
annotationProcessor("net.jcip:jcip-annotations")
annotationProcessor("com.github.spotbugs:spotbugs-annotations")

implementation("javax.annotation:javax.annotation-api:1.3.2")

/*******************************
* Compile Dependencies
*******************************/
Expand Down Expand Up @@ -281,8 +275,7 @@ configure((Set<Project>) ext.javaProjects) {
}

spotbugs {
toolVersion = "4.8.2"
ignoreFailures = true
toolVersion = "4.2.1"
excludeFilter = new File("$rootProject.projectDir/config/spotbugs/excludeFilter.xml")
}
spotbugsTest.enabled = false
Expand Down
4 changes: 2 additions & 2 deletions genie-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apply plugin: "org.springframework.boot"

idea {
module {
languageLevel = new IdeaLanguageLevel(JavaVersion.VERSION_17)
languageLevel = new IdeaLanguageLevel(JavaVersion.VERSION_11)
}
}

Expand All @@ -14,7 +14,7 @@ configurations {

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
languageVersion = JavaLanguageVersion.of(11)
}
}

Expand Down
4 changes: 2 additions & 2 deletions genie-swagger/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ apply plugin: "java-library"

idea {
module {
languageLevel = new IdeaLanguageLevel(JavaVersion.VERSION_17)
languageLevel = new IdeaLanguageLevel(JavaVersion.VERSION_11)
}
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
languageVersion = JavaLanguageVersion.of(11)
}
}

Expand Down
4 changes: 2 additions & 2 deletions genie-test-web/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ apply plugin: "java-library"

idea {
module {
languageLevel = new IdeaLanguageLevel(JavaVersion.VERSION_17)
languageLevel = new IdeaLanguageLevel(JavaVersion.VERSION_11)
}
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
languageVersion = JavaLanguageVersion.of(11)
}
}

Expand Down
4 changes: 2 additions & 2 deletions genie-ui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ apply plugin: "nebula.node"

idea {
module {
languageLevel = new IdeaLanguageLevel(JavaVersion.VERSION_17)
languageLevel = new IdeaLanguageLevel(JavaVersion.VERSION_11)
}
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
languageVersion = JavaLanguageVersion.of(11)
}
}

Expand Down
4 changes: 2 additions & 2 deletions genie-web/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ apply plugin: "org.asciidoctor.jvm.convert"

idea {
module {
languageLevel = new IdeaLanguageLevel(JavaVersion.VERSION_17)
languageLevel = new IdeaLanguageLevel(JavaVersion.VERSION_11)
}
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
languageVersion = JavaLanguageVersion.of(11)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void setUp() {
}

@ParameterizedTest(name = "Evaluate NOOP script: {0}")
@ValueSource(strings = {"noop.groovy"})
@ValueSource(strings = {"noop.js", "noop.groovy"})
void evaluateSuccessfully(
final String scriptFilename
) throws Exception {
Expand All @@ -112,7 +112,7 @@ void evaluateSuccessfully(
}

@ParameterizedTest(name = "Timeout evaluating {0}")
@ValueSource(strings = {"sleep.groovy"})
@ValueSource(strings = {"sleep.js", "sleep.groovy"})
void scriptEvaluationTimeoutTest(
final String scriptFilename
) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import spock.lang.Specification
import spock.lang.Timeout

import java.nio.charset.StandardCharsets
import java.util.concurrent.ThreadLocalRandom
import java.util.concurrent.TimeoutException

class StreamBufferSpec extends Specification {
Expand Down Expand Up @@ -253,7 +254,7 @@ class StreamBufferSpec extends Specification {
Thread writeThread = new Thread(new Runnable() {
@Override
void run() {
Random random = new Random(System.nanoTime())
ThreadLocalRandom random = new ThreadLocalRandom()
int offset = 0

while (offset < dataSize) {
Expand All @@ -276,7 +277,7 @@ class StreamBufferSpec extends Specification {
@Override
void run() {

Random random = new Random(System.nanoTime())
ThreadLocalRandom random = new ThreadLocalRandom()

int offset = 0
while (true) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.UUID;

/**
* Tests for the exception mapper.
Expand Down Expand Up @@ -164,10 +165,9 @@ void canHandleMethodArgumentNotValidExceptions() {
}.getClass().getEnclosingMethod();
final MethodParameter parameter = Mockito.mock(MethodParameter.class);
Mockito.when(parameter.getMethod()).thenReturn(method);
// Executable is a sealed class so can't mock it. Just use the current method.
final Executable executable = new Object() {
}.getClass().getEnclosingMethod();
final Executable executable = Mockito.mock(Executable.class);
Mockito.when(parameter.getExecutable()).thenReturn(executable);
Mockito.when(executable.toGenericString()).thenReturn(UUID.randomUUID().toString());

final BindingResult bindingResult = Mockito.mock(BindingResult.class);
Mockito.when(bindingResult.getAllErrors()).thenReturn(Lists.newArrayList());
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists