[#29760] Only respond to sampling request while data sampling is enabled#29761
Conversation
|
Run Go PostCommit |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #29761 +/- ##
==========================================
- Coverage 38.07% 38.07% -0.01%
==========================================
Files 696 696
Lines 101534 101534
==========================================
- Hits 38656 38655 -1
- Misses 61263 61264 +1
Partials 1615 1615
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
| }, | ||
| } | ||
| case req.GetSampleData() != nil: | ||
| case req.GetSampleData() != nil && c.dataSampler != nil: |
There was a problem hiding this comment.
This isn't an ideal fix.
As much as the Runner shouldn't be sending sample requests, this sends "fail" response back to the Runner, which may abort job processing depending on the runner.
It would be better to send "empty" responses with no sampleData in this case instead.
if c.dataSampler != nil {
return &fnpb.InstructionResponse{
InstructionId: string(instID),
Response: &fnpb.InstructionResponse_SampleData{},
}
}
There was a problem hiding this comment.
Basically, yes, Dataflow is incorrect to be sending these requests, however, the SDK shouldn't send responses that might cause the job to fail.
There was a problem hiding this comment.
Updated with empty response when data sampling is not enabled.
|
"Run Go PostCommit" |
|
Run Go PostCommit |
lostluck
left a comment
There was a problem hiding this comment.
LGTM. I'll merge in once I validate the postcommit.
|
Apparently PostCommit trigger phrases are currently too expensive (fair), so a work around is to add a file to the PR. (The one listed here: https://github.com/apache/beam/blob/master/.github%2Fworkflows%2Fbeam_PostCommit_Go.yml#L22C1-L22C1) I'll skip that for now since the fix is straightforward. Merging once the precommits are done. |
|
PostCommit run with this change: https://github.com/apache/beam/actions/runs/7201639105 |
Fix to panic caused by handling data sampling request when it's not enabled.
Fixes #29760
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
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, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.