Fix server-side apply for search resources#75
Merged
Conversation
Add unit tests verifying GVK extensions are present for SSA, and an e2e chainsaw test that exercises server-side apply on ResourceIndexPolicy. The e2e test will fail against the current server because the OpenAPI $ref resolution doesn't produce correct REST-friendly definition names. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move catch/finally to step level and merge verify-policy-updated into the update step to match chainsaw v1alpha1 schema. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Transform Go module paths to REST-friendly format before looking them up in DefinitionNamer, so GVK extensions are returned. Re-compute definitions with corrected $ref callbacks for both OpenAPI v2 and v3. This matches the approach used by the activity service in PR #90. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Avoid conflict with other tests that use the same targetResource by using a dedicated API group for the SSA test. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The API server omits zero-value booleans (searchable: false), causing the assertion to fail. Use searchable: true for the third field instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
kevwilliams
approved these changes
Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's going on?
Server-side apply is broken for ResourceIndexPolicy resources. When something tries to
kubectl apply --server-side, it blows up with:This is the same bug the activity service ran into — the OpenAPI schema is missing type metadata that SSA relies on to track who owns which fields. The root cause is that
GetDefinitionNametransforms names in the wrong order, so the DefinitionNamer never finds the GVK extensions.Fixes #74
What's changing?
$refcallbacks for both v2 and v3kubectl apply --server-side🤖 Generated with Claude Code