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

Add service label for alerting integrations #5373

Draft
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

Ferril
Copy link
Member

@Ferril Ferril commented Dec 17, 2024

What this PR does

Adds service_name dynamic labels for Grafana Alerting integrations by default

Which issue(s) this PR closes

Related to https://github.com/grafana/oncall-private/issues/2975

Checklist

  • Unit, integration, and e2e (if applicable) tests updated
  • Documentation added (or pr:no public docs PR label added if not required)
  • Added the relevant release notes label (see labels prefixed w/ release:). These labels dictate how your PR will
    show up in the autogenerated release notes.

Choose a reason for hiding this comment

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

Let's remove update_labels_cache task, it seems it's deprecated


@shared_dedicated_queue_retry_task(autoretry_for=(Exception,), retry_backoff=True, max_retries=MAX_RETRIES)
def add_service_label_for_alerting_integrations():
"""Starts tasks that add `service_name` dynamic label to custom labels for alerting integrations"""

Choose a reason for hiding this comment

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

Please, add comment that it's intended for 1-time run. Also, let's stop use term custom labels

TODO:
1. Save custom labels cache
2. Check if to_internal & to_representation are called automatically for IntegrationAlertGroupLabelsSerializer
3. Task for create default label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants