Skip to content

feat(lifecycle): alert when index creation fails#2753

Open
delthas wants to merge 1 commit into
development/9.4from
improvement/BB-784/lifecycle-index-creation-failed-alert
Open

feat(lifecycle): alert when index creation fails#2753
delthas wants to merge 1 commit into
development/9.4from
improvement/BB-784/lifecycle-index-creation-failed-alert

Conversation

@delthas
Copy link
Copy Markdown
Contributor

@delthas delthas commented Jun 5, 2026

Summary

  • Add LifecycleIndexCreationFailed Prometheus alert (monitoring/lifecycle/alerts.yaml) wired to the s3_lifecycle_legacy_tasks_total{status="putBucketIndexesFailed"} counter introduced by BB-783 (feat(lifecycle): emit putBucketIndexesFailed metric on index creation errors #2751).
  • Fires on any failure in a 5m window with severity warning — mirrors the CircuitBreakerError shape: the conductor falls back to v1 full-scan, so this is recoverable but always warrants investigation (typically a disk-fill / indexBuildMinAvailableDiskSpaceMB refusal).
  • Companion fixture added to alerts.test.yaml.

Part of the Empty bucket feature epic. A symmetric MongoDB-side createIndexes-failed alert lives in the Zenko chart under ZENKO-5285.

Issue: BB-784

@bert-e
Copy link
Copy Markdown
Contributor

bert-e commented Jun 5, 2026

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.

@bert-e
Copy link
Copy Markdown
Contributor

bert-e commented Jun 5, 2026

Request integration branches

Waiting for integration branch creation to be requested by the user.

To request integration branches, please comment on this pull request with the following command:

/create_integration_branches

Alternatively, the /approve and /create_pull_requests commands will automatically
create the integration branches.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.85%. Comparing base (6223d3e) to head (5514c80).

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.24% <ø> (+0.03%) ⬆️
Ingestion 70.63% <ø> (ø)
Lifecycle 79.46% <ø> (-0.04%) ⬇️
Oplog Populator 85.83% <ø> (ø)
Replication 59.67% <ø> (ø)
Bucket Scanner 85.76% <ø> (ø)
@@               Coverage Diff                @@
##           development/9.4    #2753   +/-   ##
================================================
  Coverage            74.84%   74.85%           
================================================
  Files                  199      199           
  Lines                13657    13657           
================================================
+ Hits                 10222    10223    +1     
+ Misses                3425     3424    -1     
  Partials                10       10           
Flag Coverage Δ
api:retry 9.14% <ø> (ø)
api:routes 8.96% <ø> (ø)
bucket-scanner 85.76% <ø> (ø)
ft_test:queuepopulator 10.93% <ø> (+0.58%) ⬆️
ingestion 12.53% <ø> (ø)
lib 7.76% <ø> (-0.01%) ⬇️
lifecycle 18.93% <ø> (-0.01%) ⬇️
notification 1.02% <ø> (ø)
oplogPopulator 0.14% <ø> (ø)
replication 18.66% <ø> (ø)
unit 51.34% <ø> (ø)

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.

Comment thread monitoring/lifecycle/alerts.test.yaml
Comment thread monitoring/lifecycle/alerts.test.yaml
@delthas delthas force-pushed the improvement/BB-784/lifecycle-index-creation-failed-alert branch 2 times, most recently from b65c73e to 29521bd Compare June 5, 2026 14:54
@delthas delthas marked this pull request as ready for review June 5, 2026 14:57
@scality scality deleted a comment from claude Bot Jun 5, 2026
Add LifecycleIndexCreationFailed Prometheus rule wired to the
`putBucketIndexesFailed` status tag emitted by the conductor (BB-783).
The producer falls back to v1 (full-scan) processing on failure; the
alert surfaces the failure so operators can investigate the underlying
MongoDB error (disk-fill, IndexBuildMinAvailableDiskSpaceMB, etc.).

Issue: BB-784
@delthas delthas force-pushed the improvement/BB-784/lifecycle-index-creation-failed-alert branch from 29521bd to 5514c80 Compare June 5, 2026 14:58
@claude
Copy link
Copy Markdown

claude Bot commented Jun 5, 2026

LGTM — alert rule follows the existing CircuitBreakerError pattern (increase(...[5m]) > 0, no For clause, warning severity). Test fixture covers pre-increment silence (1m, 4m), firing window (5m, 9m), and post-window resolution (10m), plus a negative series (noIndex status) to confirm no false trigger. Description is clear and actionable.

Review by Claude Code

@scality scality deleted a comment from claude Bot Jun 5, 2026
@scality scality deleted a comment from claude Bot Jun 5, 2026
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