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

Beam gcp test modules #26605

Closed
wants to merge 10 commits into from

Conversation

RustedBones
Copy link
Contributor

Moving test implementation in test modules.

Follow-up from #25713

See #25806

@@ -47,6 +47,9 @@ task windmillPreCommit(type: Test) {
"--tempRoot=${gcsTempRoot}",
"--runner=TestDataflowRunner",
"--dataflowWorkerJar=${dataflowWorkerJar}",
// Provide job with a customizable worker jar.
// With legacy worker jar, containerImage is set to empty (i.e. to use the internal build).
// More context and discussions can be found in PR#6694.
"--workerHarnessContainerImage=",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

By setting workerHarnessContainerImage to an empty string, we instruct to pick up the non-versioned image as explained in #6694. It looks like this image ignores the java version, and runs with java 8.

CI steps Java_Examples_Dataflow_Java11 and Java_Examples_Dataflow_Java17 are failing because the test lib target respectively java 11 and java 17.

Someone should ensure that the test image runs with proper java version

@RustedBones
Copy link
Contributor Author

@Abacn since you followed the original PR. Will leave this as draft until CI is fixed.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 9, 2023

This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@beam.apache.org list. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jul 9, 2023
@RustedBones
Copy link
Contributor Author

@Abacn sorry to tag you again. Can someone at dataflow/google check why the image used with workerHarnessContainerImage= does not respect the java version ?

@Abacn
Copy link
Contributor

Abacn commented Jul 10, 2023

Hi @RustedBones thanks for being persistent working on this. I did not understand why "testRuntimeMigration" and the java version issue either. It unfortunately becomes a tech debt when we updated gradle major version. Since everything working fine currently I just did not dig into further.

@RustedBones
Copy link
Contributor Author

RustedBones commented Jul 11, 2023

No worries, I'll try to summarize my findings:

  • moving test implementation in the test scope, so test classes and dependencies are not packaged in the main artifact
  • updating java example to depend on sdks:java:io:google-cloud-platform with testRuntimeMigration configuration
  • test configuration do not target java 8, but the java version used during compilation
  • in the Java_Examples_Dataflow_Java[11|17], we compile and run tests with the associated java version.

Most test work except those including --workerHarnessContainerImage=. This option looks to be used to take a base image without a worker jar. (taking the one compiled locally).
This image does not take in account the local java version used, and always runs with java 8. This causes issue as the classpath now contains compiled test classes targeting java 11/17 bytecode.

When removing the --workerHarnessContainerImage= option (running with the default dataflow image, packaging the worker), the tests pass, (default image respects the java version used during job submission).

IMHO, the problem simply lies in this specific dataflow image used for testing which needs to be updated to respect java version used during job submission.

@github-actions github-actions bot removed the stale label Jul 11, 2023
@github-actions
Copy link
Contributor

This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@beam.apache.org list. Thank you for your contributions.

@github-actions github-actions bot added the stale label Sep 10, 2023
@github-actions
Copy link
Contributor

This pull request has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.

@github-actions github-actions bot closed this Sep 17, 2023
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.

2 participants