Skip to content

Add group key to AlertGroup and groups API - #3452

Open
Spaceman1701 wants to merge 2 commits into
prometheus:mainfrom
Spaceman1701:feature/groupkey-in-api
Open

Spaceman1701 wants to merge 2 commits into
prometheus:mainfrom
Spaceman1701:feature/groupkey-in-api

Conversation

@Spaceman1701

Copy link
Copy Markdown
Contributor

This change adds the group key back to the AlertGroup struct so that it's available in the groups API endpoint. I started a discussion about this with #3446.

For the most part I think this is pretty straightforward. The one bit which might need a little more work is the use of AlertGroup in the UI. Since it uses a type generated from the OpenAPI spec, the local construction of groups in the UI requires a dummy value for the key. I considered making the value optional in the OpenAPI spec, but that wouldn't be true to the behavior of the API.

Signed-off-by: Ethan Hunter <ehunter@hudson-trading.com>
Signed-off-by: Ethan Hunter <ehunter@hudson-trading.com>

@siavashs siavashs left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think changing the API v2 which has been stable for a long time can cause issues for clients.
We could think about a new v3 API (graphql?) which is extendable while ensuring backwards compatibility.

Comment thread api/v2/openapi.yaml Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants