-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
[SDK Suppressions labels] Add new action to update suppressions labels #31878
base: main
Are you sure you want to change the base?
Conversation
Next Steps to MergeNext steps that must be taken to merge this PR:
|
PR validation pipeline restarted successfully. If there is ApiView generated, it will be updated in this comment. |
1401313
to
ec018c2
Compare
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.
Address review feedback
6cb5e49
to
5b11a33
Compare
@mikeharder could you review again? |
62f6013
to
be7b892
Compare
|
||
- uses: ./.github/actions/add-label-artifact | ||
name: Upload artifact with results-go | ||
if: ${{ steps.run-suppressions-script.outputs.BreakingChange-Go-Sdk-Suppression }} |
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.
I think you want to set the label in either case, both true and false correct? Both are needed to ensure labels are removed when they no longer apply.
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.
yes, true to add and false to remove
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.
But doesn't the if
condition on line 76 mean you only call add-label-artifact
when the condition is 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.
I understand the reason for your confusion. For instance, on line 75, the step output value is 'true' or 'false', which is not a proper boolean. It's a string. Therefore, writing if 'false'
will still execute. And this is my test case JackTn#17 , can you see it?
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.
Why do you need the if
condition at all? Do you need a tri-state value ("true"
, "false"
, and undefined
), where undefined
means neither add nor remove the label
)? If so, I recommend changing the code to be more clear.
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.
The status value should have only two cases: value exists (either true
or false
) or undefined. If the value exists, it indicates execution, where labels are added or removed based on true
or false
. If it is undefined, no operation is performed.
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.
The purpose of using an if condition is to determine whether this step needs to be executed.
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.
@JackTn , can you add comment inline to explain this behavior for better readability?
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.
added
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.
Change dependency, and verify if label artifacts should be generate for both true and false.
add new action to update sdk-suppression label
Overview :
Add sdk-suppressions file to process sdk breaking change
Changes: