Skip to content
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

CI: Fix GHA failure notification trigger condition #4810

Merged

Conversation

michaeldiamant
Copy link
Contributor

Amends the trigger condition for Github Action (GHA) failure notification so that it only reaches out when the branch being built matches master or a release branch.

From the docs in https://docs.github.com/en/actions/learn-github-actions/contexts:

Property name Type Description
github.base_ref string The base_ref or target branch of the pull request in a workflow run. This property is only available when the event that triggers a workflow run is either pull_request or pull_request_target.
github.ref_name string The short ref name of the branch or tag that triggered the workflow run. This value matches the branch or tag name shown on GitHub. For example, feature-branch-1.

Details:

@michaeldiamant michaeldiamant changed the title Fix GHA failure notification trigger condition CI: Fix GHA failure notification trigger condition Nov 17, 2022
@michaeldiamant michaeldiamant marked this pull request as draft November 17, 2022 14:49
@michaeldiamant michaeldiamant marked this pull request as ready for review November 17, 2022 14:49
@codecov
Copy link

codecov bot commented Nov 17, 2022

Codecov Report

Merging #4810 (07f00a6) into master (bffd703) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4810      +/-   ##
==========================================
- Coverage   54.67%   54.66%   -0.01%     
==========================================
  Files         414      414              
  Lines       53550    53550              
==========================================
- Hits        29279    29275       -4     
- Misses      21843    21847       +4     
  Partials     2428     2428              
Impacted Files Coverage Δ
ledger/roundlru.go 90.56% <0.00%> (-5.67%) ⬇️
network/wsPeer.go 66.50% <0.00%> (-1.95%) ⬇️
ledger/testing/randomAccounts.go 56.61% <0.00%> (+0.61%) ⬆️
ledger/blockqueue.go 88.50% <0.00%> (+2.87%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@algojack algojack requested review from a team, excalq, algobarb and algolucky November 17, 2022 21:18
@algojack
Copy link
Contributor

algojack commented Nov 17, 2022

@michaeldiamant can we clarify here are we trying to have notifications for

  1. PRs that target(base) master/rel* branches or
  2. the builds that happen after merging

I think with this PR we are switching from 1 to 2. Please correct me if i misunderstand the description.

@algolucky algolucky self-requested a review November 17, 2022 21:34
@michaeldiamant
Copy link
Contributor Author

I think with this PR we are switching from 1 to 2.

@algojack Correct. That's what I had intended to do in #4791.

@algojack
Copy link
Contributor

Seems like this is intentional. so LGTM.

Copy link
Contributor

@algobarb algobarb left a comment

Choose a reason for hiding this comment

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

I think this change is correct to change from base_ref to ref_name.

It might be a separate discussion on whether we only want to notify on failures for these particular branches.

@algobarb algobarb self-requested a review November 18, 2022 16:29
@michaeldiamant michaeldiamant merged commit 9202a43 into algorand:master Nov 18, 2022
@michaeldiamant michaeldiamant deleted the fix_slack_notify_on_failure branch November 18, 2022 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants