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

connectors-ci: use crane to check if image exists #26118

Merged

Conversation

alafanechere
Copy link
Contributor

What

crane is a cool tool to inspect docker registry images. It's actively use by the dagger team for investigation.
It has the benefit of not requiring a docker daemon to run.
I want to replace the use of docker cli by crane in the CheckConnectorImageDoesNotExist step to not rely on docker in docker pattern that can be unstable ( see #25877)

How

No logical change == no test change == the test are still passing:

  • Use crane ls to check the tag available in an image repo
  • If the tag is returned we mark the step as SKIPPED and the push to the docker hub won't happen
  • If the tag is not returned or the image repo does not exists: SUCCESS, push will happen
  • If the crane ls command failed we mark the step as FAILURE and push won't hapen

@alafanechere alafanechere requested review from bnchrch and a team May 16, 2023 10:42
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.

One nit but other wise LGTM!

Heres a couple of cranes

@@ -716,3 +716,7 @@ def with_airbyte_python_connector_full_dagger(context: ConnectorContext, build_p
.with_label("io.airbyte.version", context.metadata["dockerImageTag"])
.with_label("io.airbyte.name", context.metadata["dockerRepository"])
)


def with_crane(context: PipelineContext) -> Container:
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: lets link to the crane docs here and talk about why crane

@alafanechere alafanechere merged commit c488801 into master May 16, 2023
22 checks passed
@alafanechere alafanechere deleted the augustin/connectors-ci/use-crane-to-check-image-exists branch May 16, 2023 17:36
marcosmarxm pushed a commit to natalia-miinto/airbyte that referenced this pull request Jun 8, 2023
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.

None yet

2 participants