Commit ff5fd22
[1952] fix: vpwned proxy writes Conditions; checkStatusSuccess prefers them
Devin found a real regression in the previous OR-based fallback at
checkStatusSuccess: when the vpwned proxy's RevalidateCredentials
endpoint writes OpenStackValidationStatus="Failed" (e.g. after a
password rotation), Conditions still carry stale CredentialsValidated=True
from the controller's last reconcile. The OR check (ready if either
is True) returned True from stale Conditions and allowed migrations
against known-bad credentials.
Two-part fix:
1. vpwned proxy now writes Conditions alongside the flat fields.
updateOpenstackValidationStatus mirrors validationStatus into
utils.ConditionCredentialsValidated with an appropriate Reason:
- Succeeded -> True, AuthSucceeded
- Failed -> False, CredentialInvalidOrRevoked
- Revalidating -> Unknown, ValidationStatusRevalidating
Conditions and flat fields stay in sync regardless of which
writer touched the resource last.
2. checkStatusSuccess updated semantics: Conditions are authoritative
when present (now true for both controller and vpwned writes).
Falls back to the legacy flat field only when the Conditions slice
is entirely empty — that case still exists for pre-upgrade
resources not yet re-reconciled.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 0e65128 commit ff5fd22
4 files changed
Lines changed: 35 additions & 9 deletions
File tree
- graphify-out/cache/ast
- k8s/migration/internal/controller
- pkg/vpwned/server
Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.
Lines changed: 12 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1905 | 1905 | | |
1906 | 1906 | | |
1907 | 1907 | | |
1908 | | - | |
1909 | | - | |
1910 | | - | |
1911 | | - | |
1912 | | - | |
1913 | | - | |
1914 | | - | |
1915 | | - | |
1916 | | - | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
1917 | 1920 | | |
1918 | 1921 | | |
1919 | 1922 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
441 | 462 | | |
442 | 463 | | |
443 | 464 | | |
| |||
0 commit comments