You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "FANNG1 (via GitHub)" <gi...@apache.org> on 2025/01/17 08:58:16 UTC
[PR] [SIP] fix docker publish workflow [gravitino]
FANNG1 opened a new pull request, #6318:
URL: https://github.com/apache/gravitino/pull/6318
<!--
1. Title: [#<issue>] <type>(<scope>): <subject>
Examples:
- "[#123] feat(operator): support xxx"
- "[#233] fix: check null before access result in xxx"
- "[MINOR] refactor: fix typo in variable name"
- "[MINOR] docs: fix typo in README"
- "[#255] test: fix flaky test NameOfTheTest"
Reference: https://www.conventionalcommits.org/en/v1.0.0/
2. If the PR is unfinished, please mark this PR as draft.
-->
### What changes were proposed in this pull request?
(Please outline the changes and how this PR fixes the issue.)
### Why are the changes needed?
(Please clarify why the changes are needed. For instance,
1. If you propose a new API, clarify the use case for a new API.
2. If you fix a bug, describe the bug.)
Fix: #(issue)
### Does this PR introduce _any_ user-facing change?
(Please list the user-facing changes introduced by your change, including
1. Change in user-facing APIs.
2. Addition or removal of property keys.)
### How was this patch tested?
(Please test your changes, and provide instructions on how to test it:
1. If you add a feature or fix a bug, add a test to cover your changes.
2. If you fix a flaky test, repeat it for many times to prove it works.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#6300] fix(workflow): add an flag to control whether update docker latest tag. [gravitino]
Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #6318:
URL: https://github.com/apache/gravitino/pull/6318#discussion_r1919988123
##########
.github/workflows/docker-image.yml:
##########
@@ -115,8 +126,16 @@ jobs:
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/hostedtoolcache/CodeQL
- if [[ "${image_type}" == "gravitino" || "${image_type}" == "iceberg-rest-server" ]]; then
- ./dev/docker/build-docker.sh --platform all --type ${image_type} --image ${image_name} --tag ${{ github.event.inputs.version }} --latest
+ if [[ -n "${tag_name}" ]];then
+ full_tag_name="${tag_name}-${{ github.event.inputs.version }}"
+ else
+ full_tag_name="${{ github.event.inputs.version }}"
+ fi
+
+ if [[ "${publish_latest}" == "true" ]]; then
+ echo "Publish tag ${full_tag_name}, and update latest too."
+ ./dev/docker/build-docker.sh --platform all --type ${image_type} --image ${image_name} --tag ${full_tag_name} --latest
else
- ./dev/docker/build-docker.sh --platform all --type ${image_type} --image ${image_name} --tag "${tag_name}-${{ github.event.inputs.version }}"
- fi
\ No newline at end of file
+ echo "Publish tag ${full_tag_name}, doesn't update latest."
Review Comment:
done
##########
.github/workflows/docker-image.yml:
##########
@@ -115,8 +126,16 @@ jobs:
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/hostedtoolcache/CodeQL
- if [[ "${image_type}" == "gravitino" || "${image_type}" == "iceberg-rest-server" ]]; then
- ./dev/docker/build-docker.sh --platform all --type ${image_type} --image ${image_name} --tag ${{ github.event.inputs.version }} --latest
+ if [[ -n "${tag_name}" ]];then
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#6300] fix(workflow): add an flag to control whether update docker latest tag. [gravitino]
Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #6318:
URL: https://github.com/apache/gravitino/pull/6318#discussion_r1919982471
##########
.github/workflows/docker-image.yml:
##########
@@ -115,8 +126,10 @@ jobs:
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/hostedtoolcache/CodeQL
- if [[ "${image_type}" == "gravitino" || "${image_type}" == "iceberg-rest-server" ]]; then
+ if [[ "${publish_latest}" == "true" ]]; then
+ echo "Publish latest tag"
./dev/docker/build-docker.sh --platform all --type ${image_type} --image ${image_name} --tag ${{ github.event.inputs.version }} --latest
else
+ echo "Doesn't publish latest tag"
./dev/docker/build-docker.sh --platform all --type ${image_type} --image ${image_name} --tag "${tag_name}-${{ github.event.inputs.version }}"
Review Comment:
updated with `full_tag_name`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#6300] fix(workflow): add an flag to control whether update docker latest tag. [gravitino]
Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao commented on code in PR #6318:
URL: https://github.com/apache/gravitino/pull/6318#discussion_r1919981909
##########
.github/workflows/docker-image.yml:
##########
@@ -115,8 +126,16 @@ jobs:
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/hostedtoolcache/CodeQL
- if [[ "${image_type}" == "gravitino" || "${image_type}" == "iceberg-rest-server" ]]; then
- ./dev/docker/build-docker.sh --platform all --type ${image_type} --image ${image_name} --tag ${{ github.event.inputs.version }} --latest
+ if [[ -n "${tag_name}" ]];then
Review Comment:
Can you add a whitespace after ";"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#6300] fix(workflow): add an flag to control whether update docker latest tag. [gravitino]
Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao commented on code in PR #6318:
URL: https://github.com/apache/gravitino/pull/6318#discussion_r1919981046
##########
.github/workflows/docker-image.yml:
##########
@@ -115,8 +126,16 @@ jobs:
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/hostedtoolcache/CodeQL
- if [[ "${image_type}" == "gravitino" || "${image_type}" == "iceberg-rest-server" ]]; then
- ./dev/docker/build-docker.sh --platform all --type ${image_type} --image ${image_name} --tag ${{ github.event.inputs.version }} --latest
+ if [[ -n "${tag_name}" ]];then
+ full_tag_name="${tag_name}-${{ github.event.inputs.version }}"
+ else
+ full_tag_name="${{ github.event.inputs.version }}"
+ fi
+
+ if [[ "${publish_latest}" == "true" ]]; then
+ echo "Publish tag ${full_tag_name}, and update latest too."
+ ./dev/docker/build-docker.sh --platform all --type ${image_type} --image ${image_name} --tag ${full_tag_name} --latest
else
- ./dev/docker/build-docker.sh --platform all --type ${image_type} --image ${image_name} --tag "${tag_name}-${{ github.event.inputs.version }}"
- fi
\ No newline at end of file
+ echo "Publish tag ${full_tag_name}, doesn't update latest."
Review Comment:
Remove this ", doesn't update latest", it is not useful.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#6300] fix(workflow): add an flag to control whether update docker latest tag. [gravitino]
Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 merged PR #6318:
URL: https://github.com/apache/gravitino/pull/6318
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#6300] fix(workflow): add an flag to control whether update docker latest tag. [gravitino]
Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao commented on code in PR #6318:
URL: https://github.com/apache/gravitino/pull/6318#discussion_r1919991572
##########
docs/publish-docker-images.md:
##########
@@ -30,9 +30,10 @@ You can use GitHub actions to publish Docker images to the Docker Hub repository
3. `apache/gravitino:0.1.0` if this is a gravitino server image.
4. `apache/gravitino-iceberg-rest:0.1.0` if this is an iceberg-rest server image.
6. You must enter the correct `docker user name`and `publish docker token` before you can execute run `Publish Docker Image` workflow.
+7. If you want to update the latest tag, select the box for `Whether to update the latest tag`.
7. Wait for the workflow to complete. You can see a new Docker image shown in the [Apache Docker Hub](https://hub.docker.com/u/apache) repository.
Review Comment:
Can you change the sequence number, the number "7" is duplicated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#6300] fix(workflow): add an flag to control whether update docker latest tag. [gravitino]
Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #6318:
URL: https://github.com/apache/gravitino/pull/6318#discussion_r1920017583
##########
docs/publish-docker-images.md:
##########
@@ -30,9 +30,10 @@ You can use GitHub actions to publish Docker images to the Docker Hub repository
3. `apache/gravitino:0.1.0` if this is a gravitino server image.
4. `apache/gravitino-iceberg-rest:0.1.0` if this is an iceberg-rest server image.
6. You must enter the correct `docker user name`and `publish docker token` before you can execute run `Publish Docker Image` workflow.
+7. If you want to update the latest tag, select the box for `Whether to update the latest tag`.
7. Wait for the workflow to complete. You can see a new Docker image shown in the [Apache Docker Hub](https://hub.docker.com/u/apache) repository.
Review Comment:
updated
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#6300] fix(workflow): add an flag to control whether update docker latest tag. [gravitino]
Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao commented on code in PR #6318:
URL: https://github.com/apache/gravitino/pull/6318#discussion_r1919818159
##########
.github/workflows/docker-image.yml:
##########
@@ -115,8 +126,10 @@ jobs:
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/hostedtoolcache/CodeQL
- if [[ "${image_type}" == "gravitino" || "${image_type}" == "iceberg-rest-server" ]]; then
+ if [[ "${publish_latest}" == "true" ]]; then
+ echo "Publish latest tag"
./dev/docker/build-docker.sh --platform all --type ${image_type} --image ${image_name} --tag ${{ github.event.inputs.version }} --latest
else
+ echo "Doesn't publish latest tag"
./dev/docker/build-docker.sh --platform all --type ${image_type} --image ${image_name} --tag "${tag_name}-${{ github.event.inputs.version }}"
Review Comment:
This `if...else...` is not correct, we should always build the image with tag names, right?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org