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

fix: support ocischema.DeserializedImageIndex in registry client #617

Conversation

jessebye
Copy link
Contributor

Copies the logic from manifestlist.DeserializedManifestList to also handle ocischema.DeserializedImageIndex (which ECR returns for certain types of images).

@codecov-commenter
Copy link

codecov-commenter commented Aug 30, 2023

Codecov Report

Merging #617 (1a136a2) into master (d5a8f94) will decrease coverage by 0.29%.
Report is 3 commits behind head on master.
The diff coverage is 20.33%.

@@            Coverage Diff             @@
##           master     #617      +/-   ##
==========================================
- Coverage   65.63%   65.35%   -0.29%     
==========================================
  Files          22       22              
  Lines        2069     2084      +15     
==========================================
+ Hits         1358     1362       +4     
- Misses        577      588      +11     
  Partials      134      134              
Files Changed Coverage Δ
pkg/argocd/git.go 66.82% <0.00%> (ø)
pkg/registry/client.go 12.75% <4.44%> (-0.76%) ⬇️
pkg/argocd/gitcreds.go 76.19% <83.33%> (ø)
pkg/argocd/update.go 66.54% <83.33%> (+0.49%) ⬆️

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

@jessebye jessebye force-pushed the ocischema-deserialized-image-index branch from b207c65 to 3b3e0f5 Compare August 30, 2023 18:32
@jessebye
Copy link
Contributor Author

@jannfis if you have a moment to review, this resolves an issue with using ECR and ARM64 images.

@jannfis
Copy link
Contributor

jannfis commented Aug 30, 2023

Thank you @jessebye , appreciate that you are tackling this. I'm not sure if I'm good with all that duplicated code.

Would you think it's possible to come up with code that's not as redundant?

@jessebye
Copy link
Contributor Author

@jannfis I was not happy with that either. I think it could be refactored a bit to eliminate the duplication. Also I think there is a bug, it was updating one parameter but not pinning the digest correctly - seems there may be another place I need to update for it to work. I'll take another look and let you know when it's ready for review!

suzaku and others added 21 commits September 1, 2023 12:50
Signed-off-by: satoru <satorulogic@gmail.com>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>
Signed-off-by: satoru <satorulogic@gmail.com>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>
* ci: Fix codegen

Signed-off-by: jannfis <jann@mistrust.net>

* Fix tar call

Signed-off-by: jannfis <jann@mistrust.net>

---------

Signed-off-by: jannfis <jann@mistrust.net>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>
…roj-labs#573)

* Fix original override not respected

Signed-off-by: KS. Yim <ks.yim@linecorp.com>

* Add writeOverrides unittest

Signed-off-by: KS. Yim <ks.yim@linecorp.com>

* Add helm override commit test

Signed-off-by: KS. Yim <ks.yim@linecorp.com>

* lint

Signed-off-by: KS. Yim <ks.yim@linecorp.com>

* fix shadowed err

Signed-off-by: KS. Yim <ks.yim@linecorp.com>

---------

Signed-off-by: KS. Yim <ks.yim@linecorp.com>
Co-authored-by: KS. Yim <ks.yim@linecorp.com>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>
…rgoproj-labs#594)

* fix: update go mods to use newer argocd app definition

Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

* fix deps and tests

Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

* fix spelling

Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

---------

Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>
…abs#599)

Signed-off-by: Viacheslav Sychov <viacheslav.sychov@gmail.com>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>
…labs#600)

makes argocd-image-updater compatible with restricted Pod Security Standard

Signed-off-by: Takeo Sawada <myc.monad@gmail.com>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>
…ion (argoproj-labs#424)

* Add possibility to specify write-back GIT repository as annotation.

Signed-off-by: flozzone <flozzone@gmail.com>

* Update golangci-lint to 1.52.2.

Signed-off-by: flozzone <flozzone@gmail.com>

* Replace deprecated golangci linters with 'unused' linter.

Signed-off-by: flozzone <flozzone@gmail.com>

* Fix Goimport issues.

Signed-off-by: flozzone <flozzone@gmail.com>

---------

Signed-off-by: flozzone <flozzone@gmail.com>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>
@jessebye jessebye force-pushed the ocischema-deserialized-image-index branch from 177f3a8 to 4593277 Compare September 1, 2023 19:51
jessebye and others added 3 commits September 1, 2023 12:52
Signed-off-by: satoru <satorulogic@gmail.com>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

docs: Fixed typo (argoproj-labs#589)

Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

chore: Preallocate space for slices with known size (argoproj-labs#575)

Signed-off-by: satoru <satorulogic@gmail.com>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

ci: Fix codegen and update kustomize to post-2.0 (argoproj-labs#590)

* ci: Fix codegen

Signed-off-by: jannfis <jann@mistrust.net>

* Fix tar call

Signed-off-by: jannfis <jann@mistrust.net>

---------

Signed-off-by: jannfis <jann@mistrust.net>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

feat: Respect original parameter overrides with git write-back (argoproj-labs#573)

* Fix original override not respected

Signed-off-by: KS. Yim <ks.yim@linecorp.com>

* Add writeOverrides unittest

Signed-off-by: KS. Yim <ks.yim@linecorp.com>

* Add helm override commit test

Signed-off-by: KS. Yim <ks.yim@linecorp.com>

* lint

Signed-off-by: KS. Yim <ks.yim@linecorp.com>

* fix shadowed err

Signed-off-by: KS. Yim <ks.yim@linecorp.com>

---------

Signed-off-by: KS. Yim <ks.yim@linecorp.com>
Co-authored-by: KS. Yim <ks.yim@linecorp.com>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

chore: Update to newer argocd version for better API compatibility (argoproj-labs#594)

* fix: update go mods to use newer argocd app definition

Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

* fix deps and tests

Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

* fix spelling

Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

---------

Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

chore(deps): upgrade dependencies for fix vulnerabilities (argoproj-labs#599)

Signed-off-by: Viacheslav Sychov <viacheslav.sychov@gmail.com>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

fix: tighten securityContext to comply with restricted PSS (argoproj-labs#600)

makes argocd-image-updater compatible with restricted Pod Security Standard

Signed-off-by: Takeo Sawada <myc.monad@gmail.com>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

feat: Add possibility to specify write-back GIT repository as annotation (argoproj-labs#424)

* Add possibility to specify write-back GIT repository as annotation.

Signed-off-by: flozzone <flozzone@gmail.com>

* Update golangci-lint to 1.52.2.

Signed-off-by: flozzone <flozzone@gmail.com>

* Replace deprecated golangci linters with 'unused' linter.

Signed-off-by: flozzone <flozzone@gmail.com>

* Fix Goimport issues.

Signed-off-by: flozzone <flozzone@gmail.com>

---------

Signed-off-by: flozzone <flozzone@gmail.com>
Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

fix: support ocischema.DeserializedImageIndex in registry client

Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

fix test

Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

fix: update go mods to use newer argocd app definition

Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

fix deps and tests

Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

merge master

Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

fix go mods

Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

refactor: use shared function to reduce duplication

Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

fix: update go mods to use newer argocd app definition

Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

fix deps and tests

Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

merge master

Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

fix go mods

Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

Fix after rebase

Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

chore: Fix spell checking config (argoproj-labs#577)

Signed-off-by: satoru <satorulogic@gmail.com>

docs: Fixed typo (argoproj-labs#589)

chore: Preallocate space for slices with known size (argoproj-labs#575)

Signed-off-by: satoru <satorulogic@gmail.com>

ci: Fix codegen and update kustomize to post-2.0 (argoproj-labs#590)

* ci: Fix codegen

Signed-off-by: jannfis <jann@mistrust.net>

* Fix tar call

Signed-off-by: jannfis <jann@mistrust.net>

---------

Signed-off-by: jannfis <jann@mistrust.net>

feat: Respect original parameter overrides with git write-back (argoproj-labs#573)

* Fix original override not respected

Signed-off-by: KS. Yim <ks.yim@linecorp.com>

* Add writeOverrides unittest

Signed-off-by: KS. Yim <ks.yim@linecorp.com>

* Add helm override commit test

Signed-off-by: KS. Yim <ks.yim@linecorp.com>

* lint

Signed-off-by: KS. Yim <ks.yim@linecorp.com>

* fix shadowed err

Signed-off-by: KS. Yim <ks.yim@linecorp.com>

---------

Signed-off-by: KS. Yim <ks.yim@linecorp.com>
Co-authored-by: KS. Yim <ks.yim@linecorp.com>

chore: Update to newer argocd version for better API compatibility (argoproj-labs#594)

* fix: update go mods to use newer argocd app definition

Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

* fix deps and tests

Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

* fix spelling

Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

---------

Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>

chore(deps): upgrade dependencies for fix vulnerabilities (argoproj-labs#599)

Signed-off-by: Viacheslav Sychov <viacheslav.sychov@gmail.com>

fix: tighten securityContext to comply with restricted PSS (argoproj-labs#600)

makes argocd-image-updater compatible with restricted Pod Security Standard

Signed-off-by: Takeo Sawada <myc.monad@gmail.com>
…/jessebye/argocd-image-updater into ocischema-deserialized-image-index
…/jessebye/argocd-image-updater into ocischema-deserialized-image-index
@jessebye jessebye closed this Sep 1, 2023
@jessebye
Copy link
Contributor Author

jessebye commented Sep 1, 2023

botched the commits, going to start a fresh branch + PR for this

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.

None yet

9 participants