Skip to content

Minor issue with slack_post component in Redpanda Connect. #4511

Description

@mgsimpson-i2

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:

root = if !this.has_prefix("xoxb-") { [ "field must start with xoxb-" ] }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions