Skip to content

Require explicit status input for Slack notification action#79

Open
JackPGreen wants to merge 1 commit into
masterfrom
require-explicit-status-input-for-slack-notification-action
Open

Require explicit status input for Slack notification action#79
JackPGreen wants to merge 1 commit into
masterfrom
require-explicit-status-input-for-slack-notification-action

Conversation

@JackPGreen

Copy link
Copy Markdown
Contributor

The workflow attempts to derive the enclosing job status, to report success/failure without being explicitly told.

However, this doesn't seem to work properly, e.g. in this example, it's only triggered on failure(): https://github.com/hazelcast/mono-actions/blob/f4d06085c5c0089ad76a475e067a4fc096adab25/copybara/copy-commit-to-os/action.yaml#L88-89

And yet the job logs show the job.status as success.

actions/runner#1682 relates to a similar issue where it's suggested the status is not always updated "live" in composite actions.

The simplest solution is to require an explicit input rather than deriving.

The workflow attempts to derive the enclosing job status, to report success/failure without being explicitly told.

However, this doesn't seem to work properly, e.g. in this example, it's only triggered on `failure()`:
https://github.com/hazelcast/mono-actions/blob/f4d06085c5c0089ad76a475e067a4fc096adab25/copybara/copy-commit-to-os/action.yaml#L88-89

And yet the [job logs](https://github.com/hazelcast/hazelcast-mono/actions/runs/29821335563/job/88623379973#step:3:1549) show the `job.status` as `success`.

actions/runner#1682 relates to a _similar_ issue where it's suggested the status is not always updated "live" in composite actions.

The simplest solution is to require an _explicit_ input rather than deriving.
JackPGreen added a commit to hazelcast/mono-actions that referenced this pull request Jul 21, 2026
JackPGreen added a commit to JackPGreen/hazelcast-docs that referenced this pull request Jul 21, 2026
@sonarqubecloud

Copy link
Copy Markdown

Comment on lines 9 to +10
status:
description: The status to set, otherwise inherited from the enclosing job
required: false
description: The status to set (`success` or `failure`)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit
I see in test-slack-notification.yml passing ''
which is fine but perhaps document that any other value is marked as failure

@nishaatr

nishaatr commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Just saw https://github.com/hazelcast/monorepo-utils/pull/5/changes

why not make it default failure then no need for this PR
looks like there is more failure than success (so only need to update callers for success)

JackPGreen added a commit to hazelcast/dependabot-automerge that referenced this pull request Jul 22, 2026
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.

2 participants