Migrate existing Generic Alert Endpoints to HTTP integrations format
Release notes
Problem to solve
Intended users
User experience goal
Proposal
- Desired outcome: Users experience no disruption in their existing generic alerts endpoint
- Things we want to ensure happen:
- Any changes after migration & before FF enablement are synced to the HttpIntegrations model
Legacy integrations should be migrated with a default name and endpoint identifier (perhaps legacy
) which will be used to identify these types of integrations (rather than leaving nil
for both values). We should also assign a token for inactive integrations. See !43634 (comment 422624991) for context.
Further details
This work supports the Incident Management direction.
What I had in mind for that issue: In one MR, two pieces.
- A migration which creates HttpIntegrations for each AlertsService. (migrating a single service might look something like this:)
alerts_service = Project.find(21).alerts_service
AlertManagement::HttpIntegration.create!(
project_id: 21,
name: 'WOWOWOW ITS LEGACY',
endpoint_identifier: 'legacy',
token: alerts_service.token,
encrypted_token: alerts_service.data.encrypted_token,
encrypted_token_iv: alerts_service.data.encrypted_token_iv,
active: true
)
- Code that syncs any changes to AlertsService to their corresponding HttpIntegration - this would be the more complicated piece and is basically to accomodate that timing with feature flags is difficult. (edited)
Permissions and Security
Documentation
Documentation required. This is be a new section under the Incident Management main nav item called Integrations.