You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampark.apache.org by "wolfboys (via GitHub)" <gi...@apache.org> on 2025/09/10 03:03:46 UTC
[PR] [Improve] Build and push docker images for historical versions [streampark]
wolfboys opened a new pull request, #4286:
URL: https://github.com/apache/streampark/pull/4286
[Improve] Build and push Docker images for historical versions
## What changes were proposed in this pull request
Issue Number: close #xxx <!-- REMOVE this line if no issue to close -->
<!--(For example: This pull request proposed to add checkstyle plugin).-->
## Brief change log
<!--*(for example:)*
- *Add maven-checkstyle-plugin to root pom.xml*
-->
## Verifying this change
<!--*(Please pick either of the following options)*-->
This change is a trivial rework / code cleanup without any test coverage.
*(or)*
This change is already covered by existing tests, such as *(please describe tests)*.
*(or)*
This change added tests and can be verified as follows:
<!--*(example:)*
- *Added integration tests for end-to-end.*
- *Added *Test to verify the change.*
- *Manually verified the change by testing locally.* -->
## Does this pull request potentially affect one of the following parts
- Dependencies (does it add or upgrade a dependency): (yes / no)
--
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: issues-unsubscribe@streampark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improve] Build and push docker images for historical versions [streampark]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #4286:
URL: https://github.com/apache/streampark/pull/4286#issuecomment-3273169655
## [](https://sonarcloud.io/dashboard?id=apache_incubator-streampark&pullRequest=4286) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_incubator-streampark&pullRequest=4286&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_incubator-streampark&pullRequest=4286&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-streampark&pullRequest=4286&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_incubator-streampark&pullRequest=4286&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_incubator-streampark&pullRequest=4286&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_incubator-streampark&pullRequest=4286)
--
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: issues-unsubscribe@streampark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improve] Build and push docker images for historical versions [streampark]
Posted by "wolfboys (via GitHub)" <gi...@apache.org>.
wolfboys merged PR #4286:
URL: https://github.com/apache/streampark/pull/4286
--
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: issues-unsubscribe@streampark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improve] Build and push docker images for historical versions [streampark]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #4286:
URL: https://github.com/apache/streampark/pull/4286#discussion_r2335390590
##########
.github/workflows/docker-push.yml:
##########
@@ -31,12 +29,41 @@ concurrency:
cancel-in-progress: true
jobs:
+ get-tags:
+ runs-on: ubuntu-latest
+ if: ${{ github.repository == 'apache/streampark' && github.event_name == 'schedule' }}
+ outputs:
+ tags: ${{ steps.get-tags.outputs.tags }}
+ steps:
+ - name: Check out the repo
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
+ - name: Get all matching tags
+ id: get-tags
+ run: |
+ # 获取所有符合规则的标签
+ TAGS=$(git tag -l | grep -E '^v[2-9]+\.[0-9]+\.[0-9]+$' | sort -V)
+ echo "Found tags: $TAGS"
+
+ # 将标签转换为 JSON 数组格式
+ TAGS_JSON=$(echo "$TAGS" | jq -R -s -c 'split("\n")[:-1]')
+ echo "tags=$TAGS_JSON" >> $GITHUB_OUTPUT
+ echo "Found $TAGS_JSON"
Review Comment:
The comments are written in Chinese. For better maintainability in an international project, consider using English comments. For example: '# Get all tags matching the pattern' and '# Convert tags to JSON array format'.
##########
.github/workflows/docker-push.yml:
##########
@@ -31,12 +29,41 @@ concurrency:
cancel-in-progress: true
jobs:
+ get-tags:
+ runs-on: ubuntu-latest
+ if: ${{ github.repository == 'apache/streampark' && github.event_name == 'schedule' }}
+ outputs:
+ tags: ${{ steps.get-tags.outputs.tags }}
+ steps:
+ - name: Check out the repo
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
+ - name: Get all matching tags
+ id: get-tags
+ run: |
+ # 获取所有符合规则的标签
+ TAGS=$(git tag -l | grep -E '^v[2-9]+\.[0-9]+\.[0-9]+$' | sort -V)
+ echo "Found tags: $TAGS"
+
+ # 将标签转换为 JSON 数组格式
+ TAGS_JSON=$(echo "$TAGS" | jq -R -s -c 'split("\n")[:-1]')
+ echo "tags=$TAGS_JSON" >> $GITHUB_OUTPUT
+ echo "Found $TAGS_JSON"
+
build_image:
runs-on: ubuntu-latest
- if: ${{ github.repository == 'apache/streampark' }}
+ if: ${{ github.repository == 'apache/streampark' && (github.event_name == 'push' || (github.event_name == 'schedule' && needs.get-tags.outputs.tags != '[]')) }}
Review Comment:
[nitpick] The conditional expression is complex and hard to read. Consider breaking it into multiple lines or using a more readable format for better maintainability.
##########
.github/workflows/docker-push.yml:
##########
@@ -31,12 +29,41 @@ concurrency:
cancel-in-progress: true
jobs:
+ get-tags:
+ runs-on: ubuntu-latest
+ if: ${{ github.repository == 'apache/streampark' && github.event_name == 'schedule' }}
+ outputs:
+ tags: ${{ steps.get-tags.outputs.tags }}
+ steps:
+ - name: Check out the repo
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
+ - name: Get all matching tags
+ id: get-tags
+ run: |
+ # 获取所有符合规则的标签
+ TAGS=$(git tag -l | grep -E '^v[2-9]+\.[0-9]+\.[0-9]+$' | sort -V)
+ echo "Found tags: $TAGS"
+
+ # 将标签转换为 JSON 数组格式
+ TAGS_JSON=$(echo "$TAGS" | jq -R -s -c 'split("\n")[:-1]')
+ echo "tags=$TAGS_JSON" >> $GITHUB_OUTPUT
+ echo "Found $TAGS_JSON"
+
build_image:
runs-on: ubuntu-latest
- if: ${{ github.repository == 'apache/streampark' }}
+ if: ${{ github.repository == 'apache/streampark' && (github.event_name == 'push' || (github.event_name == 'schedule' && needs.get-tags.outputs.tags != '[]')) }}
+ needs: get-tags
+ strategy:
+ matrix:
+ tag: ${{ fromJson(needs.get-tags.outputs.tags) }}
Review Comment:
The `needs: get-tags` dependency will cause the job to fail when `github.event_name == 'push'` because the `get-tags` job only runs on scheduled events. This creates a dependency on a job that may not exist, causing the workflow to fail on push events.
--
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: issues-unsubscribe@streampark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improve] Build and push docker images for historical versions [streampark]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #4286:
URL: https://github.com/apache/streampark/pull/4286#issuecomment-3273035962
## [](https://sonarcloud.io/dashboard?id=apache_incubator-streampark&pullRequest=4286) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_incubator-streampark&pullRequest=4286&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_incubator-streampark&pullRequest=4286&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-streampark&pullRequest=4286&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_incubator-streampark&pullRequest=4286&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_incubator-streampark&pullRequest=4286&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_incubator-streampark&pullRequest=4286)
--
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: issues-unsubscribe@streampark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org