Skip to content

fix: failing rdev updates #5972

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

Merged
merged 13 commits into from
Oct 13, 2023
Merged

fix: failing rdev updates #5972

merged 13 commits into from
Oct 13, 2023

Conversation

danieljhegeman
Copy link
Contributor

@danieljhegeman danieljhegeman commented Oct 13, 2023

Reason for Change

Changes

  • Delete previous image version from ECR for a given PR/stack, for all ECR repos, after successful happy push of a new image version.
  • Reintroduce unique sha-based image tags for all images.

Testing steps

  • Either list QA steps or reasoning you feel QA is unnecessary
  • Describe how you made sure to know that your changes worked. Should allow someone else to go verify your code without in depth knowledge.
  • "Unit tested only", "tested in rdev by a, b, c, verifying feature worked by... ", "manually ran pipeline locally with these results: ..."

Notes for Reviewer

@codecov
Copy link

codecov bot commented Oct 13, 2023

Codecov Report

Merging #5972 (205d2c9) into main (f375079) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #5972   +/-   ##
=======================================
  Coverage   85.83%   85.83%           
=======================================
  Files         196      196           
  Lines       15378    15378           
=======================================
  Hits        13200    13200           
  Misses       2178     2178           
Flag Coverage Δ
unittests 85.83% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@metakuni metakuni requested review from ebezzi and Bento007 October 13, 2023 15:23
| select(.imageTag==$STACK_NAME)][0].imageDigest'`)
done
echo "ECR_REPOS=${ECR_REPOS[@]}" >> $GITHUB_OUTPUT
echo "IMAGE_DIGESTS=${IMAGE_DIGESTS[@]}" >> $GITHUB_OUTPUT
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does this code run each repo on each matrix slice? Yes. But that doesn't matter. It's quick, and whenever an image digest is missing, it just ignores that. Deletion attempts of images that don't exist aren't a problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can update to be a bit more streamlined later, but that will require separating out into a different job and configuring outputs. Might consider making it its own workflow later. Minor tech debt for another day.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nvm, went ahead and fixed this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nvm, went ahead and fixed this

@@ -28,6 +28,36 @@ permissions:
pull-requests: write

jobs:
get_previous_image_digests:
Copy link
Member

Choose a reason for hiding this comment

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

Nitpick: the convention is to use dashes and not underscores.

Copy link
Contributor Author

@danieljhegeman danieljhegeman Oct 13, 2023

Choose a reason for hiding this comment

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

the problem is we need to access outputs by job name

Copy link
Member

Choose a reason for hiding this comment

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

Ah, right. That makes sense!

registry: ${{ secrets.ECR_REPO }}
- name: Get previous image digests for each repo
id: get_digests
run: |
Copy link
Member

Choose a reason for hiding this comment

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

This is potentially dangerous since if you add another component, we most certainly won't update the list. I don't think there is an easy way to parse them though.

@danieljhegeman danieljhegeman merged commit ac1cdd1 into main Oct 13, 2023
@danieljhegeman danieljhegeman deleted the dan/5971-delete-images branch October 13, 2023 18:50
Bento007 pushed a commit that referenced this pull request Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants