start to refactor persistence layer to prepare for direct path
Change classes that explicitly inject a MetricTrackingWindmillServerStub to take in a Function.
This will give flexibility in later refactoring as we apply different ways to fetch the data without MetricTrackingWindmillServerStub.
Add PersistentStateReadMetricsTracker, which is similar to MetricTrackingWindmillServerStub but allows callers to inject a GetDataStream (which is necessary for direct path since the calls need to be appropriately routed) and is streaming engine specific.
R: @scwhittle
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, commentfixes #<ISSUE NUMBER>instead. - [ ] Update
CHANGES.mdwith noteworthy changes. - [ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.
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.
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers
Assigning reviewers. If you would like to opt out of this review, comment assign to next reviewer:
R: @robertwb added as fallback since no labels match configuration
Available commands:
stop reviewer notifications- opt out of the automated review toolingremind me after tests pass- tag the comment author after tests passwaiting 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).
ready for another look @scwhittle
Run Java Precommit
Run Java PreCommit
Looks like this assert failed in test: https://github.com/apache/beam/blob/0bce6d7a834c521a3d3043ab9377fcd2f2e16f0a/runners/google-cloud-dataflow-java/worker/src/test/java/org/apache/beam/runners/dataflow/worker/StreamingDataflowWorkerTest.java#L3355
Could be flaky if doesn't wait enough to get commit or it could be an indication that the heartbeat response plumbing isn't working.
Looks like this assert failed in test:
https://github.com/apache/beam/blob/0bce6d7a834c521a3d3043ab9377fcd2f2e16f0a/runners/google-cloud-dataflow-java/worker/src/test/java/org/apache/beam/runners/dataflow/worker/StreamingDataflowWorkerTest.java#L3355
Could be flaky if doesn't wait enough to get commit or it could be an indication that the heartbeat response plumbing isn't working.
@scwhittle ran locally and it passed. looks we depend on sleep() in the test, and i wonder if that leads to flakiness in the GitHub actions environment?
Map<Long, Windmill.WorkItemCommitRequest> commits =
server.waitForAndGetCommitsWithTimeout(2, Duration.standardSeconds((5)));
assertEquals(1, commits.size());
also kind of strange that we are waiting for 2 commits but are asserting that there is only 1 commit.
But looks like this is a flaky test failure
Run Java PreCommit
That test expects 1 commit but meant to wait for some extra time to make sure there were not 2. But it should do so perhaps with larger time limit for 1 and then shorter time limit to verify more don't show up.