Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix mapping of denied access in docker hub #8215

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 1 commit into from
Apr 27, 2023

Conversation

dfangl
Copy link
Member

@dfangl dfangl commented Apr 27, 2023

Motivation

We are currently seeing error messages in the community test pipeline in -ext which indicate an error when verifying the access denied error of a docker push.

-------------------------------- live log call ---------------------------------
2023-04-27T11:45:30.758 DEBUG --- [  MainThread] localstack.utils.container_utils.docker_cmd_client : Pushing image with cmd: ['docker', 'push', 'alpine']
2023-04-27T11:45:30.758 DEBUG --- [  MainThread] localstack.utils.run       : Executing command: ['docker', 'push', 'alpine']
ERROR: '['docker', 'push', 'alpine']': exit code 1; output: b'Using default tag: latest\nThe push refers to repository [docker.io/library/alpine]\nf1417ff83b31: Preparing\nf1417ff83b31: Retrying in 5 seconds\nf1417ff83b31: Retrying in 4 seconds\nf1417ff83b31: Retrying in 3 seconds\nf1417ff83b31: Retrying in 2 seconds\nf1417ff83b31: Retrying in 1 second\nf1417ff83b31: Retrying in 10 seconds\nf1417ff83b31: Retrying in 9 seconds\nf1417ff83b31: Retrying in 8 seconds\nf1417ff83b31: Retrying in 7 seconds\nf1417ff83b31: Retrying in 6 seconds\nf1417ff83b31: Retrying in 5 seconds\nf1417ff83b31: Retrying in 4 seconds\nf1417ff83b31: Retrying in 3 seconds\nf1417ff83b31: Retrying in 2 seconds\nf1417ff83b31: Retrying in 1 second\nf1417ff83b31: Retrying in 15 seconds\nf1417ff83b31: Retrying in 14 seconds\nf1417ff83b31: Retrying in 13 seconds\nf1417ff83b31: Retrying in 12 seconds\nf1417ff83b31: Retrying in 11 seconds\nf1417ff83b31: Retrying in 10 seconds\nf1417ff83b31: Retrying in 9 seconds\nf1417ff83b31: Retrying in 8 seconds\nf1417ff83b31: Retrying in 7 seconds\nf1417ff83b31: Retrying in 6 seconds\nf1417ff83b31: Retrying in 5 seconds\nf1417ff83b31: Retrying in 4 seconds\nf1417ff83b31: Retrying in 3 seconds\nf1417ff83b31: Retrying in 2 seconds\nf1417ff83b31: Retrying in 1 second\nf1417ff83b31: Retrying in 20 seconds\nf1417ff83b31: Retrying in 19 seconds\nf1417ff83b31: Retrying in 18 seconds\nf1417ff83b31: Retrying in 17 seconds\nf1417ff83b31: Retrying in 16 seconds\nf1417ff83b31: Retrying in 15 seconds\nf1417ff83b31: Retrying in 14 seconds\nf1417ff83b31: Retrying in 13 seconds\nf1417ff83b31: Retrying in 12 seconds\nf1417ff83b31: Retrying in 11 seconds\nf1417ff83b31: Retrying in 10 seconds\nf1417ff83b31: Retrying in 9 seconds\nf1417ff83b31: Retrying in 8 seconds\nf1417ff83b31: Retrying in 7 seconds\nf1417ff83b31: Retrying in 6 seconds\nf1417ff83b31: Retrying in 5 seconds\nf1417ff83b31: Retrying in 4 seconds\nf1417ff83b31: Retrying in 3 seconds\nf1417ff83b31: Retrying in 2 seconds\nf1417ff83b31: Retrying in 1 second\nunknown: requesting higher privileges than access token allows\n'
RERUN

While it is not clear why there are different error messages returned here, we still have to map this return to AccessDenied (as it effectively is).

Changes

  • Add case of requesting higher privileges than access token allows to be mapped to a AccessDenied exception

@dfangl dfangl requested a review from alexrashed April 27, 2023 14:17
@dfangl dfangl requested a review from dominikschubert as a code owner April 27, 2023 14:17
Copy link
Member

@alexrashed alexrashed left a comment

Choose a reason for hiding this comment

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

Thanks for jumping on this! LGTM! πŸš€ 🦸🏽

@github-actions
Copy link

LocalStack Community integration with Pro

1β€ˆ954 tests   1β€ˆ719 βœ”οΈβ€ƒβ€ƒ1h 23m 36s ⏱️
βŸβ€„β€ˆβŸβ€„βŸβ€„2 suitesβ€ƒβ€ƒβŸβ€„β€ˆ235 πŸ’€
βŸβ€„β€ˆβŸβ€„βŸβ€„2 filesβ€„β€‚β€ƒβ€ƒβŸβ€„β€ˆβŸβ€„βŸβ€„0 ❌

Results for commit 4e7e502.

@dfangl dfangl merged commit 3716e92 into master Apr 27, 2023
@dfangl dfangl deleted the fix-access-denied-exc-mapping branch April 27, 2023 15:30
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