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

Fail later when duplicate transform translators are on the classpath #30252

Merged
merged 1 commit into from
Feb 8, 2024

Conversation

kennknowles
Copy link
Member

This makes us get IllegalArgumentException and clearer stack traces than the NoClassDefFound error which will only show up in the first attempt.

Separating this change and related refactors from #30235


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.

@Override
public Map<String, ExpansionService.TransformProvider> knownTransforms() {
ImmutableMap.Builder<String, ExpansionService.TransformProvider> builder =
Copy link
Member Author

Choose a reason for hiding this comment

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

I was getting duplicate key errors from this builder, which is not built until after everything. So this is actually the thing that specifically I needed to refactor to get more messages in the middle. (and I did figure out it was a splittable keyed pardo registration or something like that)

Copy link
Contributor

Choose a reason for hiding this comment

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

Ack. Didn't go through all this logic. Assume this is just a refactoring.

Copy link
Contributor

github-actions bot commented Feb 7, 2024

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

@kennknowles kennknowles force-pushed the fail-cleaner branch 2 times, most recently from 8dcb92f to 69940bd Compare February 7, 2024 22:22
This makes us get IllegalArgumentException and clearer stack traces than
the NoClassDefFound error which will only show up in the first
attempt.
Copy link
Contributor

@chamikaramj chamikaramj left a comment

Choose a reason for hiding this comment

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

Thanks. LGTM.

@Override
public Map<String, ExpansionService.TransformProvider> knownTransforms() {
ImmutableMap.Builder<String, ExpansionService.TransformProvider> builder =
Copy link
Contributor

Choose a reason for hiding this comment

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

Ack. Didn't go through all this logic. Assume this is just a refactoring.

@SuppressWarnings({
"rawtypes" // TODO(https://github.com/apache/beam/issues/20447)
})
public interface TransformProvider<InputT extends PInput, OutputT extends POutput> {
Copy link
Contributor

@chamikaramj chamikaramj Feb 7, 2024

Choose a reason for hiding this comment

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

Also, assuming this is just moving this from a inner class to a separate file. Lemme know if you want me to review this in detail.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yea it is just that. And I created the subclasses instead of anonymous subclasses to add the equals methods and all that. But just a boilerplate refactor.

@kennknowles kennknowles merged commit 382c6dc into apache:master Feb 8, 2024
22 of 23 checks passed
@kennknowles kennknowles deleted the fail-cleaner branch February 8, 2024 00:54
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