Commit 36944c8
[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 6b4be09 commit 36944c8
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 | |
|---|---|---|---|
| |||
1864 | 1864 | | |
1865 | 1865 | | |
1866 | 1866 | | |
1867 | | - | |
1868 | | - | |
1869 | | - | |
1870 | | - | |
1871 | | - | |
1872 | | - | |
1873 | | - | |
1874 | | - | |
1875 | | - | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
1876 | 1879 | | |
1877 | 1880 | | |
1878 | 1881 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
440 | 461 | | |
441 | 462 | | |
442 | 463 | | |
| |||
0 commit comments