-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-22555][build][python] Exclude leftover jboss files #15827
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
|
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit 2632d0b (Sat Aug 28 11:18:00 UTC 2021) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. DetailsThe 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 commandsThe @flinkbot bot supports the following commands:
|
tillrohrmann
left a comment
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 creating this PR @zentol. The change looks in general good to me. It seems that the module flink-connector-cassandra_2.11 does not pick up the exclusion. Moreover, the e2e test Quickstarts Java nightly end-to-end test fails on AZP. It would be good to verify that this is not caused by your changes.
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've built Flink and checked via find . -name "*.jar" | grep -v -e "tests.jar" | grep -v -e "original-" | grep -v -e "flink-examples" | grep -v -e "flink-end-to-end" | while read line; do echo $line; echo; jar tf $line | grep META-INF/maven; done
flink-dist_2.11-1.14-SNAPSHOT.jar
META-INF/versions/11/META-INF/maven/
META-INF/versions/11/META-INF/maven/javax.activation/
META-INF/versions/11/META-INF/maven/javax.activation/javax.activation-api/
META-INF/versions/11/META-INF/maven/javax.activation/javax.activation-api/pom.xml
META-INF/versions/11/META-INF/maven/javax.activation/javax.activation-api/pom.properties
META-INF/versions/11/META-INF/maven/javax.xml.bind/
META-INF/versions/11/META-INF/maven/javax.xml.bind/jaxb-api/
META-INF/versions/11/META-INF/maven/javax.xml.bind/jaxb-api/pom.xml
META-INF/versions/11/META-INF/maven/javax.xml.bind/jaxb-api/pom.properties
META-INF/maven/
META-INF/maven/org.apache.flink/
META-INF/maven/org.apache.flink/flink-dist_2.11/
META-INF/maven/org.apache.flink/flink-dist_2.11/pom.xml
META-INF/maven/org.apache.flink/flink-dist_2.11/pom.properties
META-INF/maven/org.apache.commons/
META-INF/maven/org.apache.commons/commons-lang3/
META-INF/maven/org.apache.commons/commons-lang3/pom.xml
META-INF/maven/org.apache.commons/commons-lang3/pom.properties
META-INF/maven/com.esotericsoftware.kryo/
META-INF/maven/com.esotericsoftware.kryo/kryo/
META-INF/maven/com.esotericsoftware.kryo/kryo/pom.properties
META-INF/maven/com.esotericsoftware.kryo/kryo/pom.xml
META-INF/maven/com.esotericsoftware.reflectasm/
META-INF/maven/com.esotericsoftware.reflectasm/reflectasm/
META-INF/maven/com.esotericsoftware.reflectasm/reflectasm/pom.xml
META-INF/maven/com.esotericsoftware.reflectasm/reflectasm/pom.properties
META-INF/maven/com.esotericsoftware.minlog/
META-INF/maven/com.esotericsoftware.minlog/minlog/
META-INF/maven/com.esotericsoftware.minlog/minlog/pom.xml
META-INF/maven/com.esotericsoftware.minlog/minlog/pom.properties
META-INF/maven/commons-collections/
META-INF/maven/commons-collections/commons-collections/
META-INF/maven/commons-collections/commons-collections/pom.xml
META-INF/maven/commons-collections/commons-collections/pom.properties
META-INF/maven/org.apache.commons/commons-compress/
META-INF/maven/org.apache.commons/commons-compress/pom.xml
META-INF/maven/org.apache.commons/commons-compress/pom.properties
META-INF/maven/org.apache.commons/commons-math3/
META-INF/maven/org.apache.commons/commons-math3/pom.xml
META-INF/maven/org.apache.commons/commons-math3/pom.properties
META-INF/maven/jline/
META-INF/maven/jline/jline/
META-INF/maven/jline/jline/pom.properties
META-INF/maven/jline/jline/pom.xml
META-INF/maven/commons-io/
META-INF/maven/commons-io/commons-io/
META-INF/maven/commons-io/commons-io/pom.xml
META-INF/maven/commons-io/commons-io/pom.properties
META-INF/maven/commons-cli/
META-INF/maven/commons-cli/commons-cli/
META-INF/maven/commons-cli/commons-cli/pom.xml
META-INF/maven/commons-cli/commons-cli/pom.properties
META-INF/maven/org.javassist/
META-INF/maven/org.javassist/javassist/
META-INF/maven/org.javassist/javassist/pom.properties
META-INF/maven/org.javassist/javassist/pom.xml
META-INF/maven/org.apache.flink/flink-kubernetes_2.11/
META-INF/maven/org.apache.flink/flink-kubernetes_2.11/pom.xml
META-INF/maven/org.apache.flink/flink-kubernetes_2.11/pom.properties
META-INF/maven/io.fabric8/
META-INF/maven/io.fabric8/kubernetes-client/
META-INF/maven/io.fabric8/kubernetes-client/pom.xml
META-INF/maven/io.fabric8/kubernetes-client/pom.properties
META-INF/maven/io.fabric8/kubernetes-model/
META-INF/maven/io.fabric8/kubernetes-model/pom.properties
META-INF/maven/io.fabric8/kubernetes-model/pom.xml
META-INF/maven/io.fabric8/kubernetes-model-common/
META-INF/maven/io.fabric8/kubernetes-model-common/pom.xml
META-INF/maven/io.fabric8/kubernetes-model-common/pom.properties
META-INF/maven/com.squareup.okhttp3/
META-INF/maven/com.squareup.okhttp3/okhttp/
META-INF/maven/com.squareup.okhttp3/okhttp/pom.properties
META-INF/maven/com.squareup.okhttp3/okhttp/pom.xml
META-INF/maven/com.squareup.okio/
META-INF/maven/com.squareup.okio/okio/
META-INF/maven/com.squareup.okio/okio/pom.xml
META-INF/maven/com.squareup.okio/okio/pom.properties
META-INF/maven/com.squareup.okhttp3/logging-interceptor/
META-INF/maven/com.squareup.okhttp3/logging-interceptor/pom.xml
META-INF/maven/com.squareup.okhttp3/logging-interceptor/pom.properties
META-INF/maven/com.fasterxml.jackson.dataformat/
META-INF/maven/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/
META-INF/maven/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/pom.properties
META-INF/maven/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/pom.xml
META-INF/maven/org.yaml/
META-INF/maven/org.yaml/snakeyaml/
META-INF/maven/org.yaml/snakeyaml/pom.properties
META-INF/maven/org.yaml/snakeyaml/pom.xml
META-INF/maven/com.fasterxml.jackson.datatype/
META-INF/maven/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/
META-INF/maven/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/pom.properties
META-INF/maven/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/pom.xml
META-INF/maven/com.fasterxml.jackson.core/
META-INF/maven/com.fasterxml.jackson.core/jackson-annotations/
META-INF/maven/com.fasterxml.jackson.core/jackson-annotations/pom.properties
META-INF/maven/com.fasterxml.jackson.core/jackson-annotations/pom.xml
META-INF/maven/com.fasterxml.jackson.core/jackson-databind/
META-INF/maven/com.fasterxml.jackson.core/jackson-databind/pom.properties
META-INF/maven/com.fasterxml.jackson.core/jackson-databind/pom.xml
META-INF/maven/com.fasterxml.jackson.core/jackson-core/
META-INF/maven/com.fasterxml.jackson.core/jackson-core/pom.properties
META-INF/maven/com.fasterxml.jackson.core/jackson-core/pom.xml
META-INF/maven/io.fabric8/zjsonpatch/
META-INF/maven/io.fabric8/zjsonpatch/pom.properties
META-INF/maven/io.fabric8/zjsonpatch/pom.xml
META-INF/maven/org.apache.flink/force-shading/
META-INF/maven/org.apache.flink/force-shading/pom.xml
META-INF/maven/org.apache.flink/force-shading/pom.properties
META-INF/maven/org.slf4j/
META-INF/maven/org.slf4j/slf4j-api/
META-INF/maven/org.slf4j/slf4j-api/pom.xml
META-INF/maven/org.slf4j/slf4j-api/pom.properties
./flink-kubernetes/target/flink-kubernetes_2.11-1.14-SNAPSHOT.jar
META-INF/maven/
META-INF/maven/org.apache.flink/
META-INF/maven/org.apache.flink/flink-kubernetes_2.11/
META-INF/maven/org.apache.flink/flink-kubernetes_2.11/pom.xml
META-INF/maven/org.apache.flink/flink-kubernetes_2.11/pom.properties
META-INF/maven/io.fabric8/
META-INF/maven/io.fabric8/kubernetes-client/
META-INF/maven/io.fabric8/kubernetes-client/pom.xml
META-INF/maven/io.fabric8/kubernetes-client/pom.properties
META-INF/maven/io.fabric8/kubernetes-model/
META-INF/maven/io.fabric8/kubernetes-model/pom.properties
META-INF/maven/io.fabric8/kubernetes-model/pom.xml
META-INF/maven/io.fabric8/kubernetes-model-common/
META-INF/maven/io.fabric8/kubernetes-model-common/pom.xml
META-INF/maven/io.fabric8/kubernetes-model-common/pom.properties
META-INF/maven/com.squareup.okhttp3/
META-INF/maven/com.squareup.okhttp3/okhttp/
META-INF/maven/com.squareup.okhttp3/okhttp/pom.properties
META-INF/maven/com.squareup.okhttp3/okhttp/pom.xml
META-INF/maven/com.squareup.okio/
META-INF/maven/com.squareup.okio/okio/
META-INF/maven/com.squareup.okio/okio/pom.xml
META-INF/maven/com.squareup.okio/okio/pom.properties
META-INF/maven/com.squareup.okhttp3/logging-interceptor/
META-INF/maven/com.squareup.okhttp3/logging-interceptor/pom.xml
META-INF/maven/com.squareup.okhttp3/logging-interceptor/pom.properties
META-INF/maven/com.fasterxml.jackson.dataformat/
META-INF/maven/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/
META-INF/maven/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/pom.properties
META-INF/maven/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/pom.xml
META-INF/maven/org.yaml/
META-INF/maven/org.yaml/snakeyaml/
META-INF/maven/org.yaml/snakeyaml/pom.properties
META-INF/maven/org.yaml/snakeyaml/pom.xml
META-INF/maven/com.fasterxml.jackson.datatype/
META-INF/maven/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/
META-INF/maven/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/pom.properties
META-INF/maven/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/pom.xml
META-INF/maven/com.fasterxml.jackson.core/
META-INF/maven/com.fasterxml.jackson.core/jackson-annotations/
META-INF/maven/com.fasterxml.jackson.core/jackson-annotations/pom.properties
META-INF/maven/com.fasterxml.jackson.core/jackson-annotations/pom.xml
META-INF/maven/com.fasterxml.jackson.core/jackson-databind/
META-INF/maven/com.fasterxml.jackson.core/jackson-databind/pom.properties
META-INF/maven/com.fasterxml.jackson.core/jackson-databind/pom.xml
META-INF/maven/com.fasterxml.jackson.core/jackson-core/
META-INF/maven/com.fasterxml.jackson.core/jackson-core/pom.properties
META-INF/maven/com.fasterxml.jackson.core/jackson-core/pom.xml
META-INF/maven/io.fabric8/zjsonpatch/
META-INF/maven/io.fabric8/zjsonpatch/pom.properties
META-INF/maven/io.fabric8/zjsonpatch/pom.xml
And in general the jars of the connectors also seem to contain a non empty META-INF/maven directory.
8764643 to
7a82a27
Compare
|
Well this was quite an ordeal. The quickstart test failure was related; archetype jars contain an archetype-metadata.xml file under We then had various files still containing poms under Once cause was jars being built with the The second cause was various modules using ever so slightly shade-plugin setups; some were flat-out overriding the configuration of the parent so they didn't inherit things (like cassandra), others like flink-dist have special shade-plugin executions for reasons. This was resolved by moving the filters (and common transformers, while I was at it) into the general configuration of the shade-plugin (i.e., independent of any execution) and making small adjustments here and there as to how configurations are inherited/merged. Finally, the java11 exclusive dependencies still contained poms, because the pattern assumed this directory to always be present under |
| <goals> | ||
| <goal>shade</goal> | ||
| </goals> | ||
| <configuration combine.self="override"> |
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.
this removal is safe because it is a distinct execution, and hence never had any effect.
| <goals> | ||
| <goal>shade</goal> | ||
| </goals> | ||
| <configuration combine.self="override"> |
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.
this removal is safe because it is a distinct execution, and hence never had any effect.
| <goals> | ||
| <goal>shade</goal> | ||
| </goals> | ||
| <configuration combine.self="override"> |
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.
this removal is safe because it the override was plain unnecessary, and we get rid of an odd special case.
| <goals> | ||
| <goal>shade</goal> | ||
| </goals> | ||
| <configuration combine.children="append"> |
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.
afaik this doesn't make sense and just results in any parent configurations being ignored. Similar to cassandra it is unnecessary because we aren't doing anything special, and we get rid of an odd special case.
| <configuration> | ||
| <archive> | ||
| <!-- Globally exclude maven metadata, because it may accidentally bundle files we don't intend to --> | ||
| <addMavenDescriptor>false</addMavenDescriptor> |
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.
ideally we move this into the pluginManagement section in the root pom, but I already spent too much time on this ticket (and actually pin the plugin version...)
| <artifactId>maven-shade-plugin</artifactId> | ||
| <executions> | ||
| <execution> | ||
| <id>shade-dist</id> |
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.
This is essentially just a safeguard against accidentally inheriting something from somewhere.
tillrohrmann
left a comment
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 updating this PR @zentol. As far as I can tell, the changes look good to me. I built Flink and checked the flink-dist contents. I could not find any problematic contents.
Nit: The quickstarts still contain some logic to deactivate the maven-shade plugin. I guess they can be removed now.
| The initial '**' allows the pattern to also work for multi-release jars that may contain such entries under | ||
| 'META-INF/versions/11/META-INF/maven/'. | ||
| --> | ||
| <exclude>**/META-INF/maven/?*/?*/**</exclude> |
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.
Would it work to explicitly add the archetype-metadata.xml in the quickstart as an inclusion?
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 had the same idea, but don't think it would work because exclusions are used to narrow down inclusions.
The default inclusion is *, matching all files and we exclude some of those..
If set an inclusion for archetype-metadata.xml, then all other files are implicitly excluded. We'd need include for everything we truly want in the jar, but that seems like more overhead than the current approach.
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.
Ah ok. Then let's keep the current solution.
…hade-plugin configuration
Removes auto-generated maven metadata from all jars as this may accidentally bundle poms under incompatible licenses, and adds another exclusions for jboss schema files contained in flink-python.