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

Update Artifact Actions to use > v4.0.0 #77

Merged
merged 3 commits into from
May 8, 2024

Conversation

ashconnor
Copy link
Contributor

@ashconnor ashconnor commented Apr 1, 2024

Justification

update actions/download-artifact used by hashicorp/actions-docker-build

Summary

  • The current major version v3 of the artifact upload/download actions uses a deprecated version of NodeJS (v16). This commit updates the artifact actions to use v4 which includes a supported version of NodeJS (v20).

Quality

All changes to behavior should be accompanied by relevant tests which both document and protect it.

This PR includes:

  • New or updated tests which validate the new behavior. (Thank you!)
  • New or updated behavior which has been manually tested. (Please provide a link to relevant logs if this is the case.)
  • New or updated behavior which is not testable in a reasonable time frame. (Please ask for help if this is the case, more things are testable than we sometimes think!)
  • No new or changed behavior. (Just documentation, configuration, or pure refactoring.)

@hashicorp-cla
Copy link

hashicorp-cla commented Apr 1, 2024

CLA assistant check
All committers have signed the CLA.

@alvin-huang
Copy link
Contributor

We will need to update https://github.com/hashicorp/actions-docker-build/blob/main/.github/workflows/test.yml#L255 for the tests too :)

@ashconnor ashconnor added the enhancement New feature or request label Apr 1, 2024
@ashconnor ashconnor self-assigned this Apr 1, 2024
@ashconnor ashconnor changed the title WIP: Update Artifact Actions to use > v4.0.0 Update Artifact Actions to use > v4.0.0 Apr 1, 2024
@ashconnor ashconnor force-pushed the ashley/update-artifact-actions branch from 6a32ec4 to f818ae0 Compare April 1, 2024 23:37
@ashconnor
Copy link
Contributor Author

Parallel overwrite: true is causing issues as described in this issue

tl;dr: overwrite deletes the artifact and reuploads it. When done in parallel this can result in a 409 conflict.

- The current major version (v3) of the artifact actions uses a
  deprecated version of NodeJS v16. This commit updates the artifact
  actions to use v4 which includes a supported version of NodeJS v20.
- Update test action references
- Set overwrite to true to mimic previous behavior
- Update example workflow
@ashconnor ashconnor force-pushed the ashley/update-artifact-actions branch from f818ae0 to 196f312 Compare April 2, 2024 17:02
@glennsarti
Copy link

Is it possible to get this PR merged and released soon? We don't have long until node16 support is dropped (may 13)

…e and may not actually matter. ideal-enigma doesn't care - need to check with v0 code too)

remove debug statements
action.yml Show resolved Hide resolved
@sarahethompson sarahethompson force-pushed the ashley/update-artifact-actions branch from 164aff3 to 3802549 Compare May 8, 2024 17:38
@sarahethompson sarahethompson marked this pull request as ready for review May 8, 2024 17:48
@sarahethompson sarahethompson requested review from alvin-huang, a team, aaron-lane and shore and removed request for a team and aaron-lane May 8, 2024 17:48
action.yml Show resolved Hide resolved
action.yml Outdated
env:
# Add _redhat if this is a redhat call.
REDHAT_SUFFIX: ${{ inputs.redhat_tag && '_redhat' || '' }}
RANDOM: "${{ env.RANDOM_STRING }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this if we don't use it?

with:
path: example/${{ env.product_name }}_${{ env.product_version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
name: ${{ env.product_name }}_${{ env.product_version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
if-no-files-found: error
overwrite: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need the overwrite here?

@sarahethompson sarahethompson merged commit 11d43ef into main May 8, 2024
28 checks passed
@sarahethompson sarahethompson deleted the ashley/update-artifact-actions branch May 8, 2024 18:26
@glennsarti
Copy link

Wohoo! Thankyou

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants