-
-
Notifications
You must be signed in to change notification settings - Fork 6
chore(nifi): Bump to 2.6.0 #1293
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
de1d643
chore: add upload script for new Maven version
NickLarsenNZ 5750128
fix(script/jmx_exporter): Do not upload if the sum check fails
NickLarsenNZ 8b34ffe
chore(java-devel): Bump maven to 3.9.11
NickLarsenNZ 51e4395
chore(issue-templates/nifi): Update tasks for nifi-iceberg-bundle and…
NickLarsenNZ ffaf849
chore(nifi): Add nifi 2.6.0, bump dependencies
NickLarsenNZ 79d8b5f
chore: Update changelog
NickLarsenNZ File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
VERSION=${1:?"Missing version number argument (arg 1)"} | ||
MAJOR=$(echo "$VERSION" | grep -oE '^[0-9]+') | ||
NEXUS_USER=${2:?"Missing Nexus username argument (arg 2)"} | ||
|
||
read -r -s -p "Nexus Password: " NEXUS_PASSWORD | ||
echo | ||
|
||
# https://stackoverflow.com/questions/4632028/how-to-create-a-temporary-directory | ||
# Find the directory name of the script | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
# the temp directory used, within $DIR | ||
WORK_DIR=$(mktemp -d -p "$DIR") | ||
|
||
# check if tmp dir was created | ||
if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then | ||
echo "Could not create temp dir" | ||
exit 1 | ||
fi | ||
|
||
# deletes the temp directory | ||
function cleanup { | ||
rm -rf "$WORK_DIR" | ||
} | ||
|
||
# register the cleanup function to be called on the EXIT signal | ||
trap cleanup EXIT | ||
|
||
cd "$WORK_DIR" || exit | ||
|
||
# Example download URLs found at https://maven.apache.org/download.cgi | ||
# https://dlcdn.apache.org/maven/maven-3/3.9.11/binaries/apache-maven-3.9.11-bin.tar.gz | ||
# https://downloads.apache.org/maven/maven-3/3.9.11/binaries/apache-maven-3.9.11-bin.tar.gz.sha512 | ||
# https://downloads.apache.org/maven/maven-3/3.9.11/binaries/apache-maven-3.9.11-bin.tar.gz.asc | ||
# https://downloads.apache.org/maven/KEYS | ||
# Preferring downloads.apache.org over dlcdn.apache.org (for no real reason, but wanted consistency) | ||
|
||
BASE_URL="https://downloads.apache.org/maven/maven-$MAJOR/$VERSION/binaries" | ||
ARCHIVE_FILE="apache-maven-$VERSION-bin.tar.gz" | ||
SUM_FILE="$ARCHIVE_FILE.sha512" | ||
SIG_FILE="$ARCHIVE_FILE.asc" | ||
|
||
echo "Downloading Maven $VERSION" | ||
curl --fail -LO --progress-bar "$BASE_URL/$ARCHIVE_FILE" | ||
curl --fail -LO --progress-bar "$BASE_URL/$SUM_FILE" | ||
curl --fail -LO --progress-bar "$BASE_URL/$SIG_FILE" | ||
|
||
# Maven maintainers produce sum files that are incompatible with sha*sum, so we | ||
# need to append the archive name to the end to make it work. | ||
echo -n " $ARCHIVE_FILE" >> "$SUM_FILE" | ||
|
||
# Check that sha512 sum matches before uploading | ||
sha512sum --strict --check --status "$SUM_FILE" # do not put && here | ||
echo "SHA512 Sum matches" | ||
|
||
if ! gpg --verify "$SIG_FILE" "$ARCHIVE_FILE"; then | ||
echo "You might need to download the public keys and try again:" | ||
echo "curl https://downloads.apache.org/maven/KEYS | gpg --import" | ||
exit 1 | ||
fi | ||
|
||
echo "Uploading to Nexus" | ||
|
||
curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$ARCHIVE_FILE" 'https://repo.stackable.tech/repository/packages/maven/' | ||
curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$SUM_FILE" 'https://repo.stackable.tech/repository/packages/maven/' | ||
curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$SIG_FILE" 'https://repo.stackable.tech/repository/packages/maven/' | ||
|
||
echo "Successfully uploaded Maven $VERSION to Nexus" | ||
echo "https://repo.stackable.tech/service/rest/repository/browse/packages/maven/" | ||
echo "https://github.com/prometheus/maven/releases/tag/$VERSION" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
nifi/nifi-iceberg-bundle/stackable/patches/0.0.5/patchable.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
base = "c305d47c3678d16250374e9dc89bc184b8c36892" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
mirror = "https://github.com/stackabletech/nifi-opa-plugin.git" | ||
base = "728367a22e897479b4d8157b151ff1abca038d3d" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
From e20550884c2d7002013b9427c219128fe416263b Mon Sep 17 00:00:00 2001 | ||
From: Nick Larsen <nick.larsen@stackable.tech> | ||
Date: Mon, 17 Feb 2025 17:26:20 +0100 | ||
Subject: no zip assembly | ||
|
||
--- | ||
nifi-assembly/pom.xml | 1 - | ||
1 file changed, 1 deletion(-) | ||
|
||
diff --git a/nifi-assembly/pom.xml b/nifi-assembly/pom.xml | ||
index dc7fe6fff3..911cbc83d3 100644 | ||
--- a/nifi-assembly/pom.xml | ||
+++ b/nifi-assembly/pom.xml | ||
@@ -66,7 +66,6 @@ language governing permissions and limitations under the License. --> | ||
<tarLongFileMode>posix</tarLongFileMode> | ||
<formats> | ||
<format>dir</format> | ||
- <format>zip</format> | ||
</formats> | ||
</configuration> | ||
</execution> |
38 changes: 38 additions & 0 deletions
38
nifi/stackable/patches/2.6.0/0002-add-cyclonedx-plugin.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
From 0ced60d4c0a49bcf975ce5a3f368a0075988a45f Mon Sep 17 00:00:00 2001 | ||
From: Nick Larsen <nick.larsen@stackable.tech> | ||
Date: Mon, 17 Feb 2025 17:31:17 +0100 | ||
Subject: add cyclonedx plugin | ||
|
||
--- | ||
pom.xml | 18 ++++++++++++++++++ | ||
1 file changed, 18 insertions(+) | ||
|
||
diff --git a/pom.xml b/pom.xml | ||
index b9ebbf44de..52639e1211 100644 | ||
--- a/pom.xml | ||
+++ b/pom.xml | ||
@@ -1029,6 +1029,24 @@ | ||
</rulesets> | ||
</configuration> | ||
</plugin> | ||
+ <plugin> | ||
+ <groupId>org.cyclonedx</groupId> | ||
+ <artifactId>cyclonedx-maven-plugin</artifactId> | ||
+ <version>2.8.0</version> | ||
+ <configuration> | ||
+ <projectType>application</projectType> | ||
+ <schemaVersion>1.5</schemaVersion> | ||
+ <skipNotDeployed>false</skipNotDeployed> | ||
+ </configuration> | ||
+ <executions> | ||
+ <execution> | ||
+ <phase>package</phase> | ||
+ <goals> | ||
+ <goal>makeBom</goal> | ||
+ </goals> | ||
+ </execution> | ||
+ </executions> | ||
+ </plugin> | ||
</plugins> | ||
</build> | ||
<profiles> |
48 changes: 48 additions & 0 deletions
48
nifi/stackable/patches/2.6.0/0003-disable-host-port-validation-if-list-of-allowed-host.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
From 081a3a5e2e94d10b43f23f5f1bda7c2db8b4044b Mon Sep 17 00:00:00 2001 | ||
From: Benedikt Labrenz <benedikt@labrenz.org> | ||
Date: Thu, 22 May 2025 14:47:24 +0200 | ||
Subject: disable host port validation if list of allowed hosts only contains | ||
'*' | ||
|
||
--- | ||
.../connector/FrameworkServerConnectorFactory.java | 13 +++++++++++-- | ||
1 file changed, 11 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/connector/FrameworkServerConnectorFactory.java b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/connector/FrameworkServerConnectorFactory.java | ||
index 1b28722a3f..72986669d5 100644 | ||
--- a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/connector/FrameworkServerConnectorFactory.java | ||
+++ b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/connector/FrameworkServerConnectorFactory.java | ||
@@ -54,6 +54,8 @@ public class FrameworkServerConnectorFactory extends StandardServerConnectorFact | ||
|
||
private final String excludeCipherSuites; | ||
|
||
+ private final boolean disableHostPortValidator; | ||
+ | ||
private final Set<Integer> validPorts; | ||
|
||
private SslContextFactory.Server sslContextFactory; | ||
@@ -72,6 +74,11 @@ public class FrameworkServerConnectorFactory extends StandardServerConnectorFact | ||
headerSize = DataUnit.parseDataSize(properties.getWebMaxHeaderSize(), DataUnit.B).intValue(); | ||
validPorts = getValidPorts(properties); | ||
|
||
+ // Check if the property for allowed hosts has only the wildcard entry and | ||
+ // if so store this in disableHostPortValidator for later use | ||
+ List<String> configuredHostNames = properties.getAllowedHostsAsList(); | ||
+ disableHostPortValidator = configuredHostNames.size() == 1 && configuredHostNames.contains("*"); | ||
+ | ||
if (properties.isHTTPSConfigured()) { | ||
if (properties.isClientAuthRequiredForRestApi()) { | ||
setNeedClientAuth(true); | ||
@@ -102,8 +109,10 @@ public class FrameworkServerConnectorFactory extends StandardServerConnectorFact | ||
// Add HostHeaderCustomizer to set Host Header for HTTP/2 and HostHeaderHandler | ||
httpConfiguration.addCustomizer(new HostHeaderCustomizer()); | ||
|
||
- final HostPortValidatorCustomizer hostPortValidatorCustomizer = new HostPortValidatorCustomizer(validPorts); | ||
- httpConfiguration.addCustomizer(hostPortValidatorCustomizer); | ||
+ if (!disableHostPortValidator) { | ||
+ final HostPortValidatorCustomizer hostPortValidatorCustomizer = new HostPortValidatorCustomizer(validPorts); | ||
+ httpConfiguration.addCustomizer(hostPortValidatorCustomizer); | ||
+ } | ||
|
||
return httpConfiguration; | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.