uclahs-cds / tool-Nextflow-action

GNU General Public License v2.0
0 stars 0 forks source link

Failures while running tests are reported as branch being out-of-date #35

Open nwiltsie opened 6 months ago

nwiltsie commented 6 months ago

From https://github.com/uclahs-cds/pipeline-call-mtSNV/pull/165#issuecomment-2065479844.

The Nextflow run died due to a missing file, and the actions/upload-artifact step complained that there were no files to upload.

In the summary step, the command to check if files changed between the merge commit and the branch tip failed - not because there were differences, but because there were no files to be checked:

2024-04-18T23:24:31.6649211Z [command]/usr/bin/git ls-files --modified -- configtest*.json **/configtest*.json
2024-04-18T23:24:31.6802962Z [command]/usr/bin/git diff-tree HEAD cc2bcea5d27ae44814dc88f8f97d8dac104f680b --exit-code --name-status -- 
2024-04-18T23:24:31.6843427Z fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths
2024-04-18T23:24:32.4297973Z ##[error]Need to merge tests

Weirdly I can't replicate that error locally - there's something odd going on with that.

$ git diff-tree HEAD cc2bcea5d27ae44814dc88f8f97d8dac104f680b --exit-code --name-status -- && echo "No failure"
No failure
nwiltsie commented 6 months ago

Ah, nevermind, the workflow is explicitly passing an empty string - nothing odd going on with that.

$ git diff-tree HEAD cc2bcea5d27ae44814dc88f8f97d8dac104f680b --exit-code --name-status -- ""
fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths