fix(#212): space separated inputs are now supported#213
Conversation
|
@p1-dta Thanks for taking this on. I ran the PR template end-to-end against a sandbox project ( Live runs against the PR templateThree pipelines, same component reference ( A. Defaults only, no overrides→ https://gitlab.com/getplumber/examples/go-build-test-compliant/-/jobs/14627158012 No spaces in any filename. Plain default usage. Exit 127, all four reports missing. B. The original #212 scenario reproduced→ https://gitlab.com/getplumber/examples/go-build-test-compliant/-/jobs/14627249681 Inputs: output_file: "plumber report.json"Same warning fingerprint as the original bug report. The other three artifacts are also missing despite their defaults being untouched, which tells me the regression is per value-flag, not per overridden input. C. All value-flag inputs explicitly empty→ https://gitlab.com/getplumber/examples/go-build-test-compliant/-/jobs/14627307256 Inputs: output_file: ""
pbom_file: ""
pbom_cyclonedx_file: ""
glsast_file: ""Exit 0. This is the only input shape I found where the PR's template runs cleanly, and it's the shape where every report artifact is disabled. What I think is happeningThe image is OUTPUT_FLAG=--output "plumber-report.json"parses as a transient assignment ( The deeper issue: the actual root cause of #212 wasn't the assignment form, it was the unquoted Pipeline C confirms this: when every value flag is empty, the A direction worth consideringThe shape that fixes both the assignment and the call site in POSIX (so it works under ash without bash, which the image doesn't ship) is the positional accumulator: set --
[ -n "$[[ inputs.output_file ]]" ] && set -- "$@" --output "$[[ inputs.output_file ]]"
[ -n "$[[ inputs.pbom_file ]]" ] && set -- "$@" --pbom "$[[ inputs.pbom_file ]]"
[ "$[[ inputs.verbose ]]" = "true" ] && set -- "$@" --verbose
# …
/plumber analyze --gitlab-url "$[[ inputs.server_url ]]" ... "$@"Populated flags get appended as distinct argv entries that One meta-point on test coverage
Happy to be wrong if you can share a green pipeline using the PR template with non-empty defaults. Otherwise, want to push a follow-up using |
847e965 to
4a802ed
Compare
Hi, thanks for the feedback. I replicated your errors, you are correct. I am confused as I remember doing some testing and it was working, but maybe it was an already better version of the template ? Since the plumber CICD doesn't check the template, I have multiple other repo for testing and I might have confuse which version I wanted to use. Your suggestion to fix all issues what my original solution but I looked for an intermediary step, trying to first address the quote error before performing a refactoring for readability. Then, I got confuse in my testing. I updated the MR with my refactoring code, originally planned for a subsequent MR, and from my own testing, this one should works. |
4a802ed to
ce36bee
Compare
|
@p1-dta Done reviewing. Rebased and resolved a conflict with main. I tested on the same project as I did before - all the scenarios and it works. Thanks for the PR. |
See issue #212
I took the liberty to remove unnecessary quotes. Only required quotes are left so all quotes are meaningful and purposefully placed.