-
Notifications
You must be signed in to change notification settings - Fork 26
apply -f chain: side patches outside project root are rejected #184
Copy link
Copy link
Closed
Labels
area/applyIssues or PRs related to talm apply (preflight, COSI validation, ApplyConfiguration flow)Issues or PRs related to talm apply (preflight, COSI validation, ApplyConfiguration flow)area/commandsIssues or PRs related to pkg/commands (CLI subcommands, flag parsing, root detection)Issues or PRs related to pkg/commands (CLI subcommands, flag parsing, root detection)kind/featureCategorizes issue or PR as related to a new featureCategorizes issue or PR as related to a new featurepriority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to completeImportant over the long term, but may not be staffed and/or may need multiple releases to completetriage/acceptedIndicates an issue is ready to be actively worked onIndicates an issue is ready to be actively worked on
Metadata
Metadata
Assignees
Labels
area/applyIssues or PRs related to talm apply (preflight, COSI validation, ApplyConfiguration flow)Issues or PRs related to talm apply (preflight, COSI validation, ApplyConfiguration flow)area/commandsIssues or PRs related to pkg/commands (CLI subcommands, flag parsing, root detection)Issues or PRs related to pkg/commands (CLI subcommands, flag parsing, root detection)kind/featureCategorizes issue or PR as related to a new featureCategorizes issue or PR as related to a new featurepriority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to completeImportant over the long term, but may not be staffed and/or may need multiple releases to completetriage/acceptedIndicates an issue is ready to be actively worked onIndicates an issue is ready to be actively worked on
Problem
talm apply -f nodes/node.yaml -f /tmp/extra-patch.yamlrejects the second-fbecause talm runs project-root detection per file, and/tmp/extra-patch.yamlisn't inside a talm project. The chain pattern (one node file + one or more side patches) is a common Talos workflow.Reproduction
Output:
talosctl native upgrades this exact use case (apply multiple patches stacked); talm's per-file root detection precludes it.
Expected
The first
-f(typically the node file with modeline) establishes the project root. Subsequent-ffiles apply as patches relative to that root without their own root-detection check — they're patches, not standalone node bodies.pkg/commands/apply.gocallsDetectAndSetRootFromFilesearly, but iterates over each file independently. A reasonable change: detect root from the first file, error if it can't, then load subsequent files as plain patches relative to that root (or as absolute paths) without re-running the detection.Why this matters
Operators use the chain pattern for:
--mode=stagedtesting).Currently each side-patch needs to be moved into the project tree (or a symlink) for the apply to work. Friction with no operational reason.
Surfaced during the dev17 manual test plan exercise.