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

Don't fail overall if Slack announcement fails #69

Merged
merged 1 commit into from
May 8, 2024

Conversation

mcmire
Copy link
Contributor

@mcmire mcmire commented May 7, 2024

Typically, for a project, this action is run twice: once in dry-run mode (to allow approvers to review the package before it is published) and another time to issue the approval step and then actually publish the package.

When the action is run in dry-run mode, an announcement on Slack is created in order to notify approvers. If this fails in any way, however, it halts the release workflow completely and prevents the second instance of the action from running. This means that the package can never be released automatically and must be released manually.

This commit fixes this problem by instructing GitHub Actions that it is not mandatory for the Slack announcement step to pass in order for the release workflow to continue.


You can see a test for this change on a fork here: https://github.com/mcmire/utils/actions/runs/8990293760/job/24695822650. Note that the action fails and we see the error printed, but the overall step does not fail.


Fixes #68.

Typically, for a project, this action is run twice: once in dry-run mode
(to allow approvers to review the package before it is published) and
another time to issue the approval step and then actually publish the
package.

When the action is run in dry-run mode, an announcement on Slack is
created in order to notify approvers. If this fails in any way, however,
it halts the release workflow completely and prevents the second
instance of the action from running. This means that the package can
never be released automatically and must be released manually.

This commit fix this problem by instructing GitHub Actions that it is
not mandatory for the Slack announcement step to pass in order for the
release workflow to continue.
@mcmire mcmire requested a review from a team as a code owner May 7, 2024 19:26
Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

@mcmire mcmire merged commit 2f74132 into main May 8, 2024
12 checks passed
@mcmire mcmire deleted the continue-if-slack-step-fails branch May 8, 2024 15:32
mcmire added a commit that referenced this pull request May 8, 2024
Typically, for a project, this action is run twice: once in dry-run mode
(to allow approvers to review the package before it is published) and
another time to issue the approval step and then actually publish the
package.

When the action is run in dry-run mode, an announcement on Slack is
created in order to notify approvers. If this fails in any way, however,
it halts the release workflow completely and prevents the second
instance of the action from running. This means that the package can
never be released automatically and must be released manually.

This commit fix this problem by instructing GitHub Actions that it is
not mandatory for the Slack announcement step to pass in order for the
release workflow to continue.
mcmire added a commit that referenced this pull request May 8, 2024
Typically, for a project, this action is run twice: once in dry-run mode
(to allow approvers to review the package before it is published) and
another time to issue the approval step and then actually publish the
package.

When the action is run in dry-run mode, an announcement on Slack is
created in order to notify approvers. If this fails in any way, however,
it halts the release workflow completely and prevents the second
instance of the action from running. This means that the package can
never be released automatically and must be released manually.

This commit fix this problem by instructing GitHub Actions that it is
not mandatory for the Slack announcement step to pass in order for the
release workflow to continue.
Gudahtt added a commit that referenced this pull request May 10, 2024
* origin/main:
  remove default channel (#73)
  Don't fail overall if Slack announcement fails (#69)
  Improve Dry Run Output (#64)
  5.0.0 (#67)
  Fix Yarn 4 compatibility (#65)
  Disallow publishing packages with version 0.0.0 (#63)
  Run linting and testing GitHub workflows on PRs (#62)
  Enabling MetaMask security code scanner (#60)
  Add Shared Libraries team in codeowners file (#59)
  Update README.md (#56)
  Update README.md (#55)
  Update README.md (#54)
  Bump word-wrap from 1.2.3 to 1.2.4 (#53)
Gudahtt added a commit that referenced this pull request May 10, 2024
* Don't fail overall if Slack announcement fails (#69)

Typically, for a project, this action is run twice: once in dry-run mode
(to allow approvers to review the package before it is published) and
another time to issue the approval step and then actually publish the
package.

When the action is run in dry-run mode, an announcement on Slack is
created in order to notify approvers. If this fails in any way, however,
it halts the release workflow completely and prevents the second
instance of the action from running. This means that the package can
never be released automatically and must be released manually.

This commit fix this problem by instructing GitHub Actions that it is
not mandatory for the Slack announcement step to pass in order for the
release workflow to continue.

* Release 4.0.2 (#72)

* remove default channel (#73)

* Release 4.0.3

* fix: Fix action manifest validation error (#77)

The action manifest used the id `slack` for two steps, which is not
allowed. We don't reference this id anywhere, so it has been removed.

* Release 4.0.4 (#78)

---------

Co-authored-by: Elliot Winkler <[email protected]>
Co-authored-by: ricky <[email protected]>
Gudahtt added a commit that referenced this pull request May 10, 2024
* origin/v5.0.x:
  Release 5.0.1 (#71)
  Don't fail overall if Slack announcement fails (#69)
Gudahtt added a commit that referenced this pull request May 10, 2024
* Don't fail overall if Slack announcement fails (#69)

Typically, for a project, this action is run twice: once in dry-run mode
(to allow approvers to review the package before it is published) and
another time to issue the approval step and then actually publish the
package.

When the action is run in dry-run mode, an announcement on Slack is
created in order to notify approvers. If this fails in any way, however,
it halts the release workflow completely and prevents the second
instance of the action from running. This means that the package can
never be released automatically and must be released manually.

This commit fix this problem by instructing GitHub Actions that it is
not mandatory for the Slack announcement step to pass in order for the
release workflow to continue.

* Release 5.0.1 (#71)

---------

Co-authored-by: Elliot Winkler <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Continue with publishing if announcement fails
3 participants