-
Notifications
You must be signed in to change notification settings - Fork 126
[FLINK-34234] Bumping version of flatten plugin to 1.2.7 #136
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
Conversation
- name: Check licensing | ||
run: | | ||
mvn ${MVN_COMMON_OPTIONS} exec:java@check-licensing -N \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
align with naming in pom
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That might deserve it's own hotfix commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, i was thinking about that however had some doubts...
Since you've also mentioned this I think we should do that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extracted into a separate commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your help, @snuyanzin. I verified that 7caf8cd which the failed build is based on matches the changes of this PR's first commit ab87bb4 The changes look good to me overall. I have a few comments. PTAL
- name: Check licensing | ||
run: | | ||
mvn ${MVN_COMMON_OPTIONS} exec:java@check-licensing -N \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That might deserve it's own hotfix commit
@@ -128,6 +131,7 @@ under the License. | |||
<groupId>org.apache.zookeeper</groupId> | |||
<artifactId>zookeeper</artifactId> | |||
<version>${zookeeper.version}</version> | |||
<optional>${flink.markBundledAsOptional}</optional> | |||
</dependency> | |||
<dependency> | |||
<groupId>io.netty</groupId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need that for BOMs?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
frankly speaking I don't know
I will see whether it will work without this (together with Flink tests)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not about BOMs
in general it does not make sense to add it for depedencies inside dependencyManagement
I removed it for others in dependencyManagement, thanks for noticing this 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate a bit here? It doesn't make sense because dependencies from the <dependencyManagement/>
section would need to be explicitly added to a module pom to make the dependency available and only then would we have to add the <optional/>
tag?!
Looks like we have 4 locations in flink-dist/pom.xml
and flink-filesystems/flink-s3-fs-presto/pom.xml
where this also applies. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be I was not clear enough, sorry
By saying
it does not make sense to add it for depedencies inside dependencyManagement
I ment not in general. Just for the case here
Here there is already existing dependency on zookeeper for every zookeeper module in dependencies which overrides the one from dependency management (optional tag).
Netty here comes only as a dependency from zookeeper and once zookeeper is marked optional maven started to think that netty is also becoming optional
I don't think this is the case for poms you've mentioned
pom.xml
Outdated
@@ -65,6 +65,7 @@ under the License. | |||
<netty.version>4.1.100.Final</netty.version> | |||
<jackson.version>2.15.3</jackson.version> | |||
<guava.version>32.1.3-jre</guava.version> | |||
<flink.markBundledAsOptional>true</flink.markBundledAsOptional> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't it make sense to upgrade the shade plugin to 3.4.1
here as well instead of having it only being upgraded for the jackson dependencies?
my understanding is (according to your comment in FLINK-34148) that the shade plugin stopped editing the dependency tree in 3.4.1.
Maven 3.3+ didn't allow editing the dependency tree anymore (based on the description in FLINK-28016). Shouldn't we have run into issues already earlier because we upgraded Maven in CI to 3.8.2 even though we were still using an older version of the shade plugin? It seems that I'm missing something here. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand things around MNG-5899 correctly in maven they stopped reuse dependency reduced pom produced by shade plugin however they didn't forbid manipulation on api level.
At the same time on api level it is still possible to get some info e.g. list of dependencies from maven and then make some manipulation in code with this list of dependencies, this is how it was in maven-shade-plugin [1]. After MSHADE-413 instead of manipulation on collection of objects received from maven they started to clone it first and then perform same manipulation on cloned version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, those were different issue. But that still leaves the question open whether we want to enable the more recent shade plugin version for all modules. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that was the plan
the only thing stopped me from making it here is that I was thinking about making ShadeOptionalChecker working which then could be backported to 18.x and then as a separate task sync maven-shade-plugin for all the modules
Or do you think it worth making it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair point 👍 a follow-up Jira task is fine as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, sure FLINK-34269
force-pushed since have to extract license related update into a separate commit |
.github/workflows/ci.yml
Outdated
- name: Check shade optional dependencies | ||
run: | | ||
mvn ${MVN_COMMON_OPTIONS} dependency:tree -Plicense-check | tee ${{ env.MVN_DEPENDENCY_PLUGIN_OUTPUT_FILE }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mvn ${MVN_COMMON_OPTIONS} dependency:tree -Plicense-check | tee ${{ env.MVN_DEPENDENCY_PLUGIN_OUTPUT_FILE }} | |
mvn ${MVN_COMMON_OPTIONS} dependency:tree | tee ${{ env.MVN_DEPENDENCY_PLUGIN_OUTPUT_FILE }} |
The profile is not necessary for the dependency:tree
IIUC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact it is...
The reason is that version suffix of several modules like guava, zookeeper is added only with this profile e.g. [1] and we need to know module name together with version suffix while parsing output of dependency:tree
flink-shaded/flink-shaded-guava-32/pom.xml
Lines 52 to 59 in b4f9ed2
<profiles> | |
<profile> | |
<id>license-check</id> | |
<properties> | |
<flink.ci.license.suffix>-32</flink.ci.license.suffix> | |
</properties> | |
</profile> | |
</profiles> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be we need to rename the profile itself... 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<!-- The license check and the optional shade check require the artifactId to match the directory that the module resides in.
hm, ok, if that's the case we could update the comment in the parent pom file to also mention the shade checker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -128,6 +131,7 @@ under the License. | |||
<groupId>org.apache.zookeeper</groupId> | |||
<artifactId>zookeeper</artifactId> | |||
<version>${zookeeper.version}</version> | |||
<optional>${flink.markBundledAsOptional}</optional> | |||
</dependency> | |||
<dependency> | |||
<groupId>io.netty</groupId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate a bit here? It doesn't make sense because dependencies from the <dependencyManagement/>
section would need to be explicitly added to a module pom to make the dependency available and only then would we have to add the <optional/>
tag?!
Looks like we have 4 locations in flink-dist/pom.xml
and flink-filesystems/flink-s3-fs-presto/pom.xml
where this also applies. 🤔
pom.xml
Outdated
@@ -65,6 +65,7 @@ under the License. | |||
<netty.version>4.1.100.Final</netty.version> | |||
<jackson.version>2.15.3</jackson.version> | |||
<guava.version>32.1.3-jre</guava.version> | |||
<flink.markBundledAsOptional>true</flink.markBundledAsOptional> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, those were different issue. But that still leaves the question open whether we want to enable the more recent shade plugin version for all modules. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my comments in the ticket before continuing with this PR.
Thanks for your feedback @zentol So I bumped the issue and currently reverted previous changes regarding shading... May be one question which is still not clear to me (not directly related to perf regression) [1] Lines 136 to 137 in b4f9ed2
|
That's because flink-shaded modules are all self-contained; no flink-shaded module depends on another flink-shaded module, due to which right now it's not affected by the problem we had in the main repo. This means you can probably use newer maven versions, but still shouldn't until we have added safeguards that either no interdependencies between modules exist or everything is marked as optional. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 I verified that 1.2.7 is the newest 1.2.x patch version
As a test [1] there was first a commit with enablingShadeOptionalChecker
however without addingoptional
. As a result it detects the issue i a number of places.UPD: Since bumping version of flatten plugin helps I reverted changes (to not force push) and added version bump itself to 1.2.7
also keep a couple of hotfix commits as a result of review