You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "liferoad (via GitHub)" <gi...@apache.org> on 2025/03/29 17:49:22 UTC
[PR] Add the simple RC workflow to validate Go SDK with wordcount [beam]
liferoad opened a new pull request, #34476:
URL: https://github.com/apache/beam/pull/34476
Addresses #34457
------------------------
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
- [ ] Mention the appropriate issue in your description (for example: `addresses #123`), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment `fixes #<ISSUE NUMBER>` instead.
- [ ] Update `CHANGES.md` with noteworthy changes.
- [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://github.com/apache/beam/blob/master/CONTRIBUTING.md#make-the-reviewers-job-easier).
To check the build health, please visit [https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
GitHub Actions Tests Status (on master branch)
------------------------------------------------------------------------------------------------
[](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Go+tests%22+branch%3Amaster+event%3Aschedule)
See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more information about GitHub Actions CI or the [workflows README](https://github.com/apache/beam/blob/master/.github/workflows/README.md) to see a list of phrases to trigger workflows.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add the simple RC workflow to validate Go SDK with wordcount [beam]
Posted by "liferoad (via GitHub)" <gi...@apache.org>.
liferoad commented on code in PR #34476:
URL: https://github.com/apache/beam/pull/34476#discussion_r2029870904
##########
.github/workflows/run_rc_validation_go_wordcount.yml:
##########
@@ -0,0 +1,172 @@
+name: Validate Go SDK Release Candidate
+
+on:
+ workflow_dispatch:
+ inputs:
+ rc_tag:
+ description: 'Beam RC Tag (e.g., v2.59.0-RC1)'
+ required: true
+ type: string
+ container_tag:
+ description: 'Beam Go SDK Container Tag (e.g., 2.59.0rc1)'
+ required: true
+ type: string
+
+# This allows a subsequently queued workflow run to interrupt previous runs
+concurrency:
+ group: '${{ github.workflow }} @ ${{ github.event.inputs.rc_tag }}' # Group by RC tag
+ cancel-in-progress: true
+
+# Setting explicit permissions (copied from Java Mobile Gaming workflow)
+permissions:
+ actions: write
+ pull-requests: write
+ checks: write
+ contents: read
+ deployments: read
+ id-token: write # Note: Likely not needed for self-hosted runners without WIF
+ issues: write
+ discussions: read
+ packages: read
+ pages: read
+ repository-projects: read
+ security-events: read
+ statuses: read
+
+env:
+ GCS_OUTPUT_PREFIX: gs://rc-validation-migration-tests/go-wordcount # Constant output prefix
+ GCP_PROJECT_ID: apache-beam-testing
+ GCP_REGION: us-central1
+ GCS_TEMP_LOCATION: gs://rc-validation-migration-tests/temp/
+ GCS_INPUT_PATH: gs://apache-beam-samples/shakespeare/kinglear.txt
+
+jobs:
+ setup:
+ runs-on: self-hosted
+ outputs:
+ rc_tag: ${{ github.event.inputs.rc_tag }}
+ container_tag: ${{ github.event.inputs.container_tag }}
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Set up environment
+ uses: ./.github/actions/setup-environment-action
+ with:
+ go-version: default, otherwise remove if default is 1.21
+
+ - name: Fetch Go SDK RC and Tidy Modules
+ working-directory: ./sdks/go/examples/wordcount
+ run: |
+ go get -d github.com/apache/beam/sdks/v2@${{ github.event.inputs.rc_tag }}
+ go mod tidy
+
+ # Cache Go modules to speed up subsequent jobs
+ - name: Cache Go modules
+ uses: actions/cache@v4
+ with:
+ path: |
+ ~/.cache/go-build
Review Comment:
removed
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add the simple RC workflow to validate Go SDK with wordcount [beam]
Posted by "liferoad (via GitHub)" <gi...@apache.org>.
liferoad commented on code in PR #34476:
URL: https://github.com/apache/beam/pull/34476#discussion_r2029872077
##########
.github/workflows/run_rc_validation_go_wordcount.yml:
##########
@@ -0,0 +1,172 @@
+name: Validate Go SDK Release Candidate
+
+on:
+ workflow_dispatch:
+ inputs:
+ rc_tag:
+ description: 'Beam RC Tag (e.g., v2.59.0-RC1)'
+ required: true
+ type: string
+ container_tag:
+ description: 'Beam Go SDK Container Tag (e.g., 2.59.0rc1)'
+ required: true
+ type: string
+
+# This allows a subsequently queued workflow run to interrupt previous runs
+concurrency:
+ group: '${{ github.workflow }} @ ${{ github.event.inputs.rc_tag }}' # Group by RC tag
+ cancel-in-progress: true
+
+# Setting explicit permissions (copied from Java Mobile Gaming workflow)
+permissions:
+ actions: write
+ pull-requests: write
+ checks: write
+ contents: read
+ deployments: read
+ id-token: write # Note: Likely not needed for self-hosted runners without WIF
+ issues: write
+ discussions: read
+ packages: read
+ pages: read
+ repository-projects: read
+ security-events: read
+ statuses: read
+
+env:
+ GCS_OUTPUT_PREFIX: gs://rc-validation-migration-tests/go-wordcount # Constant output prefix
+ GCP_PROJECT_ID: apache-beam-testing
+ GCP_REGION: us-central1
+ GCS_TEMP_LOCATION: gs://rc-validation-migration-tests/temp/
+ GCS_INPUT_PATH: gs://apache-beam-samples/shakespeare/kinglear.txt
+
+jobs:
+ setup:
+ runs-on: self-hosted
+ outputs:
+ rc_tag: ${{ github.event.inputs.rc_tag }}
+ container_tag: ${{ github.event.inputs.container_tag }}
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Set up environment
+ uses: ./.github/actions/setup-environment-action
+ with:
+ go-version: default, otherwise remove if default is 1.21
Review Comment:
fixed
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add the simple RC workflow to validate Go SDK with wordcount [beam]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #34476:
URL: https://github.com/apache/beam/pull/34476#issuecomment-2764031921
Assigning reviewers. If you would like to opt out of this review, comment `assign to next reviewer`:
R: @Abacn for label build.
Available commands:
- `stop reviewer notifications` - opt out of the automated review tooling
- `remind me after tests pass` - tag the comment author after tests pass
- `waiting on author` - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)
The PR bot will only process comments in the main thread (not review comments).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add the simple RC workflow to validate Go SDK with wordcount [beam]
Posted by "liferoad (via GitHub)" <gi...@apache.org>.
liferoad merged PR #34476:
URL: https://github.com/apache/beam/pull/34476
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add the simple RC workflow to validate Go SDK with wordcount [beam]
Posted by "damccorm (via GitHub)" <gi...@apache.org>.
damccorm commented on code in PR #34476:
URL: https://github.com/apache/beam/pull/34476#discussion_r2020999393
##########
.github/workflows/run_rc_validation_go_wordcount.yml:
##########
@@ -0,0 +1,172 @@
+name: Validate Go SDK Release Candidate
+
+on:
+ workflow_dispatch:
+ inputs:
+ rc_tag:
+ description: 'Beam RC Tag (e.g., v2.59.0-RC1)'
+ required: true
+ type: string
+ container_tag:
+ description: 'Beam Go SDK Container Tag (e.g., 2.59.0rc1)'
+ required: true
+ type: string
+
+# This allows a subsequently queued workflow run to interrupt previous runs
+concurrency:
+ group: '${{ github.workflow }} @ ${{ github.event.inputs.rc_tag }}' # Group by RC tag
+ cancel-in-progress: true
+
+# Setting explicit permissions (copied from Java Mobile Gaming workflow)
+permissions:
+ actions: write
+ pull-requests: write
+ checks: write
+ contents: read
+ deployments: read
+ id-token: write # Note: Likely not needed for self-hosted runners without WIF
+ issues: write
+ discussions: read
+ packages: read
+ pages: read
+ repository-projects: read
+ security-events: read
+ statuses: read
+
+env:
+ GCS_OUTPUT_PREFIX: gs://rc-validation-migration-tests/go-wordcount # Constant output prefix
+ GCP_PROJECT_ID: apache-beam-testing
+ GCP_REGION: us-central1
+ GCS_TEMP_LOCATION: gs://rc-validation-migration-tests/temp/
+ GCS_INPUT_PATH: gs://apache-beam-samples/shakespeare/kinglear.txt
+
+jobs:
+ setup:
+ runs-on: self-hosted
+ outputs:
+ rc_tag: ${{ github.event.inputs.rc_tag }}
+ container_tag: ${{ github.event.inputs.container_tag }}
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Set up environment
+ uses: ./.github/actions/setup-environment-action
+ with:
+ go-version: default, otherwise remove if default is 1.21
Review Comment:
Should this be a comment? Seems like this will definitely error
##########
.github/workflows/run_rc_validation_go_wordcount.yml:
##########
@@ -0,0 +1,172 @@
+name: Validate Go SDK Release Candidate
+
+on:
+ workflow_dispatch:
+ inputs:
+ rc_tag:
+ description: 'Beam RC Tag (e.g., v2.59.0-RC1)'
+ required: true
+ type: string
+ container_tag:
+ description: 'Beam Go SDK Container Tag (e.g., 2.59.0rc1)'
+ required: true
+ type: string
+
+# This allows a subsequently queued workflow run to interrupt previous runs
+concurrency:
+ group: '${{ github.workflow }} @ ${{ github.event.inputs.rc_tag }}' # Group by RC tag
+ cancel-in-progress: true
+
+# Setting explicit permissions (copied from Java Mobile Gaming workflow)
+permissions:
+ actions: write
+ pull-requests: write
+ checks: write
+ contents: read
+ deployments: read
+ id-token: write # Note: Likely not needed for self-hosted runners without WIF
+ issues: write
+ discussions: read
+ packages: read
+ pages: read
+ repository-projects: read
+ security-events: read
+ statuses: read
+
+env:
+ GCS_OUTPUT_PREFIX: gs://rc-validation-migration-tests/go-wordcount # Constant output prefix
+ GCP_PROJECT_ID: apache-beam-testing
+ GCP_REGION: us-central1
+ GCS_TEMP_LOCATION: gs://rc-validation-migration-tests/temp/
+ GCS_INPUT_PATH: gs://apache-beam-samples/shakespeare/kinglear.txt
+
+jobs:
+ setup:
+ runs-on: self-hosted
+ outputs:
+ rc_tag: ${{ github.event.inputs.rc_tag }}
+ container_tag: ${{ github.event.inputs.container_tag }}
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Set up environment
+ uses: ./.github/actions/setup-environment-action
+ with:
+ go-version: default, otherwise remove if default is 1.21
+
+ - name: Fetch Go SDK RC and Tidy Modules
+ working-directory: ./sdks/go/examples/wordcount
+ run: |
+ go get -d github.com/apache/beam/sdks/v2@${{ github.event.inputs.rc_tag }}
+ go mod tidy
+
+ # Cache Go modules to speed up subsequent jobs
+ - name: Cache Go modules
+ uses: actions/cache@v4
+ with:
+ path: |
+ ~/.cache/go-build
+ ~/go/pkg/mod
+ key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
+ restore-keys: |
+ ${{ runner.os }}-go-
+
+ validate-go-rc-prism:
+ needs: setup
+ runs-on: self-hosted # Changed to self-hosted
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Set up environment
+ uses: ./.github/actions/setup-environment-action
+ with:
+ go-version: default
+
+ # Restore cached Go modules
+ - name: Restore Go modules cache
+ uses: actions/cache@v4
+ with:
+ path: |
+ ~/.cache/go-build
+ ~/go/pkg/mod
+ key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
+ restore-keys: |
+ ${{ runner.os }}-go-
+
+ # Assuming gcloud/gsutil is available and authenticated on the self-hosted runner
+ - name: Download Input File from GCS (Prism)
+ working-directory: ./sdks/go/examples/wordcount
+ run: gsutil cp ${{ env.GCS_INPUT_PATH }} ./kinglear.txt
+
+ - name: Run Go WordCount with PrismRunner
+ working-directory: ./sdks/go/examples/wordcount
+ run: |
+ go run wordcount.go \
+ --input ./kinglear.txt \
+ --output ./output_prism.txt \
+ --runner=PrismRunner \
+ --environment_type=DOCKER \
+ --environment_config=apache/beam_go_sdk:${{ needs.setup.outputs.container_tag }}
+
+ - name: Check output file
+ working-directory: ./sdks/go/examples/wordcount
+ run: |
+ echo "--- PrismRunner WordCount Output ---"
+ cat output_prism.txt* # Output might be sharded
Review Comment:
Is the idea we will still ask folks to take a look at this output as part of the release instructions?
##########
.github/workflows/run_rc_validation_go_wordcount.yml:
##########
@@ -0,0 +1,172 @@
+name: Validate Go SDK Release Candidate
+
+on:
+ workflow_dispatch:
+ inputs:
+ rc_tag:
+ description: 'Beam RC Tag (e.g., v2.59.0-RC1)'
+ required: true
+ type: string
+ container_tag:
+ description: 'Beam Go SDK Container Tag (e.g., 2.59.0rc1)'
+ required: true
+ type: string
+
+# This allows a subsequently queued workflow run to interrupt previous runs
+concurrency:
+ group: '${{ github.workflow }} @ ${{ github.event.inputs.rc_tag }}' # Group by RC tag
+ cancel-in-progress: true
+
+# Setting explicit permissions (copied from Java Mobile Gaming workflow)
+permissions:
+ actions: write
+ pull-requests: write
+ checks: write
+ contents: read
+ deployments: read
+ id-token: write # Note: Likely not needed for self-hosted runners without WIF
+ issues: write
+ discussions: read
+ packages: read
+ pages: read
+ repository-projects: read
+ security-events: read
+ statuses: read
+
+env:
+ GCS_OUTPUT_PREFIX: gs://rc-validation-migration-tests/go-wordcount # Constant output prefix
+ GCP_PROJECT_ID: apache-beam-testing
+ GCP_REGION: us-central1
+ GCS_TEMP_LOCATION: gs://rc-validation-migration-tests/temp/
+ GCS_INPUT_PATH: gs://apache-beam-samples/shakespeare/kinglear.txt
+
+jobs:
+ setup:
+ runs-on: self-hosted
+ outputs:
+ rc_tag: ${{ github.event.inputs.rc_tag }}
+ container_tag: ${{ github.event.inputs.container_tag }}
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Set up environment
+ uses: ./.github/actions/setup-environment-action
+ with:
+ go-version: default, otherwise remove if default is 1.21
+
+ - name: Fetch Go SDK RC and Tidy Modules
+ working-directory: ./sdks/go/examples/wordcount
+ run: |
+ go get -d github.com/apache/beam/sdks/v2@${{ github.event.inputs.rc_tag }}
+ go mod tidy
+
+ # Cache Go modules to speed up subsequent jobs
+ - name: Cache Go modules
+ uses: actions/cache@v4
+ with:
+ path: |
+ ~/.cache/go-build
Review Comment:
I don't think we've built anything, so I don't think this will do anything. In general, I don't see any real value in this caching step; the go builds are quite fast anyways.
##########
.github/workflows/run_rc_validation_go_wordcount.yml:
##########
@@ -0,0 +1,172 @@
+name: Validate Go SDK Release Candidate
+
+on:
+ workflow_dispatch:
+ inputs:
+ rc_tag:
+ description: 'Beam RC Tag (e.g., v2.59.0-RC1)'
+ required: true
+ type: string
+ container_tag:
+ description: 'Beam Go SDK Container Tag (e.g., 2.59.0rc1)'
+ required: true
+ type: string
+
+# This allows a subsequently queued workflow run to interrupt previous runs
+concurrency:
+ group: '${{ github.workflow }} @ ${{ github.event.inputs.rc_tag }}' # Group by RC tag
+ cancel-in-progress: true
+
+# Setting explicit permissions (copied from Java Mobile Gaming workflow)
+permissions:
+ actions: write
+ pull-requests: write
+ checks: write
+ contents: read
+ deployments: read
+ id-token: write # Note: Likely not needed for self-hosted runners without WIF
+ issues: write
+ discussions: read
+ packages: read
+ pages: read
+ repository-projects: read
+ security-events: read
+ statuses: read
+
+env:
+ GCS_OUTPUT_PREFIX: gs://rc-validation-migration-tests/go-wordcount # Constant output prefix
+ GCP_PROJECT_ID: apache-beam-testing
+ GCP_REGION: us-central1
+ GCS_TEMP_LOCATION: gs://rc-validation-migration-tests/temp/
+ GCS_INPUT_PATH: gs://apache-beam-samples/shakespeare/kinglear.txt
+
+jobs:
+ setup:
+ runs-on: self-hosted
+ outputs:
+ rc_tag: ${{ github.event.inputs.rc_tag }}
+ container_tag: ${{ github.event.inputs.container_tag }}
Review Comment:
We don't need this as an output - instead of referencing outputs in future jobs, you can just directly reference `github.event.inputs.container_tag` - this just adds a layer of indirection
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add the simple RC workflow to validate Go SDK with wordcount [beam]
Posted by "damccorm (via GitHub)" <gi...@apache.org>.
damccorm commented on PR #34476:
URL: https://github.com/apache/beam/pull/34476#issuecomment-2766511165
> Thanks for the comments. The main goal for this PR is to create the stub for me to continue refining the workflow once this is merged first. I will address your comments later. Sounds good?
I'm fine with that as long as they get addressed. I do think they will make life easier for you though, so I'd recommend taking them :)
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add the simple RC workflow to validate Go SDK with wordcount [beam]
Posted by "liferoad (via GitHub)" <gi...@apache.org>.
liferoad commented on PR #34476:
URL: https://github.com/apache/beam/pull/34476#issuecomment-2766493738
Thanks for the comments. The main goal for this PR is to create the stub for me to continue refining the workflow once this is merged first. I will address your comments later. Sounds good?
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add the simple RC workflow to validate Go SDK with wordcount [beam]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #34476:
URL: https://github.com/apache/beam/pull/34476#discussion_r2029872536
##########
.github/workflows/run_rc_validation_go_wordcount.yml:
##########
@@ -0,0 +1,139 @@
+name: Validate Go SDK Release Candidate
+
+on:
+ workflow_dispatch:
+ inputs:
+ rc_tag:
+ description: 'Beam RC Tag (e.g., v2.59.0-RC1)'
+ required: true
+ type: string
+ container_tag:
+ description: 'Beam Go SDK Container Tag (e.g., 2.59.0rc1)'
+ required: true
+ type: string
+
+# This allows a subsequently queued workflow run to interrupt previous runs
+concurrency:
+ group: '${{ github.workflow }} @ ${{ github.event.inputs.rc_tag }}' # Group by RC tag
+ cancel-in-progress: true
+
+# Setting explicit permissions (copied from Java Mobile Gaming workflow)
+permissions:
+ actions: write
+ pull-requests: write
+ checks: write
+ contents: read
+ deployments: read
+ id-token: write # Note: Likely not needed for self-hosted runners without WIF
+ issues: write
+ discussions: read
+ packages: read
+ pages: read
+ repository-projects: read
+ security-events: read
+ statuses: read
+
+env:
+ GCS_OUTPUT_PREFIX: gs://rc-validation-migration-tests/go-wordcount # Constant output prefix
+ GCP_PROJECT_ID: apache-beam-testing
+ GCP_REGION: us-central1
+ GCS_TEMP_LOCATION: gs://rc-validation-migration-tests/temp/
+ GCS_INPUT_PATH: gs://apache-beam-samples/shakespeare/kinglear.txt
+
+jobs:
+ setup:
+ runs-on: self-hosted
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Set up environment
+ uses: ./.github/actions/setup-environment-action
+ with:
+ go-version: default
+
+ - name: Fetch Go SDK RC and Tidy Modules
+ working-directory: ./sdks/go/examples/wordcount
+ run: |
+ go get -d github.com/apache/beam/sdks/v2@${{ github.event.inputs.rc_tag }}
+ go mod tidy
+
+
+ validate-go-rc-prism:
+ needs: setup
+ runs-on: self-hosted # Changed to self-hosted
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Set up environment
+ uses: ./.github/actions/setup-environment-action
+ with:
+ go-version: default
+
+
+ # Assuming gcloud/gsutil is available and authenticated on the self-hosted runner
+ - name: Download Input File from GCS (Prism)
+ working-directory: ./sdks/go/examples/wordcount
+ run: gsutil cp ${{ env.GCS_INPUT_PATH }} ./kinglear.txt
+
+ - name: Run Go WordCount with PrismRunner
+ working-directory: ./sdks/go/examples/wordcount
+ run: |
+ go run wordcount.go \
+ --input ./kinglear.txt \
+ --output ./output_prism.txt \
+ --runner=PrismRunner \
+ --environment_type=DOCKER \
+ --environment_config=apache/beam_go_sdk:${{ github.event.inputs.container_tag }}
+
+ - name: Check output file
+ working-directory: ./sdks/go/examples/wordcount
+ run: |
+ echo "--- PrismRunner WordCount Output ---"
+ cat output_prism.txt* # Output might be sharded
+ echo "--- End Output ---"
+ # Basic check - verify the output file(s) exist and are not empty
+ if ls output_prism.txt* 1> /dev/null 2>&1 && [ -n "$(find . -name 'output_prism.txt*' -print -quit)" ]; then
Review Comment:
The check for output files uses both ls and find commands, which is redundant. Consider simplifying the condition by relying on a single method, such as find, for clarity and maintainability.
```suggestion
if [ -n "$(find . -name 'output_prism.txt*' -size +0 -print -quit)" ]; then
```
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org