beam icon indicating copy to clipboard operation
beam copied to clipboard

start to refactor persistence layer to prepare for direct path

Open m-trieu opened this issue 1 year ago • 2 comments

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, comment fixes #<ISSUE NUMBER> instead.
  • [ ] Update CHANGES.md with 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)

Build python source distribution and wheels Python tests Java tests Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

m-trieu avatar Feb 08 '24 23:02 m-trieu

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

github-actions[bot] avatar Feb 09 '24 00:02 github-actions[bot]

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 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).

github-actions[bot] avatar Feb 09 '24 00:02 github-actions[bot]

ready for another look @scwhittle

m-trieu avatar Feb 21 '24 22:02 m-trieu

Run Java Precommit

m-trieu avatar Feb 21 '24 22:02 m-trieu

Run Java PreCommit

scwhittle avatar Feb 22 '24 13:02 scwhittle

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 avatar Feb 22 '24 14:02 scwhittle

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

m-trieu avatar Feb 22 '24 20:02 m-trieu

Run Java PreCommit

scwhittle avatar Feb 22 '24 22:02 scwhittle

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.

scwhittle avatar Feb 22 '24 22:02 scwhittle