-
Notifications
You must be signed in to change notification settings - Fork 2
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
fix: add a go-test option to upload coverage artifacts #316
base: main
Are you sure you want to change the base?
Conversation
i think this is good to be optional. i'm not sure what is currently using this functionality and should we need to take action? |
This is to fix a breaking change in the v4 artifact upload action. It requires unique names for uploads, but if the action is called multiple times in a run it will hit this error. Options are have a unique name per run, or simply not do the upload. I expect a future action that simply does test coverage will would be a simpler option if needed.
@@ -12,6 +12,13 @@ on: | |||
type: string | |||
description: | | |||
extra args to pass `go test` | |||
upload: | |||
required: false | |||
default: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: this is a breaking change. Current behavior is true
. I doubt anyone's workflow would break, but I don't know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it's breaking change to stop the breaking change that stopped what was working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is all about the test coverage output that goes at the bottom of the actions summary page, it isn't an artifact that we store it's more of an overview. But because we have actions that call this multiple times then it hits this bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as a compromise point can @ozym make the default true and pass in false in the workflows that have impacted your work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as a compromise point can @ozym make the default true and pass in false in the workflows that have impacted your work?
oh yeah, i think this is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it's breaking change to stop the breaking change that stopped what was working.
If this feature is needed to fixed what stopped working, sure. I can spend time figuring out what broke, how I could have caught it when doing the PR, and making the overwrite
flag work the way we want it to work, at a later point.
FWIW: when creating unique names, I've used ${{ github.run_id }}${{ github.run_attempt }}
as the disambiguation piece of information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem for setting it to true is that it will have a much wider impact, it can be done obviously. But would need to be added to all the actions that embed this action.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ozym setting it to false
by default is ok. The "copy to s3" work needs to be revisited anyway due to the maximum reusable nesting limit of 4, so we can deal with the "optional" presence of the artifact in the rework.
@wilsonjord not sure the overwrite flag is working in that case. |
This is the error that's trying to be fixed.
|
From the migration doc (https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md):
I'm almost certain that I tested this behavior as well; do you mind linking the workflow that produced the error? |
https://github.com/GeoNet/field/actions/runs/11563929821/job/32188174573 |
The problem isn't that it has been overwritten, it's because there are now two outputs with the same name being attempted (two different parts of the run, i.e. each with it's overwritten output). |
I've been reading here: actions/upload-artifact#506 |
@ozym To keep behavior as close as possible to previous If |
This is to fix a breaking change in the v4 artifact upload action. It requires unique names for uploads, but if the action is called multiple times in a run it will hit this error. Options are have a unique name per run, or simply not do the upload. I expect a future action that simply does test coverage will would be a simpler option if needed.