Skip to content

Use literal seconds for lifecycle alert threshold defaults - #2778

Merged
bert-e merged 2 commits into
development/9.5from
improvement/BB-824/literal-alert-threshold-defaults
Jul 21, 2026
Merged

Use literal seconds for lifecycle alert threshold defaults#2778
bert-e merged 2 commits into
development/9.5from
improvement/BB-824/literal-alert-threshold-defaults

Conversation

@delthas

@delthas delthas commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

The lifecycle alert threshold x-inputs used arithmetic defaults (10*60, 24*60*60, ...). Arithmetic is valid inside the PromQL expressions, but the same values are interpolated into the Go-template description annotations of the LifecycleLateScan and LifecycleStalledScan alerts, and Go templates have no * operator: when the consumer leaves an input unset, the rendered annotation ({{ 10*60 | humanizeDuration }}) fails to parse with unexpected "*" in operand. prometheus-operator then rejects the rule group and aborts the entire Prometheus config sync — all alerting silently dies, and any ServiceMonitor reconciled afterwards is never scraped.

This is the root cause of the deterministic end2end-pra (PRA nominal case) and Kafka Cleaner CTST failures on every Zenko branch bumping backbeat >= 9.5.0-preview.2 (scality/Zenko#2461, scality/Zenko#2447, scality/Zenko#2451): zenko-operator v1.8.13 only binds the latency thresholds, so the conductor-scan inputs introduced by BB-740 fall back to their raw defaults.

The alerts CI workflow does not catch this because it always supplies its own threshold values instead of rendering the file defaults.

Using literal seconds keeps the PromQL semantics identical and renders valid annotations ({{ 600 | humanizeDuration }} → "10 minutes").

Issue: BB-824

delthas added 2 commits July 21, 2026 11:06
The threshold x-inputs used arithmetic defaults (10*60, 24*60*60, ...).
Arithmetic is valid inside the PromQL expressions, but the same values
are interpolated into the Go-template description annotations of the
LifecycleLateScan and LifecycleStalledScan alerts, and Go templates
have no '*' operator: when the consumer leaves an input unset, the
rendered annotation ('{{ 10*60 | humanizeDuration }}') fails to parse
with 'unexpected "*" in operand', prometheus-operator rejects the
rule group and aborts the whole Prometheus config sync, silently
disabling all alerting and any scrape config added afterwards.

The alerts CI never renders the defaults (the workflow supplies its
own threshold values), so this only surfaces in consumers that leave
inputs unset, e.g. Zenko with zenko-operator v1.8.13 which binds only
the latency thresholds.

Issue: BB-824
@bert-e

bert-e commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Hello delthas,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval
/bypass_build_status Bypass the build and test status
/bypass_commit_size Bypass the check on the size of the changeset TBA
/bypass_incompatible_branch Bypass the check on the source branch prefix
/bypass_jira_check Bypass the Jira issue check
/bypass_peer_approval Bypass the pull request peers' approval
/bypass_leader_approval Bypass the pull request leaders' approval
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request TBA
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.40%. Comparing base (000c8c1) to head (37e2f49).
⚠️ Report is 2 commits behind head on development/9.5.

Additional details and impacted files

Impacted file tree graph
see 4 files with indirect coverage changes

Components Coverage Δ
Bucket Notification 80.22% <ø> (ø)
Core Library 81.05% <ø> (-0.16%) ⬇️
Ingestion 70.75% <ø> (ø)
Lifecycle 80.25% <ø> (ø)
Oplog Populator 85.83% <ø> (ø)
Replication 61.91% <ø> (-0.04%) ⬇️
Bucket Scanner 85.76% <ø> (ø)
@@                 Coverage Diff                 @@
##           development/9.5    #2778      +/-   ##
===================================================
- Coverage            75.47%   75.40%   -0.08%     
===================================================
  Files                  201      201              
  Lines                13917    13917              
===================================================
- Hits                 10504    10494      -10     
- Misses                3403     3413      +10     
  Partials                10       10              
Flag Coverage Δ
api:retry 9.06% <ø> (ø)
api:routes 8.84% <ø> (ø)
bucket-scanner 85.76% <ø> (ø)
ft_test:queuepopulator 9.12% <ø> (-1.00%) ⬇️
ingestion 12.30% <ø> (ø)
lib 7.79% <ø> (-0.01%) ⬇️
lifecycle 19.16% <ø> (ø)
notification 1.00% <ø> (ø)
oplogPopulator 0.13% <ø> (ø)
replication 18.79% <ø> (ø)
unit 54.59% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@scality scality deleted a comment from bert-e Jul 21, 2026
@bert-e

bert-e commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

@delthas
delthas requested review from a team, SylvainSenechal, benzekrimaha and maeldonn July 21, 2026 09:11
@delthas

delthas commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

/approve

@bert-e

bert-e commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

The following options are set: approve

@maeldonn maeldonn 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.

LGTM

@bert-e

bert-e commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/9.5

The following branches have NOT changed:

  • development/7.10
  • development/7.4
  • development/7.70
  • development/8.6
  • development/9.0
  • development/9.1
  • development/9.2
  • development/9.3
  • development/9.4

This pull request did not target the following hotfix branch(es) so they
were left untouched:

  • hotfix/7.10.2
  • hotfix/7.4.0
  • hotfix/7.4.5
  • hotfix/7.10.17
  • hotfix/7.10.12
  • hotfix/7.4.10
  • hotfix/9.0.7
  • hotfix/7.70.15
  • hotfix/7.70.1
  • hotfix/7.7.0
  • hotfix/7.4.9
  • hotfix/7.10.1
  • hotfix/7.4.6
  • hotfix/7.4.1
  • hotfix/7.8.0
  • hotfix/8.2.12
  • hotfix/7.10.3
  • hotfix/7.4.7
  • hotfix/7.4.3
  • hotfix/7.9.0
  • hotfix/7.10.8
  • hotfix/7.10.0
  • hotfix/9.0.4
  • hotfix/7.4.8
  • hotfix/7.70.12
  • hotfix/7.2.0
  • hotfix/7.6.0
  • hotfix/7.10.4
  • hotfix/7.4.2
  • hotfix/7.4.4

Please check the status of the associated issue BB-824.

Goodbye delthas.

The following options are set: approve

@bert-e
bert-e merged commit 37e2f49 into development/9.5 Jul 21, 2026
24 checks passed
@bert-e
bert-e deleted the improvement/BB-824/literal-alert-threshold-defaults branch July 21, 2026 09:30
@eve-ci-cd
eve-ci-cd Bot deployed to zenko/improvement/ZENKO-5314/days-0-expiration-ctst@2.16 July 21, 2026 10:01 Active
@eve-ci-cd
eve-ci-cd Bot deployed to zenko/development/2.16 July 21, 2026 14:02 Active
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.

5 participants