CircleCI-Public / slack-orb

Create custom Slack notifications for CircleCI job statuses
https://circleci.com/developer/orbs/orb/circleci/slack
MIT License
214 stars 206 forks source link

Slack Orb is broken #403

Closed apujari-hippo closed 1 year ago

apujari-hippo commented 1 year ago

Orb version: 4.12.2

What happened:

Slack Orb is broken after today's changes (04/26/2023) https://github.com/CircleCI-Public/slack-orb/commit/b1d05c0b72b23efb7b42d157fd511b453fd874af

Expected behavior:

Additional Information:

ERROR:

Posting Status
BASH_ENV file: /tmp/.bash_env-64498232fc0bd3432523f9b7-0-build
Does Not Exist. Skipping file execution
Checking For JQ + CURL
environment: line 213: circleci: command not found

Exited with code exit status 127
CircleCI received exit code 127
EricRibeiro commented 1 year ago

Hi @apujari-hippo and @wyardley 👋

Thank you for bringing this to our attention. Could you share the following information:

If you run a public pipeline, could you share the link? If it's private, please contact our support to provide us with more information so we can better assist you.

wyardley commented 1 year ago

IIRC, this orb has always done a pretty good job of trying to work properly on different / non-standard executors, so a change there should probably be flagged as potentially breaking. I had (maybe wrongly?) assumed it was just failing if the circleci binary wasn't present.

In the case I've seen a failure from so far, it is a self-hosted runner (1.0.49662-fe4007f) if that helps).

EricRibeiro commented 1 year ago

Thank you both for the heads-up and your patience 🙇

We are investigating why self-hosted runners didn't receive the update. This also brought to our attention that we should include runners in our test suite to catch these cases (cc @KyleTryon).

v4.12.3 will be out shortly.

wyardley commented 1 year ago

FWIW, we build a custom Docker image, however, we build it at least somewhat frequently. That said, there could be some lag.

Wouldn't other non-circle base images [running on the platform] also not have the circleci CLI present potentially, or does it get installed automagically there?

EricRibeiro commented 1 year ago

Wouldn't other non-circle base images [running on the platform] also not have the circleci CLI present potentially, or does it get installed automagically there?

It does. The problem lies in how the magic happens with Runner specifically. Our initial investigation showed that the CLI is not aliased to "circleci" when using self-hosted runners, hence the circleci: command not found error. In contrast, all tests using cloud executors pass.

We raise the issue internally. In the meantime, we will refrain from using circleci env subst in our orbs.