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

Restore Feast Java SDK and Ingestion compatibility with Java 8 runtimes #722

Merged
merged 2 commits into from
May 22, 2020

Conversation

ches
Copy link
Member

@ches ches commented May 21, 2020

What this PR does / why we need it:

Restores Feast Ingestion compatibility with Java 8 runtimes.

With the addition of the Storage APIs and connector implementations, we did not specify that their build should target Java 8 bytecode. Because Ingestion depends on them and bundles them in an uber jar, we regressed on keeping Ingestion compatible with Java 8 runtimes according to #518.

This could be confirmed prior to this change on master with, for example:

$ mvn -pl ingestion clean compile
$ javap -v storage/connectors/redis/target/classes/feast/storage/connectors/redis/writer/RedisCustomIO.class | grep major
  major version: 55

I take this as proof that a blacklist approach with 11 as the default in our root POM is error prone, so this change flips it so that 8 is default and our leaf applications that are able use 11 opt into it in whitelist fashion.

This should be backported to v0.5-branch, I believe.

Which issue(s) this PR fixes:

None, perhaps should have filed a bug separately, but this can be bug and fix in one ☺️

Does this PR introduce a user-facing change?:

- Restores Feast Ingestion compatibility with Java 8 runtimes
- Restores Feast Java SDK compatibility with Java 8 runtimes

@ches ches added kind/bug backport-candidate Changes that may be desired for backport to earlier Feast release tracks labels May 21, 2020
Comment on lines +83 to +85
We want to keep Ingestion compatible with Java 8 runtime for Beam runners, #518.
Unfortunately this doesn't seem to work on Reactor modules, though:
https://github.com/mojohaus/mojo-parent/issues/85
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 hoped that this would fail before applying the fix, verifying that it could catch this problem, but it didn't. I kept this in, because if it does fail on third-party dependencies, we would probably like to know if/when it changes in the future. This rule is from extra-enforcer-rules which was added #451 but not actually used for anything so far, I think.

@ches
Copy link
Member Author

ches commented May 21, 2020

/hold

Tests need compilation fixes

@ches
Copy link
Member Author

ches commented May 21, 2020

/retest

@ches
Copy link
Member Author

ches commented May 21, 2020

/hold cancel

@ches
Copy link
Member Author

ches commented May 21, 2020

/retest

@ches
Copy link
Member Author

ches commented May 21, 2020

/assign @zhilingc

sdk/java/pom.xml Outdated
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>11</release>
Copy link
Member Author

@ches ches May 21, 2020

Choose a reason for hiding this comment

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

Somewhat of a question whether SDK should build for 8 or 11 perhaps. It seems like the ecosystem still widely supports 8 for libraries. Here it was implicitly 11 since that became default in the root, so I preserved that, but I can also change it now if there is a desire to. Needs a small code change in tests I think.

Copy link
Collaborator

@zhilingc zhilingc May 21, 2020

Choose a reason for hiding this comment

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

What a timely comment - @khorshuheng just ran into this during our upgrade today :')

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'll take that as a real-world indicator that yes, we should keep it Java 8-compatible. Pushed this change.

@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ches
To complete the pull request process, please assign zhilingc
You can assign the PR to them by writing /assign @zhilingc in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

ches added 2 commits May 22, 2020 00:37
With the addition of the Storage APIs and connector implementations, we
did not specify that their build should target Java 8 bytecode. Because
Ingestion depends on them, we regressed on keeping Ingestion compatible
with Java 8 runtimes according to feast-dev#518.

This could be confirmed prior to this change with, for example:

    $ mvn -pl ingestion clean compile
    $ javap -v storage/connectors/redis/target/classes/feast/storage/connectors/redis/writer/RedisCustomIO.class | grep major
      major version: 55

I take this as proof that a blacklist approach with 11 as the default in
our root POM is error prone, so this change flips it so that 8 is
default and our leaf applications that are able use 11 opt into it in
whitelist fashion.
@ches ches force-pushed the storage-api-java-8 branch from b4960dd to 2e0c16a Compare May 21, 2020 17:37
@ches
Copy link
Member Author

ches commented May 21, 2020

Rebased so #725 should fix the build.

@ches
Copy link
Member Author

ches commented May 21, 2020

/retest

gamble

@ches ches changed the title Make storage modules target Java 8, since Ingestion must Restore Feast Java SDK and Ingestion compatibility with Java8 runtimes May 21, 2020
@ches ches changed the title Restore Feast Java SDK and Ingestion compatibility with Java8 runtimes Restore Feast Java SDK and Ingestion compatibility with Java 8 runtimes May 21, 2020
@woop
Copy link
Member

woop commented May 22, 2020

It's not clear why these e2e tests are failing inside Docker Compose, yet they work when run outside of it. I have removed the from PRs and allow them only to run on master for the time being. Unfortunately I cant remove it from the list of checks, so we probably have to force merge once you are ready.

Created to track the issue #726

@ches
Copy link
Member Author

ches commented May 22, 2020

Unfortunately I cant remove it from the list of checks, so we probably have to force merge once you are ready.

This is ready from my side, if it makes sense to everyone else. Ditto for #721 blocked by the misbehaved check.

@woop woop merged commit 8538769 into feast-dev:master May 22, 2020
@ches ches deleted the storage-api-java-8 branch May 23, 2020 04:37
ches added a commit that referenced this pull request May 23, 2020
@ches ches added area/ingestion The ingestion Beam component and storage-related items area/sdks labels May 23, 2020
woop pushed a commit that referenced this pull request May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ingestion The ingestion Beam component and storage-related items area/sdks backport-candidate Changes that may be desired for backport to earlier Feast release tracks kind/bug size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants