-
Notifications
You must be signed in to change notification settings - Fork 54
misc: refactor artifact size metrics & service check batch #1701
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: E2E tests | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
e2e-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Configure credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} | ||
aws-region: us-west-2 | ||
|
||
- name: Tests | ||
id: e2e-tests | ||
uses: aws-actions/aws-codebuild-run-build@v1 | ||
with: | ||
project-name: gh-aws-sdk-kotlin-e2e-tests | ||
source-version-override: ${{ github.ref }} | ||
|
||
- name: Cancel | ||
if: ${{ cancelled() }} | ||
env: | ||
BUILD_ID: ${{ steps.e2e-tests.outputs.aws-build-id }} | ||
run: | | ||
if [ ! -z "$BUILD_ID"]; then | ||
echo "Cancelling in-progress build: $BUILD_ID" | ||
aws codebuild stop-build --id $BUILD_ID | ||
fi | ||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Release metrics | ||
|
||
on: | ||
release: | ||
types: [ published ] | ||
|
||
jobs: | ||
build-sdk: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Configure credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} | ||
aws-region: us-west-2 | ||
|
||
- name: Build and upload metrics | ||
env: | ||
GITHUB_REPOSITORY: ${{ github.repository }} | ||
UPLOAD: 'true' | ||
RELEASE_METRICS: 'true' | ||
IDENTIFIER: 'null' # Only needed for pull requests | ||
uses: aws-actions/aws-codebuild-run-build@v1 | ||
with: | ||
project-name: aws-sdk-kotlin-service-build | ||
source-version-override: ${{ github.ref }} | ||
env-vars-for-codebuild: GITHUB_REPOSITORY, UPLOAD, RELEASE_METRICS, IDENTIFIER | ||
|
||
permissions: | ||
id-token: write | ||
contents: read |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Service CI | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-sdk: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Configure credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} | ||
aws-region: us-west-2 | ||
|
||
- name: Build and upload metrics | ||
id: build | ||
env: | ||
GITHUB_REPOSITORY: ${{ github.repository }} | ||
UPLOAD: 'true' | ||
RELEASE_METRICS: 'false' | ||
IDENTIFIER: ${{ github.ref_name }} | ||
uses: aws-actions/aws-codebuild-run-build@v1 | ||
with: | ||
project-name: aws-sdk-kotlin-service-build | ||
source-version-override: ${{ github.ref }} | ||
env-vars-for-codebuild: GITHUB_REPOSITORY, UPLOAD, RELEASE_METRICS, IDENTIFIER | ||
|
||
- name: Process metrics | ||
uses: awslabs/aws-kotlin-repo-tools/.github/actions/artifact-size-metrics/download-and-process@asm-v2 # TODO: Change to main before merging | ||
with: | ||
download: 'true' | ||
|
||
- name: Cancel | ||
if: ${{ cancelled() }} | ||
env: | ||
BUILD_ID: ${{ steps.build.outputs.aws-build-id }} | ||
run: | | ||
if [ ! -z "$BUILD_ID"]; then | ||
echo "Cancelling in-progress build: id=$BUILD_ID" | ||
aws codebuild stop-build --id $BUILD_ID | ||
fi | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
pull-requests: write | ||
id-token: write | ||
contents: read | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,14 +34,6 @@ plugins { | |
// ensure the correct version of KGP ends up on our buildscript classpath | ||
id(libs.plugins.kotlin.multiplatform.get().pluginId) apply false | ||
id(libs.plugins.kotlin.jvm.get().pluginId) apply false | ||
alias(libs.plugins.aws.kotlin.repo.tools.artifactsizemetrics) | ||
} | ||
|
||
artifactSizeMetrics { | ||
artifactPrefixes = setOf(":services", ":aws-runtime") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How are we filtering the artifact size computation to only these projects now? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We're not filtering for artifacts from those two projects anymore. Now we're filtering for artifacts that are configured for publishing to Maven. Our updated codebuild service check job does this by running It should be better because we won't have to maintain hard coded lists anymore like this one. We never updated this to include hll's. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok right, that sounds great |
||
closurePrefixes = setOf(":services") | ||
significantChangeThresholdPercentage = 5.0 | ||
projectRepositoryName = "aws-sdk-kotlin" | ||
} | ||
|
||
val testJavaVersion = typedProp<String>("test.java.version")?.let { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: these typically go at the top of the file