Skip to content

[SPARK-49045] Add docker image build for operator - #28

Closed
jiangzho wants to merge 4 commits into
apache:mainfrom
jiangzho:builder
Closed

jiangzho wants to merge 4 commits into
apache:mainfrom
jiangzho:builder

Conversation

@jiangzho

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This PR adds Dockerfile and docker-entrypoint.sh for building operator docker image, also adds a CI task to build the image.

We use the latest gradle 8.9 image as builder, with eclipse-temurin:17-jre-jammy - the latter still uses base image version 22.04 which is inline with version used in core Spark.

Why are the changes needed?

This is needed to package and deploy Spark operator.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Existing & proposed new CI tasks.

Was this patch authored or co-authored using generative AI tooling?

No

@dongjoon-hyun dongjoon-hyun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

IIUC, this is a broken code due to the missing SparkOperator class, isn't it?

@dongjoon-hyun dongjoon-hyun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since SparkOperator class PR is merged, could you rebase this PR, @jiangzho ?

Comment thread build-tools/docker/Dockerfile Outdated
COPY . .
RUN ./gradlew clean build -x test

FROM eclipse-temurin:17-jre-jammy

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I understand your intention, but it seems that we need to avoid this kind of confusion in the community.

Specifically, what makes you think in this way? This is not aligned with Apache Spark 4.0.0 in three ways.

We use the latest gradle 8.9 image as builder, with eclipse-temurin:17-jre-jammy - the latter still uses base image version 22.04 which is inline with version used in core Spark.

I guess you are confused the following three things.

Screenshot 2024-08-01 at 12 46 39

In other words, Apache Spark 4 is using azul/zulu-openjdk:21.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the clarification!

Yes, now I'm +1 for updating the base image for operator to match 4.x.

@dongjoon-hyun dongjoon-hyun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for update. Could you fix CI failure, @jiangzho ?

@dongjoon-hyun dongjoon-hyun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Unfortunately, it seems to fail still.

Could you test it in your repository first?

@dongjoon-hyun dongjoon-hyun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1, LGTM. Thank you, @jiangzho .
Merged to main.

@dongjoon-hyun dongjoon-hyun mentioned this pull request Aug 6, 2024
dongjoon-hyun added a commit that referenced this pull request Aug 14, 2024
…tead of `test`

### What changes were proposed in this pull request?

This PR aims to speed up docker image building and reducing the required memory by excluding `check` instead of `test`.

### Why are the changes needed?

Initially, we exclude only `test` task. However, we can exclude the whole `check` lifecycle completely.
- #28

This is required in three ways.
- Speeding up docker image building.
- Reducing required memory resources during image building.
- Enabling `K8s integration tests` test pipeline later in the limited `GitHub Action CI` test pipeline.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Manual review.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #46 from dongjoon-hyun/SPARK-49237.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
jiangzho referenced this pull request in jiangzho/spark-kubernetes-operator Jul 17, 2025
…harts (#28)

* Add Rio pipelines to publish Helm charts to Apple Helm artifactory, Update CRD short name to sparkappv2 to avoid conflict with AIML's kubeflow Spark operator

* cleanup, and disable git trigger
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.

2 participants