Skip to content

chore: non-dagger publish #59740

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 31 commits into from
May 9, 2025
Merged

chore: non-dagger publish #59740

merged 31 commits into from
May 9, 2025

Conversation

davinchia
Copy link
Contributor

@davinchia davinchia commented May 9, 2025

What

Modify the publishing workflows for JVM to publish images outside of dagger, while relies on airbyte-ci to continue updating registry/metadata.

This relies on the fact that airbyte-ci first checks for a published image, and if the image is published, skips image publishing and only updates metadata.

One edge case here: airbyte-ci will always try to build a pre-release image, regardless of whether docker images already exists. The changes here will build and publish the JVM image before dagger attempts to do so, so dagger attempts will rely on the cache and get the same result. Eventually we want to remove this behaviour from airbyte-ci. I tried to do so, and it's more complicated, so we'll do this later.

How

  • update the get modified file script to get the connectors modified since the last commit. This support the flow in master.
  • create a new script that given a list of connectors replicates airbyte-ci's current behaviour
    • if main-release is set (default), build and publish images according to the dockerImageTag in metadata.yaml.
    • if pre-release is set, builds and publishes images by taking the dockerImageTag in metadata.yaml and adding -dev.<git-first-10-digits>.
    • this supports both the auto-publish flow in master, and the pre-release flows using the publish action.
  • update the publish connector GHA workflow to be compatible with all of this.

NOTE: we only support publishing destination-dev-null to start to be safe. This is fine since airbyte-ci will continue to build images if it detects the image does not exist.

Review guide

The 3 main files described above.

User Impact

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

Copy link

vercel bot commented May 9, 2025

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 May 9, 2025 11:13pm

Copy link
Contributor

github-actions bot commented May 9, 2025

destination-dev-null Connector Test Results

  6 files   6 suites   3m 18s ⏱️
100 tests 68 ✅ 32 💤 0 ❌
108 runs  76 ✅ 32 💤 0 ❌

Results for commit 978cc53.

♻️ This comment has been updated with latest results.

@davinchia davinchia changed the title Davinchia/steel thread publish steel thread publish May 9, 2025
@davinchia davinchia changed the title steel thread publish steel thread non-dagger publish May 9, 2025
Copy link
Collaborator

@aaronsteers aaronsteers left a comment

Choose a reason for hiding this comment

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

Made some comments. I think this looks good.

One small request would be if the java-specific shell script could check language on the input connector name and be a no-op with printed warning if so. But in theory, your code shouldn't (🤞) receive any java connector names because of the --java input to the other script. (Aka, don't consider this feedback blocking. Just an idea.)

@davinchia
Copy link
Contributor Author

davinchia commented May 9, 2025

Here is an example of airbyte-ci skipping the image building because the new process already built and uploaded the image when not in --pre-release mode.

In the same example, we confirm the logic to differs does come up empty if the previous commit does not have connector modifications.

And the newly published dev-null dest is working fine: https://cloud.airbyte.com/workspaces/a0c2044b-7346-4fd8-ba9b-98d1eb36eb34/connections/20d0a052-fe85-44fd-8a52-8a7b5d5c4bdf/timeline

@davinchia
Copy link
Contributor Author

Here is a run where we are correctly detecting the changed connector from the previous commit, and building the image.

@davinchia davinchia changed the title steel thread non-dagger publish chore: non-dagger publish May 9, 2025
@davinchia davinchia marked this pull request as ready for review May 9, 2025 21:49
@davinchia davinchia requested a review from a team as a code owner May 9, 2025 21:49
Copy link
Contributor

@edgao edgao left a comment

Choose a reason for hiding this comment

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

approving to unblock since this isn't prod code, had a few comments.

# ./build-and-publish-java-connectors-with-tag.sh --publish-option=main-release foo-conn bar-conn
#
# 3) Pre-release (dev tag) via JSON pipe
# echo '{"connector":["foo-conn","bar-conn"]}' | ./build-and-publish-java-connectors-with-tag.sh --publish-option=pre-release
Copy link
Contributor

Choose a reason for hiding this comment

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

nonblocking: I'd mildly prefer to only support this mode, since that's all we need for CI (purely for the sake of having fewer lines of shell script)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

meaning you prefer only json support?

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah. Unless that's something you're using for local testing/etc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah pretty much.

@davinchia davinchia enabled auto-merge (squash) May 9, 2025 23:01
@davinchia davinchia disabled auto-merge May 9, 2025 23:05
@davinchia davinchia merged commit 48c4d15 into master May 9, 2025
29 checks passed
@davinchia davinchia deleted the davinchia/steel-thread-publish branch May 9, 2025 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants