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

airbyte-ci/metadata-lib: make dockerhub credentials optional #37787

Conversation

alafanechere
Copy link
Contributor

@alafanechere alafanechere commented May 3, 2024

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.

Copy link

vercel bot commented May 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview May 3, 2024 5:10pm

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @alafanechere and the rest of your teammates on Graphite Graphite

@alafanechere alafanechere force-pushed the augustin/05-03-airbyte-ci/metadata-lib_make_dockerhub_credentials_optional branch 2 times, most recently from 9f1ce07 to 450205d Compare May 3, 2024 11:57
@alafanechere alafanechere marked this pull request as ready for review May 3, 2024 11:57
@alafanechere alafanechere requested a review from a team as a code owner May 3, 2024 11:57
@alafanechere alafanechere force-pushed the augustin/05-03-airbyte-ci/metadata-lib_make_dockerhub_credentials_optional branch from 450205d to 4e70382 Compare May 3, 2024 11:58
Copy link
Contributor

@bnchrch bnchrch left a comment

Choose a reason for hiding this comment

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

Approved!

Docker themed gif because why not
whale-docker-gif

@@ -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:
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️ Good comments

@alafanechere alafanechere force-pushed the augustin/05-03-airbyte-ci/metadata-lib_make_dockerhub_credentials_optional branch from 4e70382 to 487e98c Compare May 3, 2024 15:25
@alafanechere alafanechere force-pushed the augustin/05-03-airbyte-ci/metadata-lib_make_dockerhub_credentials_optional branch from 487e98c to 3b0774d Compare May 3, 2024 17:10
Copy link
Contributor

@gisripa gisripa left a comment

Choose a reason for hiding this comment

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

🙇

@alafanechere alafanechere merged commit a683c74 into master May 7, 2024
36 checks passed
@alafanechere alafanechere deleted the augustin/05-03-airbyte-ci/metadata-lib_make_dockerhub_credentials_optional branch May 7, 2024 07:35
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.

3 participants