Skip to content

fix(chore): remove zgc in dockerfile for ARM env - #2421

Merged
simon824 merged 11 commits into
apache:masterfrom
aroundabout:fix-zgc
Jan 26, 2024
Merged

fix(chore): remove zgc in dockerfile for ARM env#2421
simon824 merged 11 commits into
apache:masterfrom
aroundabout:fix-zgc

Conversation

@aroundabout

@aroundabout aroundabout commented Jan 19, 2024

Copy link
Copy Markdown
Contributor

Purpose of the PR

On macos(ARM arch M1/2/3..), zgc is only available with java > 13, so we remove -g zgc in the docker-entrypoint.sh.

img_v3_0278_dd825afb-a548-4fa8-81e6-dd4fe56274bg
img_v3_0278_7d9062b4-7f0f-4911-a50c-896f29d7f38g
P4NlOlI8VR

Todo

  • move init-store to docker-entrypoint
  • simply auth and password to auth
  • read version from pom

Main Changes

Verifying these changes

  • Trivial rework / code cleanup without any test coverage. (No Need)
  • Already covered by existing tests, such as (please modify tests here).
  • Need tests and can be verified as follows:
    • xxx

Does this PR potentially affect the following parts?

  • Nope
  • Dependencies (add/update license info)
  • Modify configurations
  • The public API
  • Other affects (typed here)

Documentation Status

  • Doc - TODO
  • Doc - Done
  • Doc - No Need

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Jan 19, 2024
@codecov

codecov Bot commented Jan 19, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1dd0580) 66.32% compared to head (31dd8c6) 66.24%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2421      +/-   ##
============================================
- Coverage     66.32%   66.24%   -0.09%     
  Complexity      828      828              
============================================
  Files           511      511              
  Lines         42596    42596              
  Branches       5942     5942              
============================================
- Hits          28253    28216      -37     
- Misses        11547    11568      +21     
- Partials       2796     2812      +16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh Outdated
Comment thread hugegraph-server/Dockerfile Outdated
Comment thread hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh
@imbajin imbajin changed the title fix(chore): remove zgc option in docker image fix(chore): remove zgc in dockerfile for ARM env Jan 19, 2024
@aroundabout
aroundabout requested a review from imbajin January 19, 2024 10:18
imbajin
imbajin previously approved these changes Jan 22, 2024
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jan 22, 2024
@imbajin
imbajin requested a review from VGalaxies January 22, 2024 02:31
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Jan 22, 2024
@aroundabout
aroundabout requested a review from imbajin January 22, 2024 04:09
cp "${CONF}/${GREMLIN_SERVER_CONF}" "${BAK_CONF}/${GREMLIN_SERVER_CONF}.bak"
cp "${CONF}/${REST_SERVER_CONF}" "${BAK_CONF}/${REST_SERVER_CONF}.bak"
cp "${CONF}/graphs/${GRAPH_CONF}" "${BAK_CONF}/${GRAPH_CONF}.bak"
if [ ! -d "$BAK_CONF" ]; then

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.

new test image is pushed as dandelionivy/server

@aroundabout
aroundabout marked this pull request as draft January 22, 2024 05:05
@aroundabout
aroundabout marked this pull request as ready for review January 22, 2024 12:26
@dosubot dosubot Bot added the ci-cd Build or deploy label Jan 22, 2024
Comment thread hugegraph-server/Dockerfile Outdated
ARG MAVEN_ARGS

RUN mvn package $MAVEN_ARGS -e -B -ntp -DskipTests -Dmaven.javadoc.skip=true && pwd && ls -l
RUN find . -name 'apache-hugegraph-incubating-*.tar.gz' -delete

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.

what's for?

Comment thread hugegraph-server/Dockerfile Outdated
RUN find . -name 'apache-hugegraph-incubating-*.tar.gz' -delete

# 2nd stage: runtime env
# remove zgc, which is only available on ARM-Mac with java > 13

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.

seems the comment line could be better ↓

@imbajin imbajin 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.

THX, and we need pay attention to the size of the image, and then you can build a binary package

@aroundabout
aroundabout marked this pull request as draft January 23, 2024 11:18
@aroundabout
aroundabout marked this pull request as ready for review January 23, 2024 12:03
@aroundabout
aroundabout requested a review from imbajin January 23, 2024 12:05
Comment thread hugegraph-server/Dockerfile Outdated
&& rm -rf /var/lib/apt/lists/* \
&& service cron start

# 2. Init HugeGraph Sever

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.

image

maybe step2 could also be merged into st1?

@aroundabout
aroundabout requested a review from imbajin January 23, 2024 14:42
imbajin
imbajin previously approved these changes Jan 24, 2024

@imbajin imbajin 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.

I'll try it soon & update the doc PR apache/hugegraph-doc#324

Update: test it fine with auth-mode now

@imbajin
imbajin requested a review from coderzc January 24, 2024 02:44
Comment thread hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh

@simon824 simon824 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

@simon824
simon824 merged commit b980df8 into apache:master Jan 26, 2024
aroundabout added a commit to aroundabout/incubator-hugegraph that referenced this pull request Jan 26, 2024
* remove zgc

* Apply suggestions from code review

Co-authored-by: imbajin <jin@apache.org>

* add comment for hugegraph-server.sh

* fix enable-auth.sh

* init store in entrypoint

* use flag file to skip re-init

* delete tar.gz

* simply dockerfile

* mvn optimize

* simply dockerfile

* add init log in docker

---------

Co-authored-by: imbajin <jin@apache.org>
imbajin added a commit that referenced this pull request Jan 29, 2024
* remove zgc

* Apply suggestions from code review



* add comment for hugegraph-server.sh

* fix enable-auth.sh

* init store in entrypoint

* use flag file to skip re-init

* delete tar.gz

* simply dockerfile

* mvn optimize

* simply dockerfile

* add init log in docker

---------

Co-authored-by: imbajin <jin@apache.org>
VGalaxies pushed a commit that referenced this pull request Jan 29, 2024
* remove zgc

* Apply suggestions from code review

Co-authored-by: imbajin <jin@apache.org>

* add comment for hugegraph-server.sh

* fix enable-auth.sh

* init store in entrypoint

* use flag file to skip re-init

* delete tar.gz

* simply dockerfile

* mvn optimize

* simply dockerfile

* add init log in docker

---------

Co-authored-by: imbajin <jin@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci-cd Build or deploy lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants