ci
ci copied to clipboard
Add 'runCmdOutput' output to GitHub Action/AzDO Task when using 'runCmd' input
Hello! This PR adds an output 'runCmdOutput' to the GitHub action containing whatever is output by the command specified in the 'runCmd' input. It also includes a bonus fix for tests that are installing Go, as the detection method that was being used for finding the latest version of the Go installer broke when 1.19 was added to https://go.dev/dl/.
If you need me to make any updates or fixes, please let me know.
Hi @natescherer - thanks for this PR!
I like the idea of being able to capture the output from the runCmd
. My concern is how well it will handle large outputs (I've had runs with over 10k lines of output) - do you know whether there are any limits around the size of action output values?
/test 5e5be8f
:robot: pr-bot :robot:
:runner: Running tests: https://github.com/devcontainers/ci/actions/runs/2954257443
(in response to this comment from @stuartleeks)
I just found this doc which says:
Outputs are Unicode strings, and can be a maximum of 1 MB. The total of all outputs in a workflow run can be a maximum of 50 MB.
I think it probably makes sense to limit the size of the runCmd
output that is captured.
It would also be good to include the runCmdOutput
for the Azure DevOps task, too :-)
Redid the main commit as I realized I missed updating action.yml.
Updates for AzDO and output length coming shortly.
Okay, that's limiting the GH Action output to < 1 MB done.
Also implemented runCmdOutput as an output variable for the AzDO task. I took my best crack at getting it right but, as far as I can tell, there's not really a way for me to test it myself?
I also limited its max output to 25k characters based on this, figuring that there could well be other large env vars in pipelines: https://stackoverflow.com/questions/56534338/what-is-the-maximum-length-of-a-variable-in-azure-pipelines
Let me know if there are any other changes needed!
/test 32541c5
:robot: pr-bot :robot:
:runner: Running tests: https://github.com/devcontainers/ci/actions/runs/2961497039
(in response to this comment from @stuartleeks)
Not really sure why that's failing on the git check? I ran the build-local.sh before making the commit.
Apologies - I think that there is a scenario where build-local.sh
runs a second time and produces changes, but I've not managed to track down the cause. In the mean time, if you run again and push then I can re-run the build and it should get past that point.
Also, the golang installations were fixed in a PR that got merged earlier so it may make sense to drop those changes in this PR to avoid conflicts.
Okay, I removed the commit with my golang fix, merged your latest commit, and added another commit after running build-local.sh again. Looks like all it did was change some double-quotes to single? Should be good to run the tests again.
Great - thanks!
/test 52b99e1
:robot: pr-bot :robot:
:runner: Running tests: https://github.com/devcontainers/ci/actions/runs/2972645407
(in response to this comment from @stuartleeks)
@natescherer - thanks again for the updates, tests are looking good. I see that the CLA check is showing that you haven't completed a CLA? I believe https://cla.microsoft.com/ is the link you need for that.
I've also added @chrmarti for a review 😄
According to that site a bot is supposed to post a link in a PR comment for me to sign, but that appears to not have happened? I don't see a way to initiate it myself.
According to that site a bot is supposed to post a link in a PR comment for me to sign, but that appears to not have happened? I don't see a way to initiate it myself.
@chrmarti - do you know how the CLA process usually works? Is there something missing in the setup for this repo?
We only recently added the CLA configuration to the org. Maybe the bot only shows up on new PRs. @natescherer Could you try creating a new PR (with the same changes)?
We only recently added the CLA configuration to the org. Maybe the bot only shows up on new PRs. @natescherer Could you try creating a new PR (with the same changes)?
You bet. Will do right now.
#165