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

Use unique artifact names in CI workflow #1852

Merged
merged 1 commit into from
Jun 18, 2024
Merged

Conversation

cartermckinnon
Copy link
Member

@cartermckinnon cartermckinnon commented Jun 18, 2024

Description of changes:

#1850 updated us to 4.x of the upload-artifact action, which requires unique artifact names across an entire workflow.

Ex failure: https://github.com/awslabs/amazon-eks-ami/actions/runs/9568957937/job/26380369916

Error: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@cartermckinnon cartermckinnon added the changelog/exclude Exclude this PR from future changelog entries. label Jun 18, 2024
@@ -33,5 +33,5 @@ runs:
echo "ami_id=$(jq -r .builds[0].artifact_id "${AMI_NAME}-manifest.json" | cut -d ':' -f 2)" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # 4.3.3
with:
name: version-info
name: version-info-${{ inputs.k8s_version }}-${{ inputs.os_distro }}
Copy link
Member

Choose a reason for hiding this comment

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

lgtm, i just want to ask if this is enough or do people usually use a generated uuid or smth

Copy link
Member Author

Choose a reason for hiding this comment

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

We could tack on the build_id, git_sha, etc. but this is sufficient for our workflows

@cartermckinnon cartermckinnon merged commit 935207e into main Jun 18, 2024
10 checks passed
@cartermckinnon cartermckinnon deleted the unique-artifact-name branch June 18, 2024 18:01
mebays pushed a commit to mebays/amazon-eks-ami that referenced this pull request Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/exclude Exclude this PR from future changelog entries.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants