-
Notifications
You must be signed in to change notification settings - Fork 910
Add CI for api surface area review verification #6099
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
Conversation
1714777
to
bb5a4ce
Compare
a9ad817
to
d824400
Compare
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) |
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.
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'
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.
- 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-migration
since 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-required
andno-api-surface-area-change
is a bit confusing
|
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-change
orapi-surface-area-approved-by-team
label to be added