Skip to content

feat: propagate exporter hook status to Lease conditions#607

Draft
raballew wants to merge 3 commits intojumpstarter-dev:mainfrom
raballew:446-lease-hook-status
Draft

feat: propagate exporter hook status to Lease conditions#607
raballew wants to merge 3 commits intojumpstarter-dev:mainfrom
raballew:446-lease-hook-status

Conversation

@raballew
Copy link
Copy Markdown
Member

Summary

  • Add BeforeLeaseHook, AfterLeaseHook, and HookFailed condition types to the Lease API with corresponding SetStatus helpers
  • Add reconcileStatusHookPhase to the lease controller that maps exporter status to Lease conditions, setting Ready=False during hook phases
  • Add Exporter Watch to the lease controller so hook phase changes propagate immediately

Closes #446

Test plan

  • Verify Lease conditions reflect exporter hook phases
  • Verify Ready=False during BeforeLeaseHook and AfterLeaseHook
  • Run Go controller tests

🤖 Generated with Claude Code

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 17, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 10d57801-8f49-45b6-a7b2-5e349a12e623

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@mangelajo
Copy link
Copy Markdown
Member

I am not sure about this one, this will add a lot of noise and movement to status conditions on the K8s API

raballew and others added 3 commits April 17, 2026 12:29
Add LeaseConditionType constants for BeforeLeaseHook, AfterLeaseHook,
and HookFailed so the Lease resource can reflect the exporter's hook
lifecycle phases. Add corresponding SetStatus helper methods.

Closes jumpstarter-dev#446

Generated-By: Forge/20260416_202054_681470_c0f1afed_i446
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add reconcileStatusHookPhase to the lease controller that reads the
exporter's ExporterStatusValue and maps it to the corresponding Lease
condition (BeforeLeaseHook, AfterLeaseHook, HookFailed, Ready). The
Ready condition is now only True when the exporter reaches LeaseReady
or has an unspecified status (backward compatibility with old exporters).

Closes jumpstarter-dev#446

Generated-By: Forge/20260416_202054_681470_c0f1afed_i446
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ok phase updates

The AfterLeaseHook case was not setting the Ready condition to False,
which could mislead clients relying on Ready to determine exporter
usability. The lease controller also lacked a Watch on Exporter
resources, meaning hook phase changes were only propagated on the next
requeue timer rather than immediately.

Generated-By: Forge/20260416_202054_681470_c0f1afed_i446

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@raballew raballew force-pushed the 446-lease-hook-status branch from 200639d to 0fadcf7 Compare April 17, 2026 10:45
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.

Add hook-aware phase/status to the Lease resource

2 participants