Add CI for api surface area review verification#6099
Merged
Conversation
1714777 to
bb5a4ce
Compare
a9ad817 to
d824400
Compare
joviegas
reviewed
May 14, 2025
| if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-api-surface-area-change') }} | ||
| run: | | ||
| git fetch origin ${{ github.base_ref }} --depth 1 | ||
| FILES=$( git diff remotes/origin/${{ github.base_ref }} --name-only | grep "\.java$" | grep -v -E "(^|/)(internal|test|codegen|v2-migration)/" || true) |
Contributor
There was a problem hiding this comment.
Nice CI action +1
I had below suggestions
- Would it be possible to narrow down the checks to only files containing SdkPublicInterface and SdkProtectedInterface annotations that way wee need not worry of skipping/adding the directories?
- Could we enhance the output to include the specific file names that failed the check?
- Would it be possible to add a tag to the PR using
github.rest.issues.addLabels? This way we can mark it as 'api-surface-area-review-required'
Contributor
Author
There was a problem hiding this comment.
- It's just more complexity and maintenance to inspect the exact diff for each file and may increase the check time. IMO we really shouldn't expand on
internal|test|codegen|v2-migrationsince this repo is already huge, so I'm not sure if the effort it worth it. - Yes, it is in the output.https://github.com/aws/aws-sdk-java-v2/pull/6099/files#diff-03e23d2b8990386383cd6d9efa82ad2dd53af6d72b4f33a6be1d0932442b71c1R21
- I actually thought about it and tried with the GH labeler action, I didn't go with that because it's a bit trickier to flag false positives since we want it to always automatically add
api-surface-area-review-required(it's not straightforward to tell it to not re-add the label for new revision if the label was removed previously) and having bothapi-surface-area-review-requiredandno-api-surface-area-changeis a bit confusing
joviegas
approved these changes
May 15, 2025
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Motivation and Context
Add CI for api surface area review verification. It detects protected/public api changes by checking the code and exclude files in "internal", "codegen" or "test" folders. If there is protected/public api change, it requires
no-api-surface-area-changeorapi-surface-area-approved-by-teamlabel to be added