Skip to content

Commit

Permalink
Fix mixin custom job_prefix usage with job selector (#9155)
Browse files Browse the repository at this point in the history
* mixin: fix custom job_prefix

* Update CHANGELOG.md

* Update CHANGELOG.md with PR number

---------

Co-authored-by: Dimitar Dimitrov <[email protected]>
  • Loading branch information
Polygens and dimitarvdimitrov authored Sep 11, 2024
1 parent 9a03b76 commit 14a20bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
* [BUGFIX] Dashboards: fix "current replicas" in autoscaling panels when HPA is not active. #8566
* [BUGFIX] Alerts: do not fire `MimirRingMembersMismatch` during the migration to experimental ingest storage. #8727
* [BUGFIX] Dashboards: avoid over-counting of ingesters metrics when migrating to experimental ingest storage. #9170
* [BUGFIX] Dashboards: fix `job_prefix` not utilized in `jobSelector`. #9155

### Jsonnet

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
jobSelector(job)::
if $._config.singleBinary
then [utils.selector.noop('%s' % $._config.per_cluster_label), utils.selector.re($._config.per_job_label, '$job')]
else [utils.selector.re('%s' % $._config.per_cluster_label, '$cluster'), utils.selector.re($._config.per_job_label, '($namespace)/(%s)' % formatJobForQuery(job))],
else [utils.selector.re('%s' % $._config.per_cluster_label, '$cluster'), utils.selector.re($._config.per_job_label, '%s(%s)' % [$._config.job_prefix, formatJobForQuery(job)])],

recordingRulePrefix(selectors)::
std.join('_', [matcher.label for matcher in selectors]),
Expand Down

0 comments on commit 14a20bd

Please sign in to comment.