Skip to content

feat: add opt-in fleet health exit gate - #104

Open
Tiyatrotist wants to merge 6 commits into
sameeralam3127:mainfrom
Tiyatrotist:feat/optional-health-gate-41
Open

Tiyatrotist wants to merge 6 commits into
sameeralam3127:mainfrom
Tiyatrotist:feat/optional-health-gate-41

Conversation

@Tiyatrotist

Copy link
Copy Markdown
Contributor

Adds an opt-in final gate to vitals_report. any_fail gates on the existing fleet failure count; regression gates only on postcheck hosts whose status changed from Pass at baseline to Fail. A configurable count threshold is supported, and the gate runs after rendering, archiving, and notifications so evidence is preserved before a non-zero exit.

Defaults keep current behavior unchanged. Variable reference, CI examples, and structural contract tests are included.

Closes #41.

Local pytest/Ansible execution was not run because the connected development machine is currently offline.

@pr-reviewer-bots pr-reviewer-bots Bot added documentation Improvements or additions to documentation size/medium labels Sep 27, 2026
@coderabbitai

coderabbitai Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 1c2073cd-6818-48ec-972e-65ff33145a46


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pr-reviewer-bots

Copy link
Copy Markdown

Thanks for opening this PR. Assigned to @sameeralam3127. Labels added: documentation, size/medium. Checklist: 3/3 passed (see checks tab for details).

@sameeralam3127

Copy link
Copy Markdown
Owner

@Tiyatrotist: this PR and #102 both say Closes #41 and implement the same fleet health gate with different code (gate.yml and the tests differ). Please pick one and close the other, so review and CI effort go to a single branch.

Whichever you keep, this is what's blocking it right now:

#104: validate fails in tests/test_argument_specs.py

vitals_report: undocumented in argument_specs.yml:
  ['linux_vitals_fail_on_status', 'linux_vitals_fail_threshold_count']
  • Add both variables to roles/vitals_report/meta/argument_specs.yml (type, default, choices for linux_vitals_fail_on_status, description). Every role default must be documented there.

#102: validate fails on ansible-lint

  • Trailing whitespace at roles/vitals_report/tasks/main.yml:50
  • CodeRabbit's finding on gate.yml:6: a non-numeric threshold such as "two" becomes 0 through the int filter instead of being rejected. Validate that it's a non-negative whole number before converting, and add a test for invalid values. The same applies to this PR's threshold handling.

In both cases the four required molecule (...) checks never ran, because validate has to pass first. Please run pre-commit run --all-files and pytest -q locally before pushing.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an opt-in non-zero exit so an unhealthy fleet can gate a pipeline

2 participants