Skip to content

Conversation

@fourierrr
Copy link
Contributor

…e was found in the database during the dup convert process.

What this PR does / why we need it:

Fixed the issue that a new output tag would not be uploaded if a cache was found in the database during the dup convert process.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #310

Please check the following list:

  • Does the affected code have corresponding tests, e.g. unit test, E2E test?
  • Does this change require a documentation update?
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have an appropriate license header?

@liulanzheng liulanzheng added the ok-to-test Pull request is ok to run ci test label Oct 22, 2024
@WaberZhuang
Copy link
Contributor

WaberZhuang commented Oct 22, 2024

Thanks for the PR, please add your signature to the commit to pass the project check.

@estebanreyl Please take a look at this.

}
// ensure that output tag is pushed even if the manifest is already converted and found in registry
// push output tag only if the pusher is tagPusher
if err := uploadBytes(ctx, b.pusher, convertedDesc, cbuf); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Have you tested this out? It is my expectation that this will fail to push as you are serializing the descriptor rather than the manifest itself.

Copy link
Member

Choose a reason for hiding this comment

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

I was working on this in parallel it seems, so this shows what I mean: 2ac3a12.

…e was found in the database during the dup convert process.

Signed-off-by: fourierrr <fourierrr@gmail.com>
@fourierrr
Copy link
Contributor Author

@estebanreyl sorry,i found my mistake yesterday night😂,and repush just now.

I found that your approach to the fix is similar to mine, but yours is more intuitive and elegant. I will close this PR.

@fourierrr fourierrr closed this Oct 23, 2024
@estebanreyl
Copy link
Member

@fourierrr sounds good. Thanks again for the PR and opening the issue, I should've opened it up as soon as we were aware rather than waiting to avoid the double work. I'll try to do better in this regard moving forward. Anyway, I greatly appreciate your proactivity and contributions to the project. I will try to open a PR with my changes tomorrow, I think the changes are functional but need to add some testing and do some additional validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Pull request is ok to run ci test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

new output tag can not be uploaded if a cache was found in the database during the dup transformation process

4 participants