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-34955] Upgrade commons-compress to 1.26.0. #24580

Merged
merged 10 commits into from
Apr 2, 2024

Conversation

slfan1989
Copy link
Contributor

What is the purpose of the change

JIRA: [FLINK-34955] Upgrade commons-compress to 1.26.0.

commons-compress 1.24.0 has CVE issues, try to upgrade to 1.26.0, we can refer to the maven link

https://mvnrepository.com/artifact/org.apache.commons/commons-compress

Brief change log

(for example:)

  • The TaskInfo is stored in the blob store on job creation time as a persistent artifact
  • Deployments RPC transmits only the blob storage reference
  • TaskManagers retrieve the TaskInfo from the blob cache

Verifying this change

Please make sure both new and modified tests in this PR follows the conventions defined in our code quality guide: https://flink.apache.org/contributing/code-style-and-quality-common.html#testing

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (100MB)
  • Extended integration test for recovery after master (JobManager) failure
  • Added test that validates that TaskInfo is transferred only once across recoveries
  • Manually verified the change by running a 4 node cluster with 2 JobManagers and 4 TaskManagers, a stateful streaming program, and killing one JobManager and two TaskManagers during the execution, verifying that recovery happens correctly.

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, Kubernetes/Yarn, 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

flinkbot commented Mar 28, 2024

CI report:

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

@mbalassi mbalassi self-requested a review March 28, 2024 06:13
@mbalassi
Copy link
Contributor

Thanks, @slfan1989. The build looks healthy, please also update the notice files so that the relevant checks can pass:
https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=58594&view=logs&j=52b61abe-a3cc-5bde-cc35-1bbe89bb7df5&t=54421a62-0c80-5aad-3319-094ff69180bb&l=44220

@slfan1989
Copy link
Contributor Author

slfan1989 commented Mar 28, 2024

Thanks, @slfan1989. The build looks healthy, please also update the notice files so that the relevant checks can pass:
https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=58594&view=logs&j=52b61abe-a3cc-5bde-cc35-1bbe89bb7df5&t=54421a62-0c80-5aad-3319-094ff69180bb&l=44220

@mbalassi Thank you very much for the review! I will continue to improve this pr.

- io.confluent:common-utils:7.5.3
- io.confluent:kafka-schema-registry-client:7.5.3
- org.apache.avro:avro:1.11.3
- org.apache.commons:commons-compress:1.24.0
- org.apache.commons:commons-compress:1.26.0
Copy link
Contributor Author

@slfan1989 slfan1989 Mar 29, 2024

Choose a reason for hiding this comment

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

In the compilation report, we can find the following error report. The report says this issue must be fixed, but I'm not sure if we should fix it in this PR because it doesn't seem to be related(Upgrade commons-compress to 1.26.0).

09:19:48,111 INFO  org.apache.flink.tools.ci.licensecheck.NoticeFileChecker     [] - Problems were detected for a NOTICE file.
	flink-sql-avro-confluent-registry:
		 These issue are legally problematic and MUST be fixed: 
			Dependency commons-io:commons-io:2.11.0 is not listed.
			Dependency org.apache.commons:commons-lang3:3.12.0 is not listed.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would assume these are pulled in as transitive dependencies via the upgrade, thanks for adding them.

@slfan1989
Copy link
Contributor Author

@flinkbot run azure

@mbalassi
Copy link
Contributor

@slfan1989 Thanks for addressing the Notice checks. We are almost there, the Python integration seems to have relied on a specific classname, that has probably changed. This causes a couple failures we are good otherwise.

Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.build.AbstractStreamBuilder
	at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)

https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=58638&view=logs&j=af184cdd-c6d8-5084-0b69-7e9c67b35f7a&t=0f3adb59-eefa-51c6-2858-3654d9e0749d&l=9010

Let me know if you prefer getting some help with hunting this down.

@slfan1989
Copy link
Contributor Author

@flinkbot run azure

@slfan1989
Copy link
Contributor Author

@flinkbot run azure

Copy link
Contributor

@mbalassi mbalassi left a comment

Choose a reason for hiding this comment

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

LGTM, merging tomorrow if there are no objections.

@slfan1989
Copy link
Contributor Author

LGTM, merging tomorrow if there are no objections.

Thank you very much for the review!

GOODBOY008 added a commit to GOODBOY008/flink that referenced this pull request Apr 7, 2024
GOODBOY008 added a commit to GOODBOY008/flink that referenced this pull request Apr 7, 2024
Comment on lines +72 to +78

<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<scope>test</scope>
</dependency>

Copy link
Contributor

@Jiabao-Sun Jiabao-Sun Apr 8, 2024

Choose a reason for hiding this comment

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

Hi @mbalassi, @slfan1989,

I think we needn't this dependency, the commons-codec's dependency is because commons-compress incorrectly depended on commons-codec's Charsets in version 1.26.0.

This issue has been fixed in version 1.26.1, so perhaps we should bump commons-compress version to 1.26.1.

see: https://issues.apache.org/jira/browse/COMPRESS-659

Copy link
Contributor

Choose a reason for hiding this comment

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

I have rechecked the dependency of commons-codec in commons-compress and it is no longer optional. Even if upgraded to 1.26.1, commons-codec will still be a transitive dependency.
Please ignore the previous noise, sorry for the disturbance.

1996fanrui added a commit to 1996fanrui/flink that referenced this pull request Apr 11, 2024
1996fanrui added a commit to 1996fanrui/flink that referenced this pull request Apr 11, 2024
Revert part of `[FLINK-34955] Upgrade commons-compress to 1.26.0. (apache#24580)`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants