-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an option to get the data as json output #7
Comments
I commented on this in #3 (comment) please see my reasoning for not providing this atm there. As said: We are happy to take a PR though :) |
Happy to provide that PR! I also want to use that output to group the data for all jobs in a workflow, so that means I would need to export it as JSON and then consolidate, which could be a next step. Let's first focus on getting that out as JSON then 😄. |
Proposed a solution for the total data in this PR. Can be replicated to making the data of the labelled step measurements (with task |
Looks good! I've left a review comment on the PR. |
…repository' attribute
…riting into GITHUB_OUTPUT
…ngle quotes because compared json contains double quotes itself
…ent available for laps, too
… that the lap measures are made available via output
…urrently the laps contain wrong label but the run succeeds
…olean string result to numeric and compare it
Hi @jreimone I will take a look at your PR and test it out, but one thing would be nice would be a flag for this functionality (I would have it off by default). Its a good functionality to have, but I think it should only export the json if the user requests it |
Thank you @dan-mm for testing. A flag can do but I also think that you just don't need to consume the output from the step. The json is only accessible if you add an extra step that explicitly consumes the output. You can see it in action in my provided example workflow. |
I agree that there is no need for a flag, it is just an output. If the user does not consume it, they will not see any difference at all. I would like to include the new output in the readme though, the |
… add section describing data consumption
@rajbos good point regarding the documentation 👍 I added it accordingly. |
Hi - I took a look at it today and it looks good! Also thank you for merging in my latest changes from main already :-D In terms of the flag, I agree that to the user they won't see any difference, however my main reason for wanting a flag is simply to save on energy. The JSON is still being created even if the user has no need for it, and as this is an action meant to promote carbon awareness, I would prefer that functionality that is extra be opt-in to save on cpu cycles. That being said, I do see the detriment of having a flag for every little thing in terms of usability, and as we already have our data-sending on by default (and one can make the argument that is also an extra functionality), I'm not sure where the line should be on this. So I will merge this in, and think more on if I want it hidden behind a flag, and can add that in myself later. |
feat(#7): add output to gha for retrieving measured data for total and for every lap as json
just a small note that escaped my original testing: The call to the scripts have to use ${{github.action_path}}/.github/scripts instead of ./.github/scripts -> otherwise the script won't be found when used in other repositories. I fixed that on the main branch |
Awesome! |
I would like to be able to group the data over time or across a team (maybe for an entire PR?). To be able to calculate things, I'd need to be able to get the data out as json first
I'd be happy to send in a PR for this!
The text was updated successfully, but these errors were encountered: