Skip to content

Commit 4064120

Browse files
committed
addressed some comments
1 parent f8d19fe commit 4064120

File tree

1 file changed

+5
-38
lines changed

1 file changed

+5
-38
lines changed

.github/workflows/run_rc_validation_go_wordcount.yml

+5-38
Original file line numberDiff line numberDiff line change
@@ -43,34 +43,21 @@ env:
4343
jobs:
4444
setup:
4545
runs-on: self-hosted
46-
outputs:
47-
rc_tag: ${{ github.event.inputs.rc_tag }}
48-
container_tag: ${{ github.event.inputs.container_tag }}
4946
steps:
5047
- name: Checkout repository
5148
uses: actions/checkout@v4
5249

5350
- name: Set up environment
5451
uses: ./.github/actions/setup-environment-action
5552
with:
56-
go-version: default, otherwise remove if default is 1.21
53+
go-version: default
5754

5855
- name: Fetch Go SDK RC and Tidy Modules
5956
working-directory: ./sdks/go/examples/wordcount
6057
run: |
6158
go get -d github.com/apache/beam/sdks/v2@${{ github.event.inputs.rc_tag }}
6259
go mod tidy
6360
64-
# Cache Go modules to speed up subsequent jobs
65-
- name: Cache Go modules
66-
uses: actions/cache@v4
67-
with:
68-
path: |
69-
~/.cache/go-build
70-
~/go/pkg/mod
71-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
72-
restore-keys: |
73-
${{ runner.os }}-go-
7461
7562
validate-go-rc-prism:
7663
needs: setup
@@ -84,16 +71,6 @@ jobs:
8471
with:
8572
go-version: default
8673

87-
# Restore cached Go modules
88-
- name: Restore Go modules cache
89-
uses: actions/cache@v4
90-
with:
91-
path: |
92-
~/.cache/go-build
93-
~/go/pkg/mod
94-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
95-
restore-keys: |
96-
${{ runner.os }}-go-
9774

9875
# Assuming gcloud/gsutil is available and authenticated on the self-hosted runner
9976
- name: Download Input File from GCS (Prism)
@@ -108,7 +85,7 @@ jobs:
10885
--output ./output_prism.txt \
10986
--runner=PrismRunner \
11087
--environment_type=DOCKER \
111-
--environment_config=apache/beam_go_sdk:${{ needs.setup.outputs.container_tag }}
88+
--environment_config=apache/beam_go_sdk:${{ github.event.inputs.container_tag }}
11289
11390
- name: Check output file
11491
working-directory: ./sdks/go/examples/wordcount
@@ -136,23 +113,13 @@ jobs:
136113
with:
137114
go-version: default
138115

139-
# Restore cached Go modules
140-
- name: Restore Go modules cache
141-
uses: actions/cache@v4
142-
with:
143-
path: |
144-
~/.cache/go-build
145-
~/go/pkg/mod
146-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
147-
restore-keys: |
148-
${{ runner.os }}-go-
149116

150117
# Assuming gcloud is available and authenticated on the self-hosted runner
151118
- name: Run Go WordCount with DataflowRunner
152119
working-directory: ./sdks/go/examples/wordcount
153120
env:
154121
# Define output path based on constant prefix and RC tag for uniqueness
155-
GCS_OUTPUT_PATH: ${{ env.GCS_OUTPUT_PREFIX }}/${{ needs.setup.outputs.rc_tag }}/dataflow/output
122+
GCS_OUTPUT_PATH: ${{ env.GCS_OUTPUT_PREFIX }}/${{ github.event.inputs.rc_tag }}/dataflow/output
156123
run: |
157124
echo "Using output path: $GCS_OUTPUT_PATH"
158125
go run wordcount.go \
@@ -163,10 +130,10 @@ jobs:
163130
--region=${{ env.GCP_REGION }} \
164131
--temp_location=${{ env.GCS_TEMP_LOCATION }} \
165132
--environment_type=DOCKER \
166-
--environment_config=apache/beam_go_sdk:${{ needs.setup.outputs.container_tag }}
133+
--environment_config=apache/beam_go_sdk:${{ github.event.inputs.container_tag }}
167134
168135
# Note: Checking Dataflow output requires gcloud storage commands and depends on job completion.
169136
# This basic workflow focuses on submission. A more robust check would poll the job status
170137
# and then verify GCS output, which is significantly more complex.
171138
- name: Log Dataflow Job Submission Info
172-
run: echo "Dataflow job submitted. Check GCP console (project ${{ env.GCP_PROJECT_ID }}) for status and output at ${{ env.GCS_OUTPUT_PREFIX }}/${{ needs.setup.outputs.rc_tag }}/dataflow/output"
139+
run: echo "Dataflow job submitted. Check GCP console (project ${{ env.GCP_PROJECT_ID }}) for status and output at ${{ env.GCS_OUTPUT_PREFIX }}/${{ github.event.inputs.rc_tag }}/dataflow/output"

0 commit comments

Comments
 (0)