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

[DEVPLAT-2283] Update job-notification action to use blocks and take … #17

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kristianmills
Copy link

@kristianmills kristianmills commented Dec 5, 2024

…thread ts

Description

Update job-notification action to use blocks and take thread ts.
Based on this conversation thread https://scribd.slack.com/archives/GTZ97GLN6/p1733332531673619
we want to move post production failure messages into the release thread, as well as other mesasges using the job notification action, but to do so we need to be able to pass a thread timestamp. Unfortunately, slackapi/slack-github-action doesn't take a thread timestamp input, so we will have to switch to using archive/github-actions-slack as we do elsewhere, but to do this we will also have to switch to the newer block format for passing formatted slack messages as opposed to the old attachments format that blocks replaced.

Testing considerations

Related links

@kristianmills kristianmills force-pushed the kristianm/thread-option branch 24 times, most recently from b907270 to c529945 Compare December 6, 2024 00:22
@kristianmills kristianmills force-pushed the kristianm/thread-option branch from c529945 to 016bc9e Compare December 6, 2024 00:23
@kristianmills kristianmills marked this pull request as ready for review December 6, 2024 00:24
@kristianmills kristianmills requested a review from a team as a code owner December 6, 2024 00:24
"text": ":${{ steps.fields.outputs.emoji }}: *Workflow <https://github.com/${{ inputs.repository }}/actions/runs/${{ github.run_id }}/|${{ github.workflow }}> ${{ inputs.status }}*",
"attachments": [
{
"color": "${{ steps.fields.outputs.color }}",
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems we are not using color in the new format?

Copy link
Author

Choose a reason for hiding this comment

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

unfortunately, color is not supported in block format, it is the one feature that did not carry over https://api.slack.com/messaging/attachments-to-blocks#direct_equivalents

@kamranf
Copy link
Contributor

kamranf commented Dec 10, 2024

@kristianmills I might be missing something but it seems slackapi/slack-github-action does take input for thread per here:

Posting threaded replies to a message from a past job can be done by including the thread_ts attribute of the parent message in the payload

@kristianmills kristianmills force-pushed the kristianm/thread-option branch from 3f271b0 to 31ad68f Compare December 12, 2024 18:38
@kristianmills kristianmills force-pushed the kristianm/thread-option branch 18 times, most recently from 2a519da to 271a64b Compare December 13, 2024 01:02
@kristianmills kristianmills force-pushed the kristianm/thread-option branch from 271a64b to 03630cc Compare December 13, 2024 01:06
@kristianmills
Copy link
Author

kristianmills commented Dec 13, 2024

@kristianmills I might be missing something but it seems slackapi/slack-github-action does take input for thread per here:

Posting threaded replies to a message from a past job can be done by including the thread_ts attribute of the parent message in the payload

@kamranf so, it does in version 2.0.0, but by version 2.0.0 they have moved from attachments to block formatting for slack messages as well, so it and archive/github-actions-slack@v2.9.0 are functionally very similar except for formatting differences. I converted it back to slack-github-action but I am finding the escaped character problem is even more present and I have not yet found a way around it. I can continue trying to do so or we can just go back to archive/github-actions-slack@v2.9.0 which worked.

@kamranf
Copy link
Contributor

kamranf commented Dec 13, 2024

With regards to debugging the issue with escaped characters, you may find https://app.slack.com/block-kit-builder/ helpful if not already using it.

@kristianmills
Copy link
Author

kristianmills commented Dec 13, 2024

https://app.slack.com/block-kit-builder/

@kamranf I am, unfortunately, slack-github-action uses its own syntax yaml syntax that differs from the one in the block-kit-builder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants