Skip to content

Conversation

@0marperez
Copy link
Contributor

Issue #

Description of changes

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@0marperez 0marperez added the no-changelog Indicates that a changelog entry isn't required for a pull request. Use sparingly. label Apr 3, 2025
@0marperez 0marperez marked this pull request as ready for review April 3, 2025 21:49
@0marperez 0marperez requested a review from a team as a code owner April 3, 2025 21:49
@github-actions
Copy link

github-actions bot commented Apr 3, 2025

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK

@github-actions

This comment has been minimized.

on:
pull_request:
branches: [ main ]
workflow_dispatch:
Copy link
Member

@lauzadis lauzadis Apr 4, 2025

Choose a reason for hiding this comment

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

question: What is the workflow_dispatch needed for?

Copy link
Contributor

Choose a reason for hiding this comment

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

It allows the workflow to be triggered manually. I don't know if we'll necessarily need to but seems fine to me.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, that's where I was leading with the question. I don't think we'll ever need to trigger this workflow manually, so we could simplify this a little by removing it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, we can remove it and if we ever need to run it manually we can add the workflow_dispatch back

on:
pull_request:
branches: [ main ]
workflow_dispatch:
Copy link
Contributor

Choose a reason for hiding this comment

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

It allows the workflow to be triggered manually. I don't know if we'll necessarily need to but seems fine to me.

Comment on lines 21 to 30
- name: Configure error message
run: echo "ERROR_MESSAGE=WARNING smithy-kotlin release and version bump might be required before merging!" >> $GITHUB_ENV

- name: Build SDK
run: ./gradlew test jvmTest || echo $ERROR_MESSAGE

- name: Build SDK client
run: |
./gradlew -Paws.services=s3 -Paws.kotlin.native=false bootstrap || echo $ERROR_MESSAGE
./gradlew build || echo $ERROR_MESSAGE No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

Question: How does this work in the failure case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the command exits with a non-zero exit code then we'll echo the message at the end of the output

Copy link
Member

Choose a reason for hiding this comment

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

But echo returns a zero exit code, so does the CI properly report a failed status?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I see what you mean, it wouldn't. Fixed

@github-actions
Copy link

github-actions bot commented Apr 4, 2025

A new generated diff is ready to view.

@github-actions
Copy link

github-actions bot commented Apr 4, 2025

A new generated diff is ready to view.

@github-actions
Copy link

github-actions bot commented Apr 4, 2025

A new generated diff is ready to view.

@github-actions

This comment has been minimized.

Comment on lines 20 to 29
- name: Configure error message
run: echo "ERROR_MESSAGE=WARNING smithy-kotlin release and version bump might be required before merging" >> $GITHUB_ENV

- name: Build SDK
run: ./gradlew test jvmTest || { echo "$ERROR_MESSAGE"; exit 1; }

- name: Build SDK client
run: |
./gradlew -Paws.services=s3 -Paws.kotlin.native=false bootstrap || { echo "$ERROR_MESSAGE"; exit 1; }
./gradlew -Paws.kotlin.native=false build || { echo "$ERROR_MESSAGE"; exit 1; }
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I think this is still more complicated than it needs to be. A step can be configured to run on failure so that a GitHub-standard error message can be emitted:

jobs:
  release-readiness:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@v4

      - name: Configure Gradle
        uses: awslabs/aws-kotlin-repo-tools/.github/actions/configure-gradle@main

      - name: Build SDK
        run: ./gradlew test jvmTest

      - name: Build SDK client
        run: |
          ./gradlew -Paws.services=s3 -Paws.kotlin.native=false bootstrap
          ./gradlew -Paws.kotlin.native=false build

      - name: Emit error message
        if: ${{ failure() }}
        run: |
          echo "::error ::Build failed. Did you forget to release smithy-kotlin and bump the dependency version?"
          exit 1

@github-actions
Copy link

github-actions bot commented Apr 7, 2025

A new generated diff is ready to view.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 7, 2025

@github-actions
Copy link

github-actions bot commented Apr 7, 2025

A new generated diff is ready to view.

@github-actions
Copy link

github-actions bot commented Apr 7, 2025

Affected Artifacts

No artifacts changed size

@0marperez 0marperez merged commit eb315dc into main Apr 16, 2025
20 checks passed
@0marperez 0marperez deleted the release-readiness branch April 16, 2025 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Indicates that a changelog entry isn't required for a pull request. Use sparingly.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants