Repository navigation
Conversation
Use the explicit atespace for apply and reject conflicting manifest values.
|
Adding the reproduction steps and before/after output. I ran both versions against fresh local AX gRPC servers using the in-memory store, with Save this as apiVersion: ax.io/v1alpha1
kind: Workspace
metadata:
name: atespace-example
spec: {}Before ( After ( |
Merge upstream main and adapt apply tests to immutable tasks.
|
Synced with the latest main and resolved the conflicts. Updated the tests for the new Task creation behavior. |
mayawang
left a comment
There was a problem hiding this comment.
Thanks @ktsoator, the before/after repro made this easy to check. It merges cleanly with current main and go test ./... passes. Filling a missing atespace from -a and rejecting a mismatch looks right.
One thought: in a multi-document file, a mismatch on document 3 fails after documents 1 and 2 are already applied. Checking every document's atespace before submitting anything would avoid a half-applied file. Happy for that to be a follow-up.
Heads-up that #411 (ax ssh --help and -- parsing) moves the same global flag loop in main() into a parseGlobalArgs helper, so whichever merges second will need a small rebase.
With a manifest that omits
metadata.atespace,ax apply -a team-a -f workspace.yamlsucceeds but creates the resource indefault. The CLI parses the flag but doesn't pass it torunApply.Pass the explicit atespace through to apply and use it before looking up or submitting Tasks, Workspaces, and Models. When no flag is given, the manifest's atespace is preserved and missing values still default to
default.This also rejects a resource when its manifest atespace differs from an explicitly supplied flag, including
-a default. Would you prefer a different precedence rule for that case?Added CLI integration tests covering resource placement, repeated apply, and conflicting atespaces, and documented the behavior. Verified with
make test,make build, andgo mod tidywith no module changes.Refs #414