Skip to content
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

Configure actions/upload-artifact action to upload required hidden files #513

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Sep 3, 2024

A breaking change was made in the 3.2.0 release of the actions/upload-artifact action (actions/upload-artifact#602), without doing a major version bump as would be done in a responsibly maintained project. The action now defaults to not uploading "hidden" files.

The "Check Go Dependencies" and "Check npm Dependencies" templates use the Licensed tool to check for incompatible dependency licenses. The dependencies license metadata cache used by Licensed is stored in a folder named .licensed.

In order to facilitate updates, the workflows of these templates upload the generated dependencies license metadata cache as a workflow artifact when the current cache is found to be outdated.

The . at the start of the .licensed folder name causes it to now not be uploaded to the workflow artifact. In order to catch such problems, the workflow configures the actions/upload-artifact action to fail if no files were uploaded. So the workflow now fails:

https://github.com/arduino/setup-task/actions/runs/10682280265/job/29607763024?pr=1043#step:8:8

Error: No files were found with the provided path: .licenses/. No artifacts will be uploaded.

The problem is fixed by disabling the actions/upload-artifact action's new behavior via the include-hidden-files input.

After this change, the workflows can once more upload the dependencies license metadata cache to a workflow artifact as needed:

https://github.com/arduino/setup-task/actions/runs/10688155948/job/29627399765?pr=1043#step:8:22

A breaking change was made in the 3.2.1 release of the "actions/upload-artifact" action, without doing a major version
bump as would be done in a responsibly maintained project. The action now defaults to not uploading "hidden" files.

The "Check Go Dependencies" and "Check npm Dependencies" templates use the "Licensed" tool to check for incompatible
dependency licenses. The dependencies license metadata cache used by Licensed is stored in a folder named `.licensed`.

In order to facilitate updates, the workflows of these templates upload the generated dependencies license metadata
cache as a workflow artifact when the current cache is found to be outdated.

The `.` at the start of the `.licensed` folder name causes it to now not be uploaded to the workflow artifact. In order
to catch such problems, the workflow configures the "actions/upload-artifact" action to fail if no files were uploaded.
So the workflow now fails:

Error: No files were found with the provided path: .licenses/. No artifacts will be uploaded.

The problem is fixed by disabling the "actions/upload-artifact" action's new behavior via the `include-hidden-files`
input. After this change, the workflows can once more upload the dependencies license metadata cache to a workflow
artifact as needed
@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Sep 3, 2024
@per1234 per1234 self-assigned this Sep 3, 2024
@per1234 per1234 merged commit edde820 into arduino:main Sep 3, 2024
16 checks passed
@per1234 per1234 deleted the include-hidden-files branch September 3, 2024 18:39
This was referenced Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant