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 #13

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Nov 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.

This project's "Check Go Dependencies" workflow uses 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 workflow uploads 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 in addition to not uploading the artifact, the change in the "actions/upload-artifact" action's behavior also resulted in the workflow runs failing. For example:

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 workflow can once more upload the dependencies license metadata cache to a workflow artifact as needed. For example:

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


This is a sync from the upstream "template" in the assets repo: arduino/tooling-project-assets#513

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.

This project's "Check Go Dependencies" workflow uses 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 workflow uploads 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 in addition to not uploading the artifact, the change in the "actions/upload-artifact" action's behavior also
resulted in the workflow runs failing:

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 workflow 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: infrastructure Related to project infrastructure labels Nov 3, 2024
@per1234 per1234 self-assigned this Nov 3, 2024
@per1234 per1234 merged commit 394ff1e into arduino:main Nov 4, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants