Skip to content

fix(health): treat nil return from Lua health status script as n/a instead of unknown#28269

Open
snorwin wants to merge 1 commit into
argoproj:masterfrom
snorwin:fix-lua-health-status
Open

fix(health): treat nil return from Lua health status script as n/a instead of unknown#28269
snorwin wants to merge 1 commit into
argoproj:masterfrom
snorwin:fix-lua-health-status

Conversation

@snorwin

@snorwin snorwin commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Custom Lua health check scripts currently have no way to indicate that no health status should apply to a resource. This is extremely useful for generic health checks covering multiple resources in an API group, where some resources shouldn't report a health status at all.

Actual behavior
return nil from a Lua health check script results in the resource's health status being reported as Unknown.

Expected behavior
return nil should result in the health status being absent, i.e., equivalent to there being no health check defined for the object.

Note: As far as I've checked, none of the currently built-in health check scripts would be affected by this change.


Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Title of the PR
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

@snorwin snorwin requested a review from a team as a code owner June 12, 2026 12:50
@bunnyshell

bunnyshell Bot commented Jun 12, 2026

Copy link
Copy Markdown

✅ Preview Environment deployed on Bunnyshell

Component Endpoints
argocd https://argocd-opg2rx.bunnyenv.com/
argocd-ttyd https://argocd-web-cli-opg2rx.bunnyenv.com/

See: Environment Details | Pipeline Logs

Available commands (reply to this comment):

  • 🔴 /bns:stop to stop the environment
  • 🚀 /bns:deploy to redeploy the environment
  • /bns:delete to remove the environment

@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

…stead of unknown

Signed-off-by: Norwin Schnyder <norwin.schnyder+github@gmail.com>
@snorwin snorwin force-pushed the fix-lua-health-status branch from dae1d59 to 90788d6 Compare June 12, 2026 13:56
@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.81%. Comparing base (38095fc) to head (90788d6).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #28269      +/-   ##
==========================================
- Coverage   64.82%   64.81%   -0.02%     
==========================================
  Files         425      425              
  Lines       59092    59092              
==========================================
- Hits        38306    38299       -7     
- Misses      17222    17233      +11     
+ Partials     3564     3560       -4     

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

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.

1 participant