Skip to content

feat(build): remove java 8 support in v2 #1589

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

Closed
wants to merge 1 commit into from
Closed
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
9 changes: 3 additions & 6 deletions .github/workflows/pr_build.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
name: Build
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be merged into main

name: Build v1

on:
pull_request:
branches:
- main
- v2
paths:
- 'powertools-batch/**'
- 'powertools-cloudformation/**'
- 'powertools-core/**' # not in v2
- 'powertools-common/**' # v2 only
- 'powertools-core/**'
- 'powertools-e2e-tests/**'
- 'powertools-idempotency/**'
- 'powertools-large-messages/**'
Expand All @@ -26,7 +24,6 @@ on:
push:
branches:
- main
- v2
paths:
- 'powertools-batch/**'
- 'powertools-cloudformation/**'
Expand All @@ -48,7 +45,7 @@ jobs:
build-corretto:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
max-parallel: 4
matrix:
java: [8, 11, 17, 21]
name: Java ${{ matrix.java }}
Expand Down
93 changes: 93 additions & 0 deletions .github/workflows/pr_build_v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Build v2

on:
pull_request:
branches:
- v2
paths:
- 'powertools-batch/**'
- 'powertools-cloudformation/**'
- 'powertools-common/**'
- 'powertools-e2e-tests/**'
- 'powertools-idempotency/**'
- 'powertools-large-messages/**'
- 'powertools-logging/**'
- 'powertools-metrics/**'
- 'powertools-parameters/**'
- 'powertools-serialization/**'
- 'powertools-tracing/**'
- 'powertools-validation/**'
- 'examples/**'
- 'pom.xml'
- 'examples/pom.xml'
- '.github/workflows/**'
push:
branches:
- v2
paths:
- 'powertools-batch/**'
- 'powertools-cloudformation/**'
- 'powertools-common/**'
- 'powertools-e2e-tests/**'
- 'powertools-idempotency/**'
- 'powertools-large-messages/**'
- 'powertools-metrics/**'
- 'powertools-parameters/**'
- 'powertools-serialization/**'
- 'powertools-sqs/**'
- 'powertools-tracing/**'
- 'powertools-validation/**'
- 'examples/**'
- 'pom.xml'
- 'examples/pom.xml'
- '.github/workflows/**'
jobs:
build-corretto:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
java: [11, 17, 21]
name: Java ${{ matrix.java }}
env:
JAVA: ${{ matrix.java }}
AWS_REGION: eu-west-1
permissions:
id-token: write # needed to interact with GitHub's OIDC Token endpoint.
contents: read
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Setup java
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
with:
distribution: 'corretto'
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Build with Maven
run: mvn -B install --file pom.xml
- name: Build Gradle Example - Java
working-directory: examples/powertools-examples-core-utilities/gradle
run: ./gradlew build
- name: Build Gradle Example - Kotlin
working-directory: examples/powertools-examples-core-utilities/kotlin
run: ./gradlew build
- name: Upload coverage to Codecov
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1
if: ${{ matrix.java == '11' }} # publish results once
with:
files: ./powertools-cloudformation/target/site/jacoco/jacoco.xml,./powertools-core/target/site/jacoco/jacoco.xml,./powertools-idempotency/target/site/jacoco/jacoco.xml,./powertools-logging/target/site/jacoco/jacoco.xml,./powertools-metrics/target/site/jacoco/jacoco.xml,./powertools-parameters/target/site/jacoco/jacoco.xml,./powertools-serialization/target/site/jacoco/jacoco.xml,./powertools-sqs/target/site/jacoco/jacoco.xml,./powertools-tracing/target/site/jacoco/jacoco.xml,./powertools-validation/target/site/jacoco/jacoco.xml,./powertools-large-messages/target/site/jacoco/jacoco.xml,./powertools-batch/target/site/jacoco/jacoco.xml
savepr:
runs-on: ubuntu-latest
name: Save PR number if running on PR by dependabot
if: github.actor == 'dependabot[bot]'
steps:
- name: Create Directory and save issue
run: |
mkdir -p ./pr
echo ${{ github.event.number }}
echo ${{ github.event.number }} > ./pr/NR
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
name: Upload artifact
with:
name: pr
path: pr/
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
with:
distribution: 'corretto'
java-version: 8
java-version: 11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're changing this so that when we eventually merge v2 into main, we change the publish JVM, right? Said otherwise - we don't want to merge this change into main too until then (unlike pr_build.yaml).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is the case, do we also need to change pr_build etc as well, so that when we merge v2 into main , it ends up setup correctly?

server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/run-e2e-tests-v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Run end-to-end tests on v2

on:
workflow_dispatch:

push:
branches:
- v2
paths: # add other modules when there are under e2e tests
- 'powertools-e2e-tests/**'
- 'powertools-batch/**'
- 'powertools-core/**'
- 'powertools-common/**'
- 'powertools-idempotency/**'
- 'powertools-large-message/**'
- 'powertools-logging/**'
- 'powertools-metrics/**'
- 'powertools-parameters/**'
- 'powertools-serialization/**'
- 'powertools-tracing/**'
- 'pom.xml'
- '.github/workflows/**'

pull_request:
branches:
- v2
paths:
- 'powertools-e2e-tests/**'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come you've removed all the paths here on PR?


jobs:
e2e:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
java: [ 11, 17, 21 ]
name: End-to-end tests java${{ matrix.java }}
env:
AWS_DEFAULT_REGION: eu-west-1
JAVA_VERSION: ${{ matrix.java }}
permissions:
id-token: write # needed to interact with GitHub's OIDC Token endpoint.
contents: read
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Setup java
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
with:
distribution: 'corretto'
java-version: ${{ matrix.java }}
cache: maven
- name: Setup AWS credentials
uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # v2.2.0
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN_TO_ASSUME }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: Build with Maven
run: mvn -DskipTests install --file pom.xml
- name: Run e2e test with Maven
run: mvn -Pe2e -B verify --file powertools-e2e-tests/pom.xml
2 changes: 0 additions & 2 deletions .github/workflows/run-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
push:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one needs to be merged into main too

branches:
- main
- v2
paths: # add other modules when there are under e2e tests
- 'powertools-e2e-tests/**'
- 'powertools-batch/**'
Expand All @@ -25,7 +24,6 @@ on:
pull_request:
branches:
- main
- v2
paths:
- 'powertools-e2e-tests/**'

Expand Down