Skip to content

fix(its): correct InstanceStatus convergence semantics - #10808

Merged
leon-ape merged 8 commits into
release-1.1from
bugfix/10799-instance-status-contract-release-1.1
Aug 25, 2026
Merged

fix(its): correct InstanceStatus convergence semantics#10808
leon-ape merged 8 commits into
release-1.1from
bugfix/10799-instance-status-contract-release-1.1

Conversation

@leon-ape

@leon-ape leon-ape commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • backport the InstanceStatus convergence contract correction from fix(its): correct InstanceStatus convergence semantics #10799 to release-1.1, where chore: publish richer InstanceSet instance status #10791 already introduced the richer status from chore: publish richer InstanceSet instance status #10758
  • define UpToDate as convergence of an Active/Present instance across its Pod target, dynamic configs, and PVC expansion while keeping runtime health independent
  • invalidate only existing instances affected by the current desired-state change and preserve unaffected observations
  • fail closed UpToDate for a desired Active identity whose current Pod/Instance is missing during generation handoff, without rewriting runtime health fields
  • close the ITS2 generation-handoff window and publish the desired Pod revision for every Active instance
  • count handed-off but unconverged ITS2 instances against both rolling availability and roleful member-update limits

Release 1.1 adaptation

This cannot be an automatic cherry-pick of #10799:

  • the status reconciler changes conflict with the release-specific chore: publish richer InstanceSet instance status #10791 implementation
  • release-1.1 represents dynamic config convergence with ConfigTemplate.Generation and InstanceConfigStatus.Generation; main uses config hashes
  • the backport therefore retains the 1.1 generation-based API and producer behavior while applying the same public UpToDate semantics

No generation field is added. status.observedGeneration still means that the controller has observed and started processing that InstanceSet generation; it does not make status an atomic snapshot. The existing StatusReconciler-before-RevisionUpdateReconciler order is unchanged.

Ready, Available, Failed, and Role remain current runtime observations. Add/remove/offline/released identities remain represented by DesiredState and CurrentState. No Apps or Ops logic is introduced into workload status producers.

Tests are added to existing release-1.1 test files; this PR introduces no new test files.

Validation

  • pkg/controller/instance
  • pkg/controller/instanceset
  • pkg/controller/instanceset2
  • pkg/controller/workloads/instancestatus
  • pkg/controllerutil
  • full controllers/workloads envtest suite
  • pkg/operations/... and controllers/operations/...
  • make generate, make manifests, make doc, and make lint
  • generated CRDs and API reference remain synchronized

Backport of #10799. Related to #10800.

Fixes #10807

@leon-ape
leon-ape requested a review from a team as a code owner August 25, 2026 08:54
@leon-ape leon-ape added the nopick Not auto cherry-pick when PR merged label Aug 25, 2026
@github-actions github-actions Bot added the size/XXL Denotes a PR that changes 1000+ lines. label Aug 25, 2026
@apecloud-bot

Copy link
Copy Markdown
Collaborator

Auto Cherry-pick Instructions

Usage:
  - /nopick: Not auto cherry-pick when PR merged.
  - /pick: release-x.x [release-x.x]: Auto cherry-pick to the specified branch when PR merged.

Example:
  - /nopick
  - /pick release-1.1

CLA Recheck Instructions

Usage:
  - /recheck-cla: Trigger a re-check of CLA status for this pull request.
Example:
  - /recheck-cla

@leon-ape
leon-ape changed the base branch from release-1.1 to main August 25, 2026 08:55
@leon-ape
leon-ape changed the base branch from main to release-1.1 August 25, 2026 08:55
@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.75000% with 51 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.67%. Comparing base (d7c3a5a) to head (610536a).
⚠️ Report is 3 commits behind head on release-1.1.

Files with missing lines Patch % Lines
pkg/controller/instanceset/reconciler_status.go 71.05% 14 Missing and 8 partials ⚠️
...ntroller/instanceset/reconciler_revision_update.go 76.47% 5 Missing and 3 partials ⚠️
pkg/controller/instance/reconciler_status.go 82.35% 3 Missing and 3 partials ⚠️
pkg/controller/instanceset2/reconciler_status.go 45.45% 4 Missing and 2 partials ⚠️
...troller/instanceset2/reconciler_revision_update.go 91.48% 2 Missing and 2 partials ⚠️
pkg/controller/instanceset2/reconciler_update.go 85.00% 2 Missing and 1 partial ⚠️
pkg/controller/instance/revision_utils.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           release-1.1   #10808      +/-   ##
===============================================
+ Coverage        54.35%   55.67%   +1.31%     
===============================================
  Files              546      550       +4     
  Lines            61511    62322     +811     
===============================================
+ Hits             33432    34695    +1263     
+ Misses           24868    24325     -543     
- Partials          3211     3302      +91     
Flag Coverage Δ
unittests 55.67% <78.75%> (+1.31%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

@leon-ape leon-ape changed the title fix(workloads): correct InstanceStatus convergence semantics (release-1.1) fix(workloads): correct InstanceStatus convergence semantics Aug 25, 2026
@leon-ape leon-ape changed the title fix(workloads): correct InstanceStatus convergence semantics fix(its): correct InstanceStatus convergence semantics Aug 25, 2026
@leon-ape

Copy link
Copy Markdown
Collaborator Author

/approve

@apecloud-bot apecloud-bot added the approved PR Approved Test label Aug 25, 2026
@leon-ape
leon-ape merged commit 423b3a3 into release-1.1 Aug 25, 2026
37 checks passed
@leon-ape
leon-ape deleted the bugfix/10799-instance-status-contract-release-1.1 branch August 25, 2026 10:00
@github-actions github-actions Bot added this to the Release 1.2.0 milestone Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved PR Approved Test nopick Not auto cherry-pick when PR merged size/XXL Denotes a PR that changes 1000+ lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backport InstanceStatus convergence correction to release-1.1

2 participants