Repository navigation
fix: pass task script via --user-data-file, not bare --user-data path (#13) - #15
Merged
Merged
Conversation
…#13) submit() passed the task script's temp-file path as the value of --user-data. spawn treats a --user-data value as INLINE user-data unless it starts with '@', so the literal path string was baked into the instance's user-data and the task script never executed. Use the dedicated --user-data-file flag, which reads the file's contents unconditionally. Extract the argv assembly into a package-scope buildLaunchCommand() and add a Spock guard test asserting the script is carried by --user-data-file (never a bare --user-data), plus the non-blocking wait flags and conditional --spot. Fixes #13
Merged
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.
Problem
SpawnTaskHandler.submit()passed the task script's temp-file path as the value of--user-data. spawn treats a--user-datavalue as inline user-data unless it starts with@(spawn cmd/launch.go:1938-1952), so the literal path string/tmp/nf-spawn-….shwas baked into the instance's user-data and the task script never executed.Fix
Use the dedicated
--user-data-fileflag, which reads the file's contents unconditionally. Extracted the argv assembly into a package-scopebuildLaunchCommand()so it's unit-testable.Test
Spock spec asserts the script is carried by
--user-data-file(and never a bare--user-data), plus the non-blocking--wait-for-running=false/--wait-for-ssh=falseflags and conditional--spot../gradlew testgreen (3 tests).Fixes #13
Note: this only makes the task script run. Tasks will still hang in PENDING until output staging lands (#14) — the script's results aren't returned to
task.workDir. #13 → #14 is the sequence.