Skip to content

feat: allow configuring concurrency policy for fsck cronjob - #1006

Merged
kalbasit merged 1 commit into
mainfrom
03-01-feat_helm_allow_configuring_concurrency_policy_for_fsck_cronjob
Mar 1, 2026
Merged

kalbasit merged 1 commit into
mainfrom
03-01-feat_helm_allow_configuring_concurrency_policy_for_fsck_cronjob

Conversation

@kalbasit

@kalbasit kalbasit commented Mar 1, 2026

Copy link
Copy Markdown
Owner

This adds 'concurrencyPolicy' to the fsck job configuration in the Helm
chart. It defaults to 'Forbid' to prevent multiple instances of fsck
from running simultaneously, which could lead to resource exhaustion or
database lock contention if a check takes longer than the scheduled
interval.

Changes:

  • Added 'fsck.job.concurrencyPolicy' to values.yaml.
  • Updated 'fsck-cronjob.yaml' template to apply the policy.
  • Added schema validation in 'values.schema.json'.
  • Updated documentation in 'Installation/Helm Chart.md' and
    'Operations/Integrity Check (fsck).md'.
  • Added unit tests in 'tests/fsck_cronjob_test.yaml'.

@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. helm labels Mar 1, 2026

kalbasit commented Mar 1, 2026

Copy link
Copy Markdown
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the Helm chart for the "fsck" cron job by adding a "concurrencyPolicy" option. This feature is crucial for preventing potential resource exhaustion or database lock contention that could arise if multiple "fsck" instances were to run concurrently, especially when a check exceeds its scheduled interval. The default setting of 'Forbid' ensures safer operation out-of-the-box, while still allowing users to customize this behavior if needed.

Highlights

  • Concurrency Policy for fsck CronJob: Introduced a configurable "concurrencyPolicy" for the "fsck" cron job in the Helm chart, defaulting to "Forbid" to prevent multiple instances from running simultaneously.
  • Schema Validation: Added schema validation for the new "fsck.job.concurrencyPolicy" field in "values.schema.json".
  • Documentation Updates: Updated user guide documentation ("Installation/Helm Chart.md", "Chart Reference.md", "Operations/Integrity Check (fsck).md") to reflect the new "concurrencyPolicy" setting.
  • Unit Tests: Included unit tests to verify the correct application and default behavior of the "concurrencyPolicy".
Changelog
  • charts/ncps/templates/fsck-cronjob.yaml
    • Added "concurrencyPolicy" field to the "spec" of the "CronJob" resource, using the value from ".Values.fsck.job.concurrencyPolicy" or defaulting to "Forbid".
  • charts/ncps/tests/fsck_cronjob_test.yaml
    • Added a test case to verify that the "concurrencyPolicy" is correctly applied when set to "Replace".
    • Added a test case to confirm that the "concurrencyPolicy" defaults to "Forbid" when not explicitly specified.
  • charts/ncps/values.schema.json
    • Defined the schema for "fsck.job.concurrencyPolicy", specifying it as a string with allowed enum values "Allow", "Forbid", and "Replace".
  • charts/ncps/values.yaml
    • Added "concurrencyPolicy" under "fsck.job" with a default value of "Forbid" and a descriptive comment.
  • docs/docs/User Guide/Installation/Helm Chart.md
    • Updated the example configuration to include "fsck.job.concurrencyPolicy: Forbid".
  • docs/docs/User Guide/Installation/Helm Chart/Chart Reference.md
    • Added a new entry for "fsck.job.concurrencyPolicy" to the chart reference table, detailing its purpose and default value.
  • docs/docs/User Guide/Operations/Integrity Check (fsck).md
    • Updated the example configuration for the "fsck" job to include "concurrencyPolicy: Forbid".
Activity
  • No human activity (comments, reviews) has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request adds a configurable concurrencyPolicy to the fsck cronjob, which is a sensible feature to prevent job overlaps. The changes are well-implemented across the Helm chart templates, values, schema, and documentation. The addition of unit tests is also great. The suggestions to improve the maintainability of the chart by centralizing the default value for the new setting in values.schema.json are valid and have been retained, as they align with general best practices for Helm chart development.

Comment thread charts/ncps/templates/fsck-cronjob.yaml Resolved
Comment thread charts/ncps/values.schema.json Resolved
Comment thread charts/ncps/values.yaml Resolved
@github-actions

github-actions Bot commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

This adds 'concurrencyPolicy' to the fsck job configuration in the Helm
chart. It defaults to 'Forbid' to prevent multiple instances of fsck
from running simultaneously, which could lead to resource exhaustion or
database lock contention if a check takes longer than the scheduled
interval.

Changes:
- Added 'fsck.job.concurrencyPolicy' to values.yaml.
- Updated 'fsck-cronjob.yaml' template to apply the policy.
- Added schema validation in 'values.schema.json'.
- Updated documentation in 'Installation/Helm Chart.md' and
  'Operations/Integrity Check (fsck).md'.
- Added unit tests in 'tests/fsck_cronjob_test.yaml'.
@kalbasit
kalbasit force-pushed the 03-01-feat_helm_allow_configuring_concurrency_policy_for_fsck_cronjob branch from e0607cd to 069b586 Compare March 1, 2026 08:23
@kalbasit kalbasit added the backport release-0.9 Backport PR automatically label Mar 1, 2026
@kalbasit
kalbasit enabled auto-merge (squash) March 1, 2026 08:23
@github-actions

github-actions Bot commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

@codecov

codecov Bot commented Mar 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 5.04%. Comparing base (4979cd7) to head (069b586).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1006   +/-   ##
=====================================
  Coverage   5.04%   5.04%           
=====================================
  Files          6       6           
  Lines        436     436           
=====================================
  Hits          22      22           
  Misses       410     410           
  Partials       4       4           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kalbasit
kalbasit merged commit 1d1504e into main Mar 1, 2026
17 checks passed
@kalbasit
kalbasit deleted the 03-01-feat_helm_allow_configuring_concurrency_policy_for_fsck_cronjob branch March 1, 2026 08:36
kalbasit added a commit that referenced this pull request Mar 1, 2026
This adds 'concurrencyPolicy' to the fsck job configuration in the Helm
chart. It defaults to 'Forbid' to prevent multiple instances of fsck
from running simultaneously, which could lead to resource exhaustion or
database lock contention if a check takes longer than the scheduled
interval.

Changes:
- Added 'fsck.job.concurrencyPolicy' to values.yaml.
- Updated 'fsck-cronjob.yaml' template to apply the policy.
- Added schema validation in 'values.schema.json'.
- Updated documentation in 'Installation/Helm Chart.md' and
  'Operations/Integrity Check (fsck).md'.
- Added unit tests in 'tests/fsck_cronjob_test.yaml'.

(cherry picked from commit 1d1504e)
@kalbasit

kalbasit commented Mar 1, 2026

Copy link
Copy Markdown
Owner Author

Successfully created backport PR for release-0.9:

@dosubot

dosubot Bot commented Mar 1, 2026

Copy link
Copy Markdown

Related Documentation

Checked 7 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

kalbasit added a commit that referenced this pull request Mar 1, 2026
…1006] (#1008)

Bot-based backport to `release-0.9`, triggered by a label in #1006.

This adds 'concurrencyPolicy' to the fsck job configuration in the Helm
chart. It defaults to 'Forbid' to prevent multiple instances of fsck
from running simultaneously, which could lead to resource exhaustion or
database lock contention if a check takes longer than the scheduled
interval.

Changes:
- Added 'fsck.job.concurrencyPolicy' to values.yaml.
- Updated 'fsck-cronjob.yaml' template to apply the policy.
- Added schema validation in 'values.schema.json'.
- Updated documentation in 'Installation/Helm Chart.md' and
  'Operations/Integrity Check (fsck).md'.
- Added unit tests in 'tests/fsck_cronjob_test.yaml'.
kalbasit added a commit that referenced this pull request Jun 8, 2026
## Summary

The `[Unreleased]` section was populated in #1309 but skewed toward the
recent CDC-drain, in-flight-staging, and Ent-migration work, omitting
several user-facing features and fixes that also landed since v0.9.4.
This backfills the missing notable changes, each cross-referenced by PR.

**Added**
- `ncps fsck` command + Helm fsck CronJob (#975, #996, #998, #999,
#1000, #1004, #1006, #1176)
- Closure pinning HTTP endpoints `POST`/`DELETE /pin/{hash}.narinfo`,
`GET /pins` (#1108)
- pprof server via `--pprof-addr` (#1063)
- CDC lazy chunking as a feature + `--cache-cdc-lazy-cleanup-schedule` +
recovery cron (#1082, #1083, #1089, #1096)
- Helm: auto `GOMEMLIMIT` (#1061), configurable temp volume /
`volumeClaimTemplate` (#1074, #1077), SQLite `Recreate` strategy (#1012)
- Startup storage reporting + deprecated-narinfo warning (#959, #961)
- `docker-dev` image (#1097)

**Fixed**
- `store/tmp` no longer wiped on startup (#1313)
- `nix-hash` NAR verification (#1101)
- Prometheus counters primed at startup (#1337, #1343)
- 404 on un-reassemblable chunked NARs (#1319), purged narinfo no longer
500 (#1318), fail-fast tmp validation (#1086)
- Further CDC/cache reliability fixes (#1317, #1346, #1341, #1342,
#1331, #1347)

**Changed**
- CDC config now persisted in the DB config table (#971)

Dependency bumps, CI/test-only changes, and the internal Ent-conversion
PRs are intentionally excluded; the existing Ent-migration entry already
covers that work.

## Test plan

- [x] `nix fmt` reports no changes (docs-only edit)
- [x] CHANGELOG section structure intact
(Added/Fixed/Changed/Removed/Migration/CI)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport release-0.9 Backport PR automatically helm size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant