You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're still struggling with concurrent Danger runs, even after the changes in #530
We get a little further this time, but somehow either Danger JS or Danger Swift is trying to write to the same location. I've run a test with two pipelines on the mac, with debug enabled.
The first fails:
2022-09-16T13:26:35.491Z danger:process_runner Preparing to run: .build/debug/danger-swift,runner,/snapshot/danger-js/distribution/commands/danger-ci.js,--process,.build/debug/danger-swift,--passURLForDSL,-i,danger_ci,-f,--cwd,../
2022-09-16T13:26:35.491Z danger:runDangerSubprocess Running sub-process: danger-swift - runner,/snapshot/danger-js/distribution/commands/danger-ci.js,--process,.build/debug/danger-swift,--passURLForDSL,-i,danger_ci,-f,--cwd,../
2022-09-16T13:26:35.500Z danger:runDangerSubprocess Started passing in STDIN via the URL: danger://dsl//var/folders/0h/c4gthkj13sz3hb1z4fwpnd3c0000gp/T/danger-dsl.json
2022-09-16T13:26:35.500Z danger:runDangerSubprocess Passed DSL in via STDIN
Ran with: /var/folders/0h/c4gthkj13sz3hb1z4fwpnd3c0000gp/T/danger/8B52C17F-7357-4BF2-BC85-5FB55F2448AC/_tmp_dangerfile.swift runner /snapshot/danger-js/distribution/commands/danger-ci.js --process .build/debug/danger-swift --passURLForDSL -i danger_ci -f --cwd ../ /var/folders/0h/c4gthkj13sz3hb1z4fwpnd3c0000gp/T/danger-dsl.json /var/folders/0h/c4gthkj13sz3hb1z4fwpnd3c0000gp/T/danger/8B52C17F-7357-4BF2-BC85-5FB55F2448AC/danger-response.json
ERROR: could not find DSL JSON at path: /var/folders/0h/c4gthkj13sz3hb1z4fwpnd3c0000gp/T/danger-dsl.json
Launching Danger Swift runner (v3.14.0)
Got URL for JSON: /var/folders/0h/c4gthkj13sz3hb1z4fwpnd3c0000gp/T/danger-dsl.json
Created a temporary file for the Dangerfile DSL at: /var/folders/0h/c4gthkj13sz3hb1z4fwpnd3c0000gp/T/danger-dsl.json
Running Dangerfile at: Dangerfile.swift
Preparing to compile
Running: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift --driver-mode=swift -L /private/tmp/gitlab-runner-builds/245930/Danger/.build/debug -I /private/tmp/gitlab-runner-builds/245930/Danger/.build/debug -lDangerDeps /var/folders/0h/c4gthkj13sz3hb1z4fwpnd3c0000gp/T/danger/8B52C17F-7357-4BF2-BC85-5FB55F2448AC/_tmp_dangerfile.swift runner /snapshot/danger-js/distribution/commands/danger-ci.js --process .build/debug/danger-swift --passURLForDSL -i danger_ci -f --cwd ../ /var/folders/0h/c4gthkj13sz3hb1z4fwpnd3c0000gp/T/danger-dsl.json /var/folders/0h/c4gthkj13sz3hb1z4fwpnd3c0000gp/T/danger/8B52C17F-7357-4BF2-BC85-5FB55F2448AC/danger-response.json
Completed evaluation
ERROR: Dangerfile eval failed at Dangerfile.swift
ERROR: Could not get the results JSON file at /var/folders/0h/c4gthkj13sz3hb1z4fwpnd3c0000gp/T/danger/8B52C17F-7357-4BF2-BC85-5FB55F2448AC/danger-response.json
While the second completes fine:
2022-09-16T13:26:35.135Z danger:process_runner Preparing to run: .build/debug/danger-swift,runner,/snapshot/danger-js/distribution/commands/danger-ci.js,--process,.build/debug/danger-swift,--passURLForDSL,-i,danger_ci,-f,--cwd,../
2022-09-16T13:26:35.135Z danger:runDangerSubprocess Running sub-process: danger-swift - runner,/snapshot/danger-js/distribution/commands/danger-ci.js,--process,.build/debug/danger-swift,--passURLForDSL,-i,danger_ci,-f,--cwd,../
2022-09-16T13:26:35.162Z danger:runDangerSubprocess Started passing in STDIN via the URL: danger://dsl//var/folders/0h/c4gthkj13sz3hb1z4fwpnd3c0000gp/T/danger-dsl.json
2022-09-16T13:26:35.162Z danger:runDangerSubprocess Passed DSL in via STDIN
Ran with: /var/folders/0h/c4gthkj13sz3hb1z4fwpnd3c0000gp/T/danger/C31A4E15-B2D0-4622-AA41-EC29822D0386/_tmp_dangerfile.swift runner /snapshot/danger-js/distribution/commands/danger-ci.js --process .build/debug/danger-swift --passURLForDSL -i danger_ci -f --cwd ../ /var/folders/0h/c4gthkj13sz3hb1z4fwpnd3c0000gp/T/danger-dsl.json /var/folders/0h/c4gthkj13sz3hb1z4fwpnd3c0000gp/T/danger/C31A4E15-B2D0-4622-AA41-EC29822D0386/danger-response.json
Decoding the DSL into Swift types
Setting up to dump results
Sending results back to Danger
Sending results back to Danger
2022-09-16T13:26:59.330Z danger:runDangerSubprocess Got JSON URL from STDOUT, results are at:
danger-results://var/folders/0h/c4gthkj13sz3hb1z4fwpnd3c0000gp/T/danger/C31A4E15-B2D0-4622-AA41-EC29822D0386/danger-response.json
Launching Danger Swift runner (v3.14.0)
Notice theres a URL which is identical in both runs: danger://dsl//var/folders/0h/c4gthkj13sz3hb1z4fwpnd3c0000gp/T/danger-dsl.json
I'm happy to look into this, but I'm not entirely sure if this a problem with Danger JS or Swift. If you wouldn't mind taking a look and giving me a clue, I'd get cracking.
The text was updated successfully, but these errors were encountered:
constsendDSLToSubprocess=()=>{if(exec.options.passURLForDSL){constresultsPath=join(tmpdir(),"danger-dsl.json")writeFileSync(resultsPath,dslJSONString,"utf8")consturl=`danger://dsl/${resultsPath}`d(`Started passing in STDIN via the URL: ${url}`)child.stdin.write(url)child.stdin.end()}else{d(`Started passing in STDIN`)child.stdin.write(dslJSONString)child.stdin.end()}d(`Passed DSL in via STDIN`)}
We're still struggling with concurrent Danger runs, even after the changes in #530
We get a little further this time, but somehow either Danger JS or Danger Swift is trying to write to the same location. I've run a test with two pipelines on the mac, with debug enabled.
The first fails:
While the second completes fine:
Notice theres a URL which is identical in both runs:
danger://dsl//var/folders/0h/c4gthkj13sz3hb1z4fwpnd3c0000gp/T/danger-dsl.json
I'm happy to look into this, but I'm not entirely sure if this a problem with Danger JS or Swift. If you wouldn't mind taking a look and giving me a clue, I'd get cracking.
The text was updated successfully, but these errors were encountered: