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: simplify gradle task execution #34560

Merged
merged 2 commits into from
Jan 27, 2024

Conversation

postamar
Copy link
Contributor

@postamar postamar commented Jan 26, 2024

The gradle task execution framework we built in airbyte-ci includes a :airbyte-cdk:java:airbyte-cdk:publishSnapshotIfNeeded task which never actually did anything. It was there in anticipation of the java CDK workflow making use of SNAPSHOT releases. This never materialized, and considering where @stephane-airbyte and I are taking the CDK release workflow, this won't materialize for a while at least. We can therefore remove anything to do with the local maven repository, aka /root/.m2. This simplifies and speeds up gradle in dagger/airbyte-ci.

Relates to airbytehq/airbyte-internal-issues#2475 .

@postamar postamar requested a review from a team January 26, 2024 15:57
Copy link

vercel bot commented Jan 26, 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 Jan 26, 2024 4:14pm

@postamar postamar force-pushed the postamar/airbyte-ci-simplify-gradle-steps branch from 7404d04 to c954d28 Compare January 26, 2024 16:14
@postamar
Copy link
Contributor Author

@alafanechere I tested that this works manually and I couldn't find any downside to this change.

@postamar postamar enabled auto-merge (squash) January 26, 2024 16:15
Copy link
Contributor

@alafanechere alafanechere left a comment

Choose a reason for hiding this comment

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

Thanks for addressing this.
I made a minor suggestion.

# Copy the local maven repository and force evaluation of `with_whole_git_repo` container.
.with_directory(self.LOCAL_MAVEN_REPOSITORY_PATH, await with_whole_git_repo.directory(self.LOCAL_MAVEN_REPOSITORY_PATH))
# Copy the gradle home directory and force evaluation of `with_whole_git_repo` container.
.with_directory(self.GRADLE_HOME_PATH, await with_whole_git_repo.directory(self.GRADLE_HOME_PATH))
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to be clear:
The .gradle folder from the host will not be mounted as it's excluded when calling get_repo_dir.
I think your intent is that self._get_gradle_command("help", *warm_dependency_cache_args) will seed .gradle. Which works.
Can we make sure that .gradle is empty before calling f"(rsync -a --stats --mkpath {self.GRADLE_DEP_CACHE_PATH}/ {self.GRADLE_HOME_PATH} || true)", , (with a without_directory call), it'll guarantee that any refactoring an the get_repo_dir method will not alter this behavior and lead to corrupted .gradle folder mixing host file and container files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea!

@postamar postamar merged commit 02c0ec7 into master Jan 27, 2024
24 checks passed
@postamar postamar deleted the postamar/airbyte-ci-simplify-gradle-steps branch January 27, 2024 10:17
Copy link

sentry-io bot commented Jan 30, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

Did you find this useful? React with a 👍 or 👎

jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 21, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
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