-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Bmoric/remove docker compose for build #7500
Conversation
I am not sure that it will be an improvment probably because of
I move back the review to a draft until I fix this issue. |
airbyte-scheduler/app/build.gradle
Outdated
def buildTag = System.getenv('VERSION') ?: 'dev' | ||
// Use task types | ||
task buildMyAppImage(type: DockerBuildImage) { | ||
dependsOn processResources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does building the image depend on processTestResources
, compileTestJava
, test
, jacocoTestReport
? why wouldn't it just depend on what is required to create the artifacts. like, I'm wondering if it could just depend on assemble
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm asking this based on my understanding of the task dependency structure of the gradle java plugin: https://docs.gradle.org/current/userguide/java_plugin.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The plugin I am using has some implicit dependencies that will make the execution optimization to be ignore if the dependencies are not explicitly written. Like:
- Gradle detected a problem with the following location: '/Users/benoitmoriceau/workspace/airbyte/airbyte-db/lib/build/reports/jacoco/test/html'. Reason: Task ':airbyte-db:lib:buildMyAppImage' uses this output of task ':airbyte-db:lib:jacocoTestReport' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.
I will try to only depend on build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cgardens I tried to make it to depends only on jar and some optimization have gone away with because of that:
Execution optimizations have been disabled for task ':airbyte-scheduler:app:startScripts' to ensure correctness due to the following reasons:
- Gradle detected a problem with the following location: '/Users/benoitmoriceau/workspace/airbyte/airbyte-scheduler/app/build/scripts'. Reason: Task ':airbyte-scheduler:app:buildMyAppImage' uses this output of task ':airbyte-scheduler:app:startScripts' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.
…ove-docker-compose-for-build
I re-request a review since there were quite a lot of changes since the latest approval. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Only minor comments and the build errors need to be resolved ofc.
|
||
## Version | ||
|
||
This doc is relevant starting from the version 0.30.28-alpha. Prior to that, it was another design. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can remove this section since nobody cares about the prior design.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, That's surprising I would have expect something like Since
in the javadoc,
@@ -0,0 +1,46 @@ | |||
# Developing on docker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doc needs to be added to SUMMARY.md so it actually shows up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
## Incrementality | ||
|
||
The docker build is fully incremental, which means that it will only build an image if it is needed. We need to keep it that way. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's worth clarifying that this is for the platform build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done,
@jrhizor, the comments are addressed, the failing test for the build is failing in the action but not on my local. |
…ove-docker-compose-for-build
…ove-docker-compose-for-build
This reverts commit 4e17fa2.
This making the build using a gradle plugin instead of using docker-compose build. It aims to make the build to be more incremental as described in airbytehq#7306 Building the docker image don't rely on docker-compose anymore. The docker build step is isolated into a dedicated folder (in order to make sure that gradle plugin don't recompute the build of the docker container) Gradle is responsible for copying the files that docker needs to build its image. That removes the need of having a dockerignore file. This might not be effective until airbytehq#7539 is solved.
…bytehq#7698) This reverts commit 4e17fa2.
…" (airbytehq#7698)" (airbytehq#7746) This reverts commit 797d11a. Restore the removal of the docker compose file
What
This making the build using a gradle plugin instead of using docker-compose build.
It aims to make the build to be more incremental as described in #7306
This might not be effective until #7539 is solved.