Skip to content

[ISSUE-4157][Bug] Parse vendor suffixed Flink versions#4364

Open
hutiefang76 wants to merge 1 commit into
apache:devfrom
hutiefang76:codex/streampark-4157-flink-amzn-version
Open

[ISSUE-4157][Bug] Parse vendor suffixed Flink versions#4364
hutiefang76 wants to merge 1 commit into
apache:devfrom
hutiefang76:codex/streampark-4157-flink-amzn-version

Conversation

@hutiefang76

Copy link
Copy Markdown

What changes were proposed in this pull request

Issue Number: close #4157

This pull request updates FlinkVersion.checkVersion to parse the numeric prefix of each version segment. This keeps normal Apache Flink versions unchanged while allowing vendor-suffixed patch versions such as 1.19.1-amzn-1 to be checked without throwing NumberFormatException.

Brief change log

  • Parse numeric version segment prefixes in FlinkVersion before matching supported Flink versions.
  • Add unit tests for vendor-suffixed Flink versions in both checkVersion() and checkVersion(sinceVersion) paths.

Verifying this change

This change added tests and can be verified as follows:

  • Added FlinkVersionTest to verify 1.19.1-amzn-1 is accepted and unsupported vendor-suffixed versions are rejected without throwing.
  • Ran locally:
JAVA_HOME=$(/usr/libexec/java_home -v 17) ./mvnw -s /tmp/codex-empty-maven-settings.xml -pl streampark-common -DskipITs -DskipRat -DfailIfNoTests=false -Dtest=FlinkVersionTest test

Result: Tests run: 3, Failures: 0, Errors: 0, Skipped: 0.

Does this pull request potentially affect one of the following parts

  • Dependencies (does it add or upgrade a dependency): no

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] java.lang.NumberFormatException: For input string: "1-amzn-1"

1 participant