-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
airbyte-ci/metadata-lib: make dockerhub credentials optional #37787
airbyte-ci/metadata-lib: make dockerhub credentials optional #37787
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @alafanechere and the rest of your teammates on Graphite |
9f1ce07
to
450205d
Compare
450205d
to
4e70382
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -40,8 +40,14 @@ def is_image_on_docker_hub(image_name: str, version: str, digest: Optional[str] | |||
bool: True if the image and version exists on Docker Hub, False otherwise. | |||
""" | |||
|
|||
token = get_docker_hub_auth_token() | |||
headers = {"Authorization": f"JWT {token}"} | |||
if "DOCKER_HUB_USERNAME" not in os.environ or "DOCKER_HUB_PASSWORD" not in os.environ: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️ Good comments
4e70382
to
487e98c
Compare
487e98c
to
3b0774d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙇
We required dockerhub credentials to run metadata validation because it checks if the base image declared is available in DockerHub with DockerHub API.
DockerHub API is public but rate limited so using credentials helps in getting higher rate limit.
It also had a strange behavior which looks now gone: when you called it to check an image existence without the token a 403 was returned instead of a 404 when the image does not exists, but a 200 was always returned when the image exists...
Removing requirement on dockerhub credentials in metadata validation will improve DX when running airbyte-ci locally.