Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC-0008] Custom Event Metadata from Annotations #1014

Merged
merged 1 commit into from
Jan 10, 2025
Merged

Conversation

matheuscscp
Copy link
Member

@matheuscscp matheuscscp commented Dec 24, 2024

Part of: fluxcd/flux2#4809

The most significant change in this PR for implementing RFC 0008 is moving the group prefix removal from the cleanupMetadata() function deeper into the request handling logic, such that the precedence order defined in the RFC can be concisely implemented in a single place. This is because different Alert objects matching an event may append different Alert-level metadata to the event, and hence for the metadata combination, precedence order and key conflict detection to be implemented in a single place, moving the group prefix removal deeper was necessary. This logic is now implemented by the function combineEventMetadata(), which is an evolution of the renamed enhanceEventWithAlertMetadata(). As a result, a few other functions manipulating metadata keys now have to consider the involved object group prefix when doing so.

Tasks:

@matheuscscp matheuscscp force-pushed the rfc-0008 branch 2 times, most recently from caee223 to 9bdc215 Compare December 25, 2024 17:40
@matheuscscp matheuscscp marked this pull request as ready for review January 10, 2025 13:04
@stefanprodan stefanprodan added enhancement New feature or request area/alerting Alerting related issues and PRs area/api API related issues and pull requests labels Jan 10, 2025
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks @matheuscscp 🥇

@matheuscscp matheuscscp merged commit d455ac6 into main Jan 10, 2025
9 checks passed
@matheuscscp matheuscscp deleted the rfc-0008 branch January 10, 2025 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/alerting Alerting related issues and PRs area/api API related issues and pull requests enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants