Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finalize Java Prism Runner #32264

Closed
wants to merge 7 commits into from

Conversation

damondouglas
Copy link
Contributor

@damondouglas damondouglas commented Aug 21, 2024

This PR closes #31967, closes #31935, and closes #31935 with a Java Prism Runner.

  • Resolves, downloads and executes Prism via PrismLocator/Executor
  • Wraps PipelineResult methods delegating to the portability module's JobServicePipelineResult
  • Refactors numerous faulty closures in the portability, harness modules; some still remain
  • Detects whether run invoked within a Test class in the stack and invokes waitUntilFinish

Currently there's a limitation that the one has to look at the gradle output for whether the test passed as the Job failure isn't getting caught. See #32263.


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.

@damondouglas
Copy link
Contributor Author

R: @lostluck
I'll flip to ready after tests pass

Copy link
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment assign set of reviewers

@damondouglas damondouglas marked this pull request as ready for review August 21, 2024 05:23
Copy link
Contributor

@lostluck lostluck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding #32263, please make it clear whether or not it's using the standard testing practice of the TestPipeline rule. I note that TestPipeline isn't being used in the PrismRunnerTests.

See https://beam.apache.org/documentation/pipelines/test-your-pipeline/#testpipeline

if (Strings.isNullOrEmpty(prismPipelineOptions.getJobEndpoint())) {
prismPipelineOptions.setJobEndpoint(DEFAULT_PRISM_ENDPOINT);
if (Strings.isNullOrEmpty(options.getJobEndpoint())) {
options.setJobEndpoint(DEFAULT_PRISM_ENDPOINT);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default behavior shouldn't be a port that prism selects, but the one this caller selects for prism. There's no guarantee that 8073 is ever free or remains free.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's an easy fix. I can have it select randomly based on the freely available.

pipeline.run();
}

@Ignore("Unable to find inbound timer receiver for instruction")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was fixed by one of my recent PRs.

}

@Ignore
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this test being ignored?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Late night pull request is the reason.

@@ -150,14 +153,12 @@ public Server getServer() {

@Override
public void close() throws Exception {
LOG.info("Shutting down");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll want to remove this debug logging at least, as this will apply to all portable Java jobs for each FnAPI service.

It's not clear we actually want to include the changes in this file, as the previous version was more robust and already calling the various shutdown sequences.

It also has a higher blast radius than the other cleanups you're applying.

@damondouglas
Copy link
Contributor Author

Closed due to reversion need of #32247

@damondouglas damondouglas deleted the prism-runner-final branch September 25, 2024 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task][Prism]: Create a PrismRunnerRegistrar [Task][Prism]: Create a PipelineResult implementation
2 participants