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

base-images: release a base image for our java connectors #49831

Conversation

alafanechere
Copy link
Contributor

@alafanechere alafanechere commented Dec 17, 2024

What

Relates to https://github.com/airbytehq/airbyte-internal-issues/issues/11151
Declare a base image for our java connectors by copying the build logic currently declared in airbyte-ci here
Prelease it to DockerHub: airbyte/java-connector-base:1.0.0-rc.1

@alafanechere alafanechere requested a review from a team as a code owner December 17, 2024 08:59
Copy link

vercel bot commented Dec 17, 2024

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

Name Status Preview Comments Updated (UTC)
airbyte-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 5:21pm

Copy link
Contributor Author

alafanechere commented Dec 17, 2024

@alafanechere alafanechere force-pushed the augustin/12-17-base-images_declare_a_base_image_for_our_java_connectors branch from 709f1b1 to 10dc398 Compare December 17, 2024 09:22
@alafanechere alafanechere changed the title base-images: declare a base image for our java connectors base-images: release a base image for our java connectors Dec 17, 2024
Comment on lines 45 to 46
RUN yum update -y --security
RUN yum install -y tar openssl findutils
Copy link
Member

Choose a reason for hiding this comment

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

I know this is just the example, but looking into the code further down in this PR, it looks like we're following what this example does.

We want to limit the number of RUN calls in our image creation process. Each RUNwill create a new layer and further increase the size of our base image.

You can see on the platform side how we've collapsed multiple RUN calls into a single call to reduce our base image size.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@colesnodgrass I can definitely bundle these three commands into one. Thank you for the suggestion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the tips @colesnodgrass . 50mb saved 👍

@alafanechere alafanechere force-pushed the augustin/12-17-base-images_declare_a_base_image_for_our_java_connectors branch from 10dc398 to 6bd024b Compare December 17, 2024 16:19
@alafanechere alafanechere requested review from a team December 17, 2024 17:04


class AirbyteJavaConnectorBaseImage(bases.AirbyteConnectorBaseImage):
# TODO: remove this once we want to build the base image with the airbyte user.
Copy link
Contributor

Choose a reason for hiding this comment

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

This I expect mimics the current setup?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes the current user is root. The parent class sets it to airbyte, so I override the USER with root to keep v1 expected user be root.

Copy link
Contributor

@natikgadzhi natikgadzhi left a comment

Choose a reason for hiding this comment

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

Approving since blast radius is zero. <3

@alafanechere alafanechere force-pushed the augustin/12-17-base-images_declare_a_base_image_for_our_java_connectors branch from 6bd024b to 569f2df Compare December 17, 2024 17:14
Copy link
Contributor

@postamar postamar left a comment

Choose a reason for hiding this comment

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

LGTM as far as I can tell

repository: Final[str] = "airbyte/java-connector-base"

DD_AGENT_JAR_URL: Final[str] = "https://dtdg.co/latest-java-tracer"
BASE_SCRIPT_URL = "https://raw.githubusercontent.com/airbytehq/airbyte/6d8a3a2bc4f4ca79f10164447a90fdce5c9ad6f9/airbyte-integrations/bases/base/base.sh"
Copy link
Contributor

Choose a reason for hiding this comment

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

consider lifting the git commit sha to a dedicated constant

@alafanechere alafanechere merged commit 3f4e4d6 into master Dec 17, 2024
31 checks passed
@alafanechere alafanechere deleted the augustin/12-17-base-images_declare_a_base_image_for_our_java_connectors branch December 17, 2024 17: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.

4 participants