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 manifest unknown error code as specs #16516

Closed

Conversation

alexmanno
Copy link

Issue link: #16515

Fix error code for manifest unknown following docker api specs, NOT_FOUND error code is not supported.
Ref: https://docs.docker.com/registry/spec/api/#errors-2

This error code brokes docker-compose pull --ignore-pull-failures when images are not available on the registry (docker agent expects MANIFEST_UNKNOWN error instead).

@alexmanno alexmanno force-pushed the fix_manifest_unknown_error_code branch from a1cd8ac to 30ed65f Compare March 11, 2022 17:10
Copy link
Member

@Vad1mo Vad1mo left a comment

Choose a reason for hiding this comment

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

any idea where it might impact existing users, who are no expecting NOT_FOUND

@alexmanno
Copy link
Author

alexmanno commented Mar 23, 2022

@Vad1mo thank you for comment.
As described in #16515 this unexpected error code breaks tools like docker-compose or in general every tool that parse this error code when it pull images from the registry.

@codecov
Copy link

codecov bot commented Mar 30, 2022

Codecov Report

Merging #16516 (42928c5) into main (f4f80ca) will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #16516      +/-   ##
==========================================
- Coverage   67.14%   67.14%   -0.01%     
==========================================
  Files         971      971              
  Lines      105169   105169              
  Branches     2579     2579              
==========================================
- Hits        70618    70612       -6     
- Misses      30809    30815       +6     
  Partials     3742     3742              
Flag Coverage Δ
unittests 67.14% <ø> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
src/lib/errors/const.go 91.66% <ø> (ø)
src/controller/event/topic.go 0.00% <0.00%> (-6.48%) ⬇️
...es/vulnerability/vulnerability-config.component.ts 58.51% <0.00%> (-4.45%) ⬇️
src/common/utils/passports.go 86.27% <0.00%> (-3.93%) ⬇️
...dashboard/schedule-card/schedule-card.component.ts 43.28% <0.00%> (-2.99%) ⬇️
src/jobservice/runner/redis.go 71.18% <0.00%> (+4.51%) ⬆️
...-job/gc-page/gc/gc-history/gc-history.component.ts 46.51% <0.00%> (+5.81%) ⬆️

Signed-off-by: Alessandro Manno <alessandro.manno@facile.it>
Signed-off-by: Alessandro Manno <alessandro.manno@facile.it>
@alexmanno alexmanno force-pushed the fix_manifest_unknown_error_code branch from f8d8808 to 41d3c7e Compare March 30, 2022 07:18
@alexmanno
Copy link
Author

@Vad1mo There were some failed tests, I fixed them

@Vad1mo Vad1mo self-requested a review April 5, 2022 06:42
@alexmanno
Copy link
Author

@Vad1mo do you have any news on this topic?

@Morlackx
Copy link

Any ETA about this pr? I'm waiting for this one too 😭

@AllForNothing AllForNothing removed their request for review May 31, 2022 02:05
@Morlackx
Copy link

Any news? 🙏

@Vad1mo
Copy link
Member

Vad1mo commented Jun 16, 2022

@goharbor/maintainers can we get some 👀 on that issue?

@esantoro
Copy link

Hello, any news on this PR ?

We're suffering from this problem too and we'd love to see it merged.

@AllForNothing AllForNothing removed their assignment Jul 28, 2022
@github-actions
Copy link

This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days.

@github-actions github-actions bot added the Stale label Sep 26, 2022
@github-actions
Copy link

This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days.

@github-actions github-actions bot added the Stale label Nov 27, 2022
@Vad1mo Vad1mo removed the Stale label Nov 27, 2022
@Vad1mo
Copy link
Member

Vad1mo commented Nov 27, 2022

We, will address this issue internally next PR review. Mon 28th Nov. 2022

@github-actions
Copy link

This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days.

@github-actions github-actions bot added the Stale label Jan 27, 2023
@Vad1mo
Copy link
Member

Vad1mo commented Feb 20, 2023

We had internal discussion and verified that with the OCI spec, and cam to the conclusion that the current implementation in Harbor aligns with the OCI spec.

The consequence is we are not planning to merge this PR.

@Vad1mo Vad1mo closed this Feb 20, 2023
@peelandsee
Copy link

@Vad1mo my understanding was the opposite: the OCI Distribution specs literally say in their Error Codes section

The code field MUST be one of the following: BLOB_UNKNOWN, BLOB_UPLOAD_INVALID, BLOB_UPLOAD_UNKNOWN, DIGEST_INVALID, MANIFEST_BLOB_UNKNOWN, MANIFEST_INVALID, MANIFEST_UNKNOWN, NAME_INVALID, NAME_UNKNOWN, SIZE_INVALID, UNAUTHORIZED, DENIED, UNSUPPORTED, TOOMANYREQUESTS

Would you please link here the specs you were referring to?

thank you!

@Vad1mo
Copy link
Member

Vad1mo commented Feb 20, 2023

thank you @peelandsee for the reference. Indeed, it looks like there is no error code NOT_FOUND in the spec. I don't have the reference at hand we looked into, I will find it and get back to this PR. Meanwhile I'll reopen this PR.

@Vad1mo Vad1mo reopened this Feb 20, 2023
@Vad1mo Vad1mo requested a review from a team as a code owner February 20, 2023 14:25
@github-actions
Copy link

This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days.

@github-actions github-actions bot added the Stale label Apr 23, 2023
@peelandsee
Copy link

commenting on this to avoid auto-close while @Vad1mo complete the check

@github-actions github-actions bot removed the Stale label Apr 27, 2023
@github-actions
Copy link

This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days.

@github-actions github-actions bot added the Stale label Jun 26, 2023
@peelandsee
Copy link

a brand-new dummy comment avoiding auto-close to let @Vad1mo complete his check

@github-actions github-actions bot removed the Stale label Jun 27, 2023
@wy65701436
Copy link
Contributor

This change does not make sense, as the NOT_FOUND_CODE is a general 404 failure for the API handlers. This code simply means that the object was not found, and is definitely not meant for manifest unknown errors.

Copy link
Contributor

@wy65701436 wy65701436 left a comment

Choose a reason for hiding this comment

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

see the comment.

@github-actions
Copy link

This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days.

@github-actions github-actions bot added the Stale label Sep 15, 2023
@github-actions
Copy link

This PR was closed because it has been stalled for 30 days with no activity. If this PR is still relevant, please re-open a new PR against main.

@github-actions github-actions bot closed this Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants