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

[Avro] Deprecate Avro API classes in "sdks/java/core" #25534

Merged
merged 1 commit into from
Feb 22, 2023

Conversation

aromanenko-dev
Copy link
Contributor

@aromanenko-dev aromanenko-dev commented Feb 17, 2023

[!!!] It must be merged ONLY AFTER #24992 is merged. [!!!]

All Beam modules are migrated to use sdks/java/extensions/avro. So it's needed to deprecate Avro API classes in sdks/java/core but keep them for a while for a sake of backward compatibility.

Affected classes:

  • org.apache.beam.sdk.coders.AvroCoder
  • org.apache.beam.sdk.coders.AvroGenericCoder
  • org.apache.beam.sdk.io.AvroIO
  • org.apache.beam.sdk.io.AvroSource
  • org.apache.beam.sdk.io.DynamicAvroDestinations
  • org.apache.beam.sdk.io.AvroSchemaIOProvider
  • org.apache.beam.sdk.io.AvroSink
  • org.apache.beam.sdk.io.SerializableAvroCodecFactory (package private)
  • org.apache.beam.sdk.io.ConstantAvroDestination (package private)
  • org.apache.beam.sdk.schemas.utils.AvroUtils
  • org.apache.beam.sdk.schemas.utils.AvroByteBuddyUtils (package private)
  • org.apache.beam.sdk.schemas.utils.ConvertHelpers
  • org.apache.beam.sdk.schemas.AvroRecordSchema

Fixes #24749


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.

@aromanenko-dev
Copy link
Contributor Author

R: @mosche
PTAL

@aromanenko-dev
Copy link
Contributor Author

CC: @reuvenlax @kennknowles @lukecwik

@aromanenko-dev
Copy link
Contributor Author

CC: @Abacn

@github-actions
Copy link
Contributor

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

@@ -107,10 +107,14 @@
* org.apache.beam.sdk.transforms.GroupByKey} operations.
*
* @param <T> the type of elements handled by this coder
* @deprecated Avro classes are deprecated to use in module <code>beam-sdks-java-core</code> and
Copy link
Member

Choose a reason for hiding this comment

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

Nitpick... maybe like below? Though not important

Suggested change
* @deprecated Avro classes are deprecated to use in module <code>beam-sdks-java-core</code> and
* @deprecated Avro related classes are deprecated in module <code>beam-sdks-java-core</code> and

Copy link
Member

Choose a reason for hiding this comment

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

Please also mention the new import that should be used instead to make the migration as easy as possible. Same for all below...

CHANGES.md Outdated
@@ -88,6 +88,7 @@
## Deprecations

* X behavior is deprecated and will be removed in X versions ([#X](https://github.com/apache/beam/issues/X)).
* Avro classes are deprecated to use in module `beam-sdks-java-core` and will be eventually removed ([#24749](https://github.com/apache/beam/issues/24749)).
Copy link
Member

@mosche mosche Feb 22, 2023

Choose a reason for hiding this comment

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

Nitpick... maybe like below? Though not important

Suggested change
* Avro classes are deprecated to use in module `beam-sdks-java-core` and will be eventually removed ([#24749](https://github.com/apache/beam/issues/24749)).
* Avro related classes are deprecated in module `beam-sdks-java-core` and will be eventually removed ([#24749](https://github.com/apache/beam/issues/24749)).

Copy link
Member

Choose a reason for hiding this comment

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

It would be good to add a short note how to migrate, e.g. mentioning the new module and package name to use.

@aromanenko-dev
Copy link
Contributor Author

@mosche Thanks for review, I addressed your comments, ptal

@aromanenko-dev
Copy link
Contributor Author

retest this please

Copy link
Member

@mosche mosche left a comment

Choose a reason for hiding this comment

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

Thanks for adding the migration notes @aromanenko-dev 💯

@aromanenko-dev
Copy link
Contributor Author

retest this please

Copy link
Contributor

@Abacn Abacn left a comment

Choose a reason for hiding this comment

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

Thanks

@github-actions
Copy link
Contributor

Assigning reviewers. If you would like to opt out of this review, comment assign to next reviewer:

R: @apilloud for label java.

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

@aromanenko-dev aromanenko-dev merged commit 5b59377 into apache:master Feb 22, 2023
@aromanenko-dev
Copy link
Contributor Author

Failed checks are not related to this change

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]: [Avro] Deprecate Avro API classes in "sdks/java/core"
3 participants