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

[FLINK-11767] Introduce new TypeSerializerUpgradeTestBase #10324

Closed
wants to merge 11 commits into from

Conversation

tzulitai
Copy link
Contributor

What is the purpose of the change

This PR introduces TypeSerializerUpgradeTestBase to fully replace TypeSerializerSnapshotMigrationTestBase.

The old test base needs to be replaced because it does not provide any means to generate test serializer snapshot files for each corresponding serializer. Before, what was written in the serializer snapshot test files and how they were written was not visible at all to developers, and also caused a lot of trouble when attempting to release new Flink versions and we have to generate new test files for the current version.

As part of this change, the PR introduces a utility class ClassRelocator.
This utility allows us to relocate classes to a different name.
We require this in the serializer upgrade tests, because some test scenarios attempt to test schema upgrades, e.g. adding / removing fields from a Pojo class.
The ClassRelocator utility allows us to define two different versions of a Pojo class under the same name (one pre-upgrade that is used for writing the test serializer snapshot file, and the other after upgrade used for upgrade verification).

Brief change log

  • ed1be69 introduces ClassRelocator
  • 24f8356 introduces new test base TypeSerializerUpgradeTestBase
  • 2bcdaed Adds a new PojoSerializer upgrade test based on the new test base.

Verifying this change

  • Run the new PojoSerializerUpgradeTest. It should work also in the IDE.
  • All test snapshot files should be auto-generated, if they do not exist.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
  • The serializers: (yes / no / don't know)
  • The runtime per-record code paths (performance sensitive): (yes / no / don't know)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes / no / don't know)
  • The S3 file system connector: (yes / no / don't know)

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

@flinkbot
Copy link
Collaborator

Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.

Automated Checks

Last check on commit 2bcdaed (Tue Nov 26 09:35:38 UTC 2019)

Warnings:

  • No documentation files were touched! Remember to keep the Flink docs up to date!

Mention the bot in a comment to re-run the automated checks.

Review Progress

  • ❓ 1. The [description] looks good.
  • ❓ 2. There is [consensus] that the contribution should go into to Flink.
  • ❓ 3. Needs [attention] from.
  • ❓ 4. The change fits into the overall [architecture].
  • ❓ 5. Overall code [quality] is good.

Please see the Pull Request Review Guide for a full explanation of the review process.


The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commands
The @flinkbot bot supports the following commands:

  • @flinkbot approve description to approve one or more aspects (aspects: description, consensus, architecture and quality)
  • @flinkbot approve all to approve all aspects
  • @flinkbot approve-until architecture to approve everything until architecture
  • @flinkbot attention @username1 [@username2 ..] to require somebody's attention
  • @flinkbot disapprove architecture to remove an approval you gave earlier

@flinkbot
Copy link
Collaborator

flinkbot commented Nov 26, 2019

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run travis re-run the last Travis build
  • @flinkbot run azure re-run the last Azure build

@igalshilman
Copy link
Contributor

Hi @tzulitai,
Thanks for working on this, indeed this seems like an important improvement.
I've checked the PR locally and ran PojoSerializerUpgradeTest, I've also used the base class to generate new test files and everything seems to work as expected.

LGTM 👍

@aljoscha aljoscha self-assigned this Dec 10, 2019
@aljoscha
Copy link
Contributor

This currently doesn't compile correctly because we use the wrong shaded ASM7 dependency. I fixed this and also added a couple more commits to add test support for Flink 1.8 and 1.9, once travis is green I'll merge this.

@aljoscha
Copy link
Contributor

I pushed my changes to this PR so that you can have a look.

cc @igalshilman

@tzulitai
Copy link
Contributor Author

tzulitai commented Dec 20, 2019

I went over @aljoscha's recent changes, +1 to merge.
Travis also gives green now.
Will proceed to merge this, thanks for the reviews and follow-ups @aljoscha @igalshilman.

@tzulitai
Copy link
Contributor Author

Manually merged.
master - 9362fc9
release-1.10 - 3c314fc

@tzulitai tzulitai closed this Dec 20, 2019
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.

5 participants