-
Notifications
You must be signed in to change notification settings - Fork 40
Add Docker support for ScalarDB Data Loader CLI #2758
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
Conversation
Co-authored-by: Copilot <[email protected]>
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.
Pull Request Overview
This PR adds Docker support for the ScalarDB Data Loader CLI and integrates its build and deployment into the CI workflows.
- Introduces a Dockerfile and new Gradle tasks for building the Docker image
- Updates CI pipeline workflows (release, artifact upload, vulnerability check, and testing) to incorporate the new Data Loader CLI image and test reports
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| data-loader/cli/build.gradle | Adds tasks to lint the Dockerfile, copy build output to a Docker context folder, and build the Docker image |
| data-loader/cli/Dockerfile | Provides a new Dockerfile using an Eclipse Temurin JRE base image and sets up a non-root user |
| .github/workflows/vuln-check.yaml | Updates vulnerability scan to include the Data Loader CLI image |
| .github/workflows/upload-artifacts.yaml | Updates artifact upload to push the Data Loader CLI image |
| .github/workflows/release-snapshot.yaml | Updates snapshot release workflow to push the Data Loader CLI image |
| .github/workflows/create-release.yaml | Adds steps to build and upload the Data Loader CLI JAR file for releases |
| .github/workflows/ci.yaml | Ensures test and spotbugs reports for the Data Loader CLI are generated and uploaded; adds Dockerfile linting for the CLI |
Comments suppressed due to low confidence (1)
data-loader/cli/Dockerfile:6
- The COPY pattern does not explicitly reference the 'cli' suffix that is used in the JAR's name (scalardb-data-loader-cli). Consider updating the pattern to 'scalardb-data-loader-cli*.jar' to avoid any ambiguity and ensure the correct artifact is copied.
COPY scalardb-data-loader-*.jar /app.jar
| run: | | ||
| mkdir -p /tmp/gradle_test_reports/core | ||
| mkdir -p /tmp/gradle_test_reports/schema-loader | ||
| mkdir -p /tmp/gradle_test_reports/data-loader/core |
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.
Added here and not in separate data loader ci file as it seems easier to manage in this file like this.
| - name: Dockerfile Lint for ScalarDB Schema Loader | ||
| run: ./gradlew schema-loader:dockerfileLint | ||
|
|
||
| - name: Dockerfile Lint for ScalarDB Data Loader CLI |
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.
For the same reason as the above. If required can still be all moved to a separate file though.
feeblefakie
left a comment
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.
LGTM! Thank you!
ypeckstadt
left a comment
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.
LGTM. Thank you.
data-loader/cli/Dockerfile
Outdated
| @@ -0,0 +1,13 @@ | |||
| FROM eclipse-temurin:8-jre-jammy | |||
|
|
|||
| RUN apt-get update && apt-get upgrade -y \ | |||
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 has become a Docker-recommended practice to add this.
cf. https://github.com/scalar-labs/scalardb-cluster/pull/1061
| RUN apt-get update && apt-get upgrade -y \ | |
| RUN apt-get update && apt-get upgrade -y --no-install-recommends \ |
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.
Thanks for the suggestion. I think we need to apply the same for the schema-loader image building. cc @brfrn169
Co-authored-by: Vincent Guilpain <[email protected]>
Torch3333
left a comment
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.
LGTM, thank you!
|
@thongdk8 Could you please add the data-loader to |
|
@brfrn169 I have updated the remove untagged workflow. |
brfrn169
left a comment
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.
LGTM! Thank you!
komamitsu
left a comment
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.
LGTM! 👍
|
@inv-jishnu Can you please check this PR? |
inv-jishnu
left a comment
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.
LGTM!
Thank you.
Co-authored-by: Peckstadt Yves <[email protected]>
Description
This PR adds Docker support for the ScalarDB Data Loader CLI. Also, make it part of the CI workflows. PTAL. Thank you.
Related issues and/or PRs
N/A
Changes made
build.gradlefile for the data-loader CLI to support Docker buildsChecklist
Additional notes
N/A
Release notes
Added Docker support for the ScalarDB Data Loader CLI, enabling containerized deployment of the data loading functionality.