diff --git a/.github/dependabot.yml b/.github/dependabot.yml index bd18e57b42..3d37e049d1 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -46,7 +46,7 @@ updates: versions: ["3.x"] # Spring Cloud dependencies - dependency-name: "org.springframework.cloud:spring-cloud-dependencies" - versions: ["2022.x"] + versions: ["2022.x", "2023.x"] - dependency-name: "org.springframework.cloud:spring-cloud-config" versions: ["4.x"] - dependency-name: "org.springframework.cloud:spring-cloud-function" @@ -59,3 +59,38 @@ updates: versions: ["3.x"] # Spring Native dependencies: # Will be superseded by Spring Boot 3 official native support + +- package-ecosystem: maven + directory: "/" + schedule: + interval: daily + commit-message: + # Prefix all commit messages with "deps: " + prefix: "deps" + open-pull-requests-limit: 10 + target-branch: "4.x" + labels: + - "4.x dependencies" + ignore: + # Ignore major version updates - these should be made manually + - dependency-name: "*" + update-types: [ "version-update:semver-major" ] + # Ignore formatter dependency versions used in codegen modules, since they are fixed for Java 8 support + - dependency-name: "com.coveo:fmt-maven-plugin" + - dependency-name: "com.google.googlejavaformat:google-java-format" + # Ignore dependencies corresponding to Spring Boot 3.2+, Spring Cloud 2023.x: + # Spring Boot dependencies + - dependency-name: "org.springframework.boot:spring-boot-dependencies" + versions: [">=3.2.0"] + - dependency-name: "org.springframework.boot:spring-boot-starter-parent" + versions: [">=3.2.0"] + # Spring Cloud dependencies + - dependency-name: "org.springframework.cloud:spring-cloud-dependencies" + versions: ["2023.x"] + - dependency-name: "org.springframework.cloud:spring-cloud-config" + versions: [">=4.1.0"] + - dependency-name: "org.springframework.cloud:spring-cloud-function" + versions: [">=4.1.0"] + # Spring Shell dependencies + - dependency-name: "org.springframework.shell:spring-shell-starter" + versions: [">=3.2.0"] diff --git a/.github/release-please.yml b/.github/release-please.yml index 499e4f63c9..34e379fae9 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -10,3 +10,7 @@ branches: handleGHRelease: true branch: 3.x extraFiles: ["README.adoc"] + - releaseType: java-yoshi + handleGHRelease: true + branch: 4.x + extraFiles: ["README.adoc"] diff --git a/.github/workflows/NativeTests.yaml b/.github/workflows/NativeTests.yaml index 4c87f5a2f0..00650d7207 100644 --- a/.github/workflows/NativeTests.yaml +++ b/.github/workflows/NativeTests.yaml @@ -25,98 +25,31 @@ jobs: fail-fast: false matrix: it: + - bigquery-sample - core - - vision - - storage - - secretmanager - - logging-sample - - storage-sample - - trace-sample - - vision-sample - - pubsub-sample - - secretmanager-sample - - pubsub-integration-sample - - pubsub-bus-sample - - pubsub-stream-sample + - data-firestore + - data-firestore-sample - datastore - - starter-firestore-sample + - datastore-basic-sample - kms - kms-sample - - bigquery-sample + - logging-sample - metrics-sample - steps: - - name: Get current date - id: date - run: echo "date=$(date +'%Y-%m-%d' --utc)" >> $GITHUB_OUTPUT - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - java-version: 17 - distribution: 'temurin' - - name: Set Up Authentication - uses: google-github-actions/auth@v1 - with: - credentials_json: ${{ secrets.SPRING_CLOUD_GCP_CI_NATIVE_SA_KEY }} - - name: Setup gcloud - uses: google-github-actions/setup-gcloud@v1 - with: - project_id: spring-cloud-gcp-ci-native - - name: Mvn install # Need this when the directory/pom structure changes - id: install - run: | - ./mvnw \ - --batch-mode \ - --no-transfer-progress \ - --threads 1.5C \ - --define maven.test.skip=true \ - --define maven.javadoc.skip=true \ - install - # Unlike for the other NativeTests job, we don't block here as these run in parallel. - - uses: graalvm/setup-graalvm@v1 - with: - version: '22.3.2' - java-version: '17' - components: 'native-image' - github-token: ${{ secrets.GITHUB_TOKEN }} - native-image-job-reports: 'true' - - name: Native Tests in Modules - id: intTest - run: | - MODULE_UNDER_TEST="${{ matrix.it }}" ./.github/workflows/scripts/native-image-tests.sh - - name: Aggregate Report - run: | - ./mvnw \ - --batch-mode \ - --no-transfer-progress \ - --define aggregate=true \ - --activate-profiles spring-native,\!default \ - surefire-report:report-only - - name: Archive logs - if: always() - continue-on-error: true - uses: actions/upload-artifact@v3 - with: - name: Native Test Logs - path: | - **/target/failsafe-reports/* - **/target/site - - NativeTests: - if: | - github.actor != 'dependabot[bot]' && (( - github.event_name == 'pull_request' && github.repository == github.event.pull_request.head.repo.full_name - ) || (github.event_name != 'pull_request')) - runs-on: ubuntu-20.04 - strategy: - fail-fast: false - matrix: - it: + - pubsub-sample + - pubsub-bus-sample + - pubsub-integration-sample + - pubsub-stream-sample + - secretmanager + - secretmanager-sample - spanner - - datastore-basic-sample - - data-firestore-sample - - data-firestore - sql-mysql-sample - sql-postgres-sample + - starter-firestore-sample + - storage + - storage-sample + - trace-sample + - vision + - vision-sample steps: - name: Get current date id: date @@ -144,13 +77,6 @@ jobs: --define maven.test.skip=true \ --define maven.javadoc.skip=true \ install - - name: Wait our turn for running native tests - uses: softprops/turnstyle@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - continue-after-seconds: 3600 # 60 min - same-branch-only: false - uses: graalvm/setup-graalvm@v1 with: version: '22.3.2' @@ -160,10 +86,9 @@ jobs: native-image-job-reports: 'true' - name: Native Tests in Modules id: intTest - run: | - MODULE_UNDER_TEST="${{ matrix.it }}" ./.github/workflows/scripts/native-image-tests.sh env: DB_PASSWORD: ${{ secrets.SPRING_CLOUD_GCP_CI_NATIVE_DB_ROOT_PASSWORD }} + run: MODULE_UNDER_TEST="${{ matrix.it }}" ./.github/workflows/scripts/native-image-tests.sh - name: Aggregate Report run: | ./mvnw \ diff --git a/.github/workflows/integrationTests.yaml b/.github/workflows/integrationTests.yaml index 51e5322416..d4e51c15c2 100644 --- a/.github/workflows/integrationTests.yaml +++ b/.github/workflows/integrationTests.yaml @@ -5,6 +5,7 @@ on: branches: - main - 3.x + - 4.x pull_request: types: [opened, synchronize, reopened] paths-ignore: @@ -68,6 +69,8 @@ jobs: --threads 1.5C \ --define maven.test.skip=true \ --define maven.javadoc.skip=true \ + --define org.slf4j.simpleLogger.showDateTime=true \ + --define org.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS \ install # Unlike for the other integrationTest job, we don't block here as these run in parallel. - name: Integration Tests @@ -79,6 +82,8 @@ jobs: --activate-profiles spring-cloud-gcp-ci-it \ --define maven.javadoc.skip=true \ --define skip.surefire.tests=true \ + --define org.slf4j.simpleLogger.showDateTime=true \ + --define org.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS \ --define "spring.datasource.password=${DB_PASSWORD}" \ --define "spring.r2dbc.password=${DB_PASSWORD}" \ --define it.${{ matrix.it }}=true \ @@ -151,6 +156,8 @@ jobs: --threads 1.5C \ --define maven.test.skip=true \ --define maven.javadoc.skip=true \ + --define org.slf4j.simpleLogger.showDateTime=true \ + --define org.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS \ install - name: Wait our turn for running integration tests uses: softprops/turnstyle@v1 @@ -168,6 +175,8 @@ jobs: --activate-profiles spring-cloud-gcp-ci-it \ --define maven.javadoc.skip=true \ --define skip.surefire.tests=true \ + --define org.slf4j.simpleLogger.showDateTime=true \ + --define org.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS \ --define "spring.datasource.password=${DB_PASSWORD}" \ --define "spring.r2dbc.password=${DB_PASSWORD}" \ --define it.${{ matrix.it }}=true \ diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index 1be1f713fb..6ae8dcce3d 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -16,5 +16,5 @@ jobs: - name: Run Renovate uses: renovatebot/forking-renovate@main with: - baseBranches: main,3.x + baseBranches: main,3.x,4.x createPullRequests: true \ No newline at end of file diff --git a/.github/workflows/scripts/native-image-tests.sh b/.github/workflows/scripts/native-image-tests.sh index 4260867a99..9de8860052 100755 --- a/.github/workflows/scripts/native-image-tests.sh +++ b/.github/workflows/scripts/native-image-tests.sh @@ -52,15 +52,36 @@ run_sample_tests () { fi done pushd spring-cloud-gcp-pubsub-stream-functional-sample/spring-cloud-gcp-pubsub-stream-functional-sample-test - mvn package -Pnative -Pnative-sample-config -DskipTests - mvn -Pnative-sample-config -PnativeTest --define notAllModules=true --define maven.javadoc.skip=true test + mvn package \ + -Pnative -Pnative-sample-config \ + --define skipTests \ + --define org.slf4j.simpleLogger.showDateTime=true \ + --define org.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS + mvn test \ + -Pnative-sample-config -PnativeTest \ + --define notAllModules=true \ + --define maven.javadoc.skip=true \ + --define org.slf4j.simpleLogger.showDateTime=true \ + --define org.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS popd filtered_project_names="$(echo "${filtered_modules[@]}" | sed 's/ /,/g')" - mvn clean --activate-profiles native-sample-config,nativeTest --define notAllModules=true --define maven.javadoc.skip=true -pl="${filtered_project_names}" test + mvn clean test \ + --activate-profiles native-sample-config,nativeTest \ + --define notAllModules=true \ + --define maven.javadoc.skip=true \ + -pl="${filtered_project_names}" \ + --define org.slf4j.simpleLogger.showDateTime=true \ + --define org.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS else project_names="$(echo "${module_samples[@]}" | sed 's/ /,/g')" - mvn clean --activate-profiles native-sample-config,nativeTest --define notAllModules=true --define maven.javadoc.skip=true -pl="${project_names}" test + mvn clean test \ + --activate-profiles native-sample-config,nativeTest \ + --define notAllModules=true \ + --define maven.javadoc.skip=true \ + -pl="${project_names}" \ + --define org.slf4j.simpleLogger.showDateTime=true \ + --define org.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS fi popd } @@ -74,7 +95,11 @@ run_module_tests() { fi done project_names="$(echo "${module_samples[@]}" | sed 's/ /,/g')" - mvn clean verify -Pspring-native,!default -pl="${project_names}" + mvn clean verify \ + -Pspring-native,!default \ + -pl="${project_names}" \ + --define org.slf4j.simpleLogger.showDateTime=true \ + --define org.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS } diff --git a/.github/workflows/sonar.yaml b/.github/workflows/sonar.yaml index dc51a26556..aec1d36d8b 100644 --- a/.github/workflows/sonar.yaml +++ b/.github/workflows/sonar.yaml @@ -3,7 +3,6 @@ on: push: branches: - main - - 3.x pull_request: types: [opened, synchronize, reopened] workflow_dispatch: diff --git a/.github/workflows/unitTests.yaml b/.github/workflows/unitTests.yaml index f39ce7f3ff..8f2fe6d1ea 100644 --- a/.github/workflows/unitTests.yaml +++ b/.github/workflows/unitTests.yaml @@ -5,6 +5,7 @@ on: branches: - main - 3.x + - 4.x pull_request: workflow_dispatch: schedule: