redpanda-data / redpanda-data/connect

Minor issue with slack_post component in Redpanda Connect.

Open Beginner friendly
#4,511 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs investigation
Dominant language
Go
Stars
8.8k
Forks
969
Avg merge
1d 13h
Merged PRs (30d)
64

Description

Very low priority, no real impact on me at the moment, just something I noticed that might count as a bug.

When using the "slack_post" output component in a Redpanda Connect pipeline, my intention was to use this YAML in the output stanza:

slack_post:
    bot_token: "${secrets.SLACK_APP_BOT_TOKEN}"

Unfortunately, it looks like there is some kind of validation testing going on, because trying to create the pipeline returns an error stating that the "bot_token" value must start with "xoxb-". Although that's technically true (all Slack bot tokens that I've seen are in fact prefixed with "xoxb-") it does mean that I can't include that part of the token in the secret -- I have to drop the prefix from the secret value and then code the pipeline YAML as:

slack_post:
    bot_token: "xoxb-${secrets.SLACK_APP_BOT_TOKEN}"

Not a big deal, and I can leave comments/documentation explaining the issue, but it's the kind of thing that will be confusing to the next person after me who has to maintain the code and/or the app in production, so it might be better to adjust the component validation rules to allow the prior syntax above.

As a quick guess, the fix would be implemented on or about this line of code:

https://github.com/redpanda-data/connect/blob/9f8f9943dc0a5d19384251ac54252a6e1e093f90/internal/impl/slack/output_post.go#L43

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at internal/impl/slack/output_post.go around line 43 and inspect the slack_post bot_token validation. Verify how secret substitutions are handled, then adjust the validation so a complete token supplied through ${secrets.SLACK_APP_BOT_TOKEN} is accepted. Done means both the full-token and prefixed pipeline forms behave correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
data-engineering, stream-processing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.