Skip to content

Update all slack integration records with bot tokens during install

The following discussion from !105439 (merged) should be addressed:

  • @.luke started a discussion:

    Suggestion (not blocking)

    We'll need to tweak this a bit, but we could tackle this in a follow-up merge request.

    Mentioned in the issue description we're currently updating only "legacy" records that share a team_id here (the .legacy_by_team scope.

    Legacy records are ones that do not have a bot_access_token - which means records that were created before this change !86369 (merged) in %15.1 where we switched the Slack app itself over to use a new authorization mechanism.

    Now we want to update all records that share the team_id. I think this new scope might need another new index unfortunately, so it's not a super light touch change to make. It's a safe logical change because these records all are essentially the same thing.

    If you want to save this extra piece for a follow-up merge request to reduce complexity a bit - I think that would be fine.

    We could potentially merge as-is as what we have here is not incorrect - just incomplete, and we could complete it later with a very small scope + index change. What do you think?

See: #374720 (closed)

Implementation steps

See: #374720 (closed)

Edited by Alex Kalderimis