Account for embedded auth env in deployment drift checks#4878
Account for embedded auth env in deployment drift checks#4878
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4878 +/- ##
==========================================
+ Coverage 69.12% 69.25% +0.12%
==========================================
Files 531 531
Lines 55183 55178 -5
==========================================
+ Hits 38146 38212 +66
+ Misses 14113 14028 -85
- Partials 2924 2938 +14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jhrozek
left a comment
There was a problem hiding this comment.
Looks good — the core fix is correct, env var ordering between creation and drift check paths is consistent, and test coverage directly validates the bug fix.
One nit: the two SSA reordering tests in pkg/container/kubernetes/client_test.go (TestStatefulSetApplyAssociativeListReorderingDoesNotChangeGeneration, TestServiceApplyAssociativeListReorderingDoesNotChangeGeneration) test the behavior of fake.NewClientset(), not any production code in this package. The fake client doesn't implement real SSA merge semantics, so these document an assumption about SSA associative-list handling rather than validating it. If real validation is wanted, these would need to run against envtest. They're also unrelated to the drift check fix itself — might be cleaner as a separate commit.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
These tests validated behavior of fake.NewClientset(), not any production code. The fake client does not implement real SSA merge semantics, so the assertions were meaningless. The actual drift check regression is covered by the controller-level tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
MCPServerMCPRemoteProxyso self-generated deployments are not treated as driftedThis is the concrete operator-side fix identified while debugging #4877.
Testing
go test ./cmd/thv-operator/controllers ./pkg/container/kubernetesCloses #4877.