Commit Graph

200 Commits

Author SHA1 Message Date
tpalfy c3eff68f92
NIFI-12924 Flow Analysis no longer done regularly or on-demand, but automatically when a change occurs that could result in the change of violations.
Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

This closes #8537.
2024-03-29 13:34:03 +01:00
David Handermann 26f5fa2be0
NIFI-11443 Route Python Framework Logging to SLF4J (#8407)
* NIFI-11443 Routed Python Framework Logging to SLF4J

- Changed Python logging to use standard output stream
- Adjusted Python logging format for simplified processing
- Updated PythonProcess to pipe standard error and standard output streams to reader
- Added Log Reader command with Virtual Thread for each Python Process
- Removed Python log properties from NiFi Properties configuration
2024-03-05 16:55:04 -05:00
Mark Payne ae423fc6ba
NIFI-12832 Removed unnecessary dependencies from nifi-mock
- Moved StandardValidators to nifi-api
- Moved URL creation method from UriUtils to URLValidator
- Separated FormatUtils into FormatUtils and DurationFormat classes
- Added DurationFormat to nifi-api

This closes #8442

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2024-02-23 15:13:21 -06:00
Mark Payne a821966a87
NIFI-12232 Corrected Group Component ID Handling for Clustered Flows
Ensured that if a Process Group doesn't have a Versioned Component ID we use the ComponentIdLookup to create one based on its Instance ID in the same way that is done when serializing the flow; this ensures matching ID's when we synchronize flows across the cluster. Also included some code cleanup around failure handling on startup

This closes #8406

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2024-02-20 11:25:56 -06:00
David Handermann 2ea4838157
NIFI-12764 Removed Commons Codec and Lang3 from security-utils (#8380) 2024-02-09 16:00:06 -05:00
David Handermann e66da895fc
NIFI-12640 Moved servlet-api and jetty-schemas to nifi-jetty-bundle (#8272)
- Set Jetty AnnotationConfiguration log level to WARN suppressing informational messages related to Logback ServletContainerInitializer
2024-01-19 11:29:04 -05:00
exceptionfactory 42547eb60c
NIFI-11703 Upgraded to Spring Framework 6 and Jetty 12
- Upgraded Spring Framework from 5.3.31 to 6.0.15
- Upgraded Spring Security from 5.8.7 to 6.2.0
- Upgraded Spring Vault from 2.3.4 to 3.1.0
- Upgraded Jetty from 10.0.18 to 12.0.5 with EE 10
- Upgraded Jersey from 2.41 to 3.1.4
- Upgraded JAXB from 2.3.9 to 4.0.4
- Upgraded AspectJ from 1.9.20.1 to 1.9.21
- Upgraded JMS API from 2.0.1 to 3.1.0
- Upgraded ActiveMQ Broker from 5.18.2 to 6.0.1 for JMS 3
- Upgraded JJWT from 0.9.1 to 0.12.3
- Replaced jackson-module-jaxb-annotations with jackson-module-jakarta-xmlbind-annotations
- Replaced maven-jaxb2-plugin with hisrc-higherjaxb40-maven-plugin 2.1.1
- Replaced kongchen swagger-maven-plugin with swagger-codegen-maven-plugin from Swagger 3
- Replaced com.nickwongdev AspectJ Plugin with Codehaus 1.14.0 for newer Java versions
- Removed unused cglib-nodep
- Removed references to javax.validation
- Removed custom Jetty ALPN Processor not required for Java 21
- Removed several tests depending on older Jetty and Jakarta libraries
- Removed unnecessary webdefault.xml configurations
- Replaced unsupported cross-context servlet forwarding with HTTP forwarding
- Replaced javax.servlet references with jakarta.servlet
- Replaced javax.xml.bind references with jakarta.xml.bind
- Replaced javax.ws references with jakarata.ws
- Updated Spring Security CSRF implementation for Spring Security 6
- Updated web.xml versions to 6.0
- Updated REST API templates using new swagger-codegen variables
- Removed VALIDATE_DATA property from ParseCEF based on library compatibility issue with javax.validation
- Added application URL logging to NiFi JettyServer

Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

This closes #8197.
2024-01-04 14:01:32 +04:00
exceptionfactory 6617fe8fe2
NIFI-12384 This closes #8044. Upgraded Registry to Spring Framework 6
- Upgraded Spring from 5.3.30 to 6.0.13
- Upgraded Spring Boot from 2.7.16 to 3.1.5
- Upgraded Spring Security from 5.8.7 to 6.1.5
- Upgraded Jetty from 10.0.18 to 11.0.18
- Upgraded Servlet API from 3.1.0 to 5.0.0
- Upgraded JAX-RS from 2.1.1 to 3.1.0
- Upgraded Jersey from 2.41 to 3.1.3
- Upgraded JAXB from 2.3.2 to 4.0.4
- Upgraded Java Validation from 2.0.1 to 3.0.2
- Upgraded Flyway from 8.5.13 to 9.22.3
- Upgraded ASM from 9.3 to 9.6 for Java 21
- Upgraded NiFi Toolkit CLI to JAX RS 3 and Jersey 3
- Set Jersey 3 and JAX RS 3 dependency versions in nifi-flow-registry-client-bundle to align with updates to nifi-registry-client classes

Signed-off-by: Joseph Witt <joewitt@apache.org>
2023-11-21 09:06:51 -07:00
Mark Payne a978406c83
NIFI-12326: When a Python Processor is created, it attempts to download dependencies in the background and then load the processor code. If that fails, it previously gave up; now it will log the exception and keep trying
This closes #7990

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-11-07 09:07:59 -06:00
exceptionfactory c706877147
NIFI-12297 Standardized File Path resolution in Persistence Providers (#7975) 2023-11-03 12:26:11 -04:00
Mark Payne 9b33d54f53
NIFI-12301 Corrected hasProperty() check when Migrating Properties
When calling migrateProperties, provide the properties that were configured in the VersionedComponent, rather than creating a new property map based on the component's new properties

This closes #7964

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-11-01 10:41:51 -05:00
exceptionfactory 2366132e92
NIFI-12287 Standardized skipping Source and Javadoc for NAR modules
- Added nar-packaging and war-packaging profiles to root Maven configuration
- Removed individual properties from NAR module configurations

Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

This closes #7947.
2023-10-27 16:18:42 -07:00
exceptionfactory 361e31fb19
NIFI-12279 Added nifi-standard-shared-nar to System Tests
- Corrected system test failures for PythonProcessorIT and Stateless CreateFlowFileIT

This closes #7935

Signed-off-by: Chris Sampson <chris.sampson82@gmail.com>
2023-10-26 19:35:51 +01:00
Mark Payne 19993783e1
NIFI-12203: Ensure that when inheriting cluster flow on startup, we remove any Controller Services, Reporting Tasks, Parameter Contexts, etc. that are not in the proposed flow. Also removed overly aggressive timeout from RunOnceIT and performed minor code cleanup
Resolves #7907

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-10-24 10:45:58 -05:00
Mark Payne a44b633252
NIFI-12220 Added ability to create Controller Services from migrateProperties
- Added ability to get raw property values from PropertyConfiguration instead of just effective values
- Updated TestRunner to allow for testing these migration methods
- Auto-enable newly created controller services if they are valid
- Eliminated Proxy properties in all AWS processors and instead just make use of the Proxy Configuration controller service
- Eliminated authentication properties from AWS processors and migrated all processors to using Controller Service or authentication

This closes #7874

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-10-24 09:14:19 -05:00
Mark Payne 8bfb6be5ba
NIFI-4172: Renamed ClusteSummaryEntity to ClusterSummaryEntity
This closes #7900

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-10-19 13:46:18 -05:00
Mark Payne cbdf32ab79
NIFI-12205: Moved loading of Python dependencies into background thread when processor created instead of during startup. Some code cleanup.
This closes #7863

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-10-14 15:05:17 -05:00
Mark Payne f4ae292a45
NIFI-12221: This closes #7876. Be more lenient about which Disconnection Codes we allow a node to be reconnected to a cluster vs. when we notify the node to disconnect again. Also updated the timeout for OffloadIT because it occasionally times ou out while running properly.
Signed-off-by: Joseph Witt <joewitt@apache.org>
2023-10-13 13:59:05 -07:00
Mark Payne 0eabbcdf19
NIFI-12228: This closes #7881. Fixed issue with FlowFile Concucrrency that can occasionally bring in more data than it should.
Code cleanup, fixing logback to avoid INFO-level stack trace from xodus

Signed-off-by: Joseph Witt <joewitt@apache.org>
2023-10-13 13:36:09 -07:00
exceptionfactory 22ad7d542d
NIFI-12206 Refactor Flow History using JetBrains Xodus (#7870)
* NIFI-12206 Refactored Flow History using JetBrains Xodus

- Replaced H2 Database Engine with JetBrains Xodus for persistent storage of FlowConfigurationHistory
- Added EntityStoreAuditService implementation using Xodus PersistentEntityStore
- Removed nifi.h2.url.append from properties
2023-10-12 14:50:25 -04:00
Mark Payne abfc49e212
NIFI-12139: Implemented migrateProperties, migrateRelationships for processors, as well as migrateProperties for ReportingTasks and Controller Services. Added system tests to verify behavior.
- Ensure that after restoring nars in the lib/ directory we restart NiFi so that they take effect. This is important if this test is not the last one to run

This closes #7837

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-10-12 11:40:18 -05:00
Bence Simon 3f13604c36
NIFI-11772 Removed flow.xml.gz support
- Created NIFI-12203 to evaluate issues with flow comparison surfaced in JoinClusterWithDifferentFlow

This closes #7661

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-10-11 13:53:01 -05:00
exceptionfactory 98cebc6687
NIFI-12185 Added nifi-bom Bill of Materials (#7852)
- Imported nifi-bom to nifi-commons and nifi-nar-bundles parent modules
- Removed explicit version and scope properties for dependencies declared in nifi-bom
2023-10-10 13:55:22 -04:00
Mark Payne 1d9ccb3857
NIFI-12161: This closes #7829. Ensuring framework threads use lightweight threads instead of a capped thread pool. This prevents framework threads from livelocking in the event enough framework threads are holding threads while those needing to run cannot get them.
Signed-off-by: Joseph Witt <joewitt@apache.org>
2023-10-04 08:48:12 -07:00
Joe Gresock ff8f1ff686
NIFI-8531: This closes #7529. Upgrading Kinesis processors to AWS SDK 2.x
Signed-off-by: Joseph Witt <joewitt@apache.org>
2023-10-01 16:26:51 -07:00
Nandor Soma Abonyi 4b0c8bf6af
NIFI-12114 Create separate test instance for python extensions
Signed-off-by: Arpad Boda <aboda@apache.org>

This closes #7780
2023-09-27 11:40:13 +02:00
Pierre Villard 43cc5ad122
NIFI-12079 This closes #7750. Remove Variables / Variable Registry
Signed-off-by: Joseph Witt <joewitt@apache.org>
2023-09-25 09:39:53 -07:00
Pierre Villard 2aca08910c
NIFI-12103 Replaced deprecated usage of new URL(String)
This closes #7771

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-09-23 10:30:42 -05:00
Mark Payne 713be8b539
NIFI-12101: This closes #7768. Fixed bugs that caused StatelessBasicsIT.testChangeFlowVersion to fail. There were a couple of related issues. Firstly, for Stateless Groups we were not waiting for the group to fully stop before attempting to update the flow but were waiting only for child/descendant groups to stop. This was due to misleading naming in the ProcessGroupUpdateStrategy enum. Renamed enum values to more clearly convey what they mean. Additionally, renamed the enum to more clearly convey what how it is used, since it is used not only for updating groups but also for retrieving groups. Additionally, when waiting for stateless groups to stop, we inadvertently checked the Set of affectedComponents' IDs against Process Group IDs so addressed the logic there and also ensured that we were consistent in setting the AffectedComponentEntity's ProcessGroup (i.e., its ProcessGroupNameDTO) as we were inconsistently setting it across the codebase.
Fixed issue in logic of LocalComponentLifecycle, which was waiting for all PGs to reach desired stateless run schedule, even when the group itself was not stateless

Fixed JavaScript to specify correct value for recursivity when updating process group parameter context
2023-09-22 09:00:52 -07:00
Mark Payne f27ace1ccf
NIFI-12016: This closes #7662. Allow use of compatible NAR bundles when loading flow from cluster connection; when determining what bundles are compatible, consider not just any bundle if it's the only one but also any bundle whose version matches the framework version so that when NiFi is upgraded, it is handled more gracefully.
Signed-off-by: Joseph Witt <joewitt@apache.org>
2023-09-14 10:29:23 -07:00
Timea Barna c30fd9b66d
NIFI-12006 Removed Templates from Framework and UI
This closes #7658

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-09-11 14:52:41 -05:00
exceptionfactory 5dc1ea27d3 NIFI-12001 Refactored CertificateUtils to separate modules
- Added nifi-security-cert for reusable components without dependencies
- Added nifi-security-cert-builder for certificate generation

Signed-off-by: Matt Burgess <mattyb149@apache.org>

This closes #7651
2023-08-30 15:08:46 -04:00
Tamas Palfy d4147ca442
NIFI-8650 Added Flow Analysis Rules
- Added new extensible Component Type: FlowAnalysisRule
- Added DisallowComponentType Rule implementation
- Flow Analysis Rules can be managed from the UI under Controller Settings -> Flow Analysis Rules
- Flow Analysis Rules can be set up with an enforcement policy of WARN or ENFORCE
- Flow Analysis Rules can evaluate an individual Component or a Process Group

This closes #7191

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-08-29 15:50:22 -05:00
Robert Kalmar 25d775b965
NIFI-11963 Added null check in system test for instance cache method
- Timing issues in system integration tests could sometimes fail with a NullPointerException when calling the poison method multiple times

This closes #7618

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-08-22 13:56:03 -05:00
Mark Payne 5e2a10c328
NIFI-11971: Ensure that if we do not write any bytes to a file after calling ProcessSession.write() that we set content claim's length to 0 when closing OutputStream; otherwise it remains -1, which causes issues, since the length will later be added to the offset to determine the position in the ste stream
This closes #7629

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-08-21 07:56:57 -05:00
Mark Payne b3c620411a
NIFI-11556: Added ability to use a Process Group as a Stateless Flow
When shutting down FlowController, wait up to gracefulShutdownSeconds seconds for the components to stop before shutting down thread pools. This allows for asynchronous operations such as disableControllerServicesAsync to complete during shutdown. Updated StandardStatelessFlow so that on shutdown it catches more general Exception to ensure that shutdown succeeds

Ensure that Max Concurrent Tasks cannot be set less than 1 for stateless group; fixed typo in ProcessGroupDTO's docs; on shutdown, we may need to disable controller services asynchronously. At that point, the thread pool used to do so may already be shutdown. If so, catch this and create a new single-thread pool, disable the service, and immediately shutdown the pool. Also, if we fail to disable services on shutdown of a stateless flow, instead of throwing an Exception, just log it and move on - it doesn't make much sense for shutdown() to throw an Exception in that case.

Updated system tests so that when emptying a queue, we check the result and if the queue still has data (because a Processor hasn't acknowledged the data, for example) then continue issuing request until the queue fully becomes empty.

When shutting down input/output ports for stateless group, ensure that we wait for the ports' active threads to complete before returning

When stopping StatelessGroupNode, ensure that all the Processors, Controller Services (even those not executed by the Stateless Engine) are stopped/disabled before considering the Stateless Group to be fully STOPPED.

This closes #7253

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-08-09 12:08:22 -05:00
exceptionfactory 3a1bc44b88
NIFI-11875 Corrected Commons Lang3 version in DefaultedDynamicallyModifyClasspath
Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-08-01 16:04:59 -05:00
Mark Payne 323f148d27 NIFI-11783: Fixed a bug in which a FlowFile split into multiple and then removed did not properly handle retries when one of the outputs was retried.
Signed-off-by: Matt Burgess <mattyb149@apache.org>

This closes #7500
2023-07-19 15:51:21 -04:00
Mark Payne 96be7377b3
NIFI-11746 Fixed FlowSynchronizationIT.testComponentsRecreatedOnRestart()
- Ensure that testComponentsRecreatedOnRestart only counts components in its own group

This closes #7466

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-07-10 12:59:46 -05:00
Mark Payne 5d3443c191
NIFI-11746: Refactored instance caching for system tests
Also changed some properties around so that we can have both a clustered and a standalone instance running at the same time.

This closes #7427

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-06-23 16:12:02 -05:00
Mark Payne 9709bd6fb7
NIFI-11737: Improved performance of FlowSynchronizationIT
- FlowSynchronizationIT no longer requires isDestroyEnvironmentAfterEachTest to return true

This closes #7420

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-06-21 17:13:26 -05:00
exceptionfactory ca6c7f7041 NIFI-11532 Removed JUnit 4 and Groovy Test from default dependencies
- Removed hamcrest-all from default dependencies
- Added groovy-test to selected modules with Groovy test classes
- Added junit-vintage-engine to selected modules with JUnit 4 test classes
- Corrected references to JUnit 4 assertions in JUnit 5 test classes
- Removed several unnecessary test classes from nifi-socket-utils
- Removed duplicative Registry toolkit test classes
- Removed Kudu integration tests

NIFI-11532 Corrected scope for junit-vintage-engine for Elasticsearch

Signed-off-by: Matt Burgess <mattyb149@apache.org>

This closes #7233
2023-06-13 15:36:23 -04:00
exceptionfactory 962dc9bc38
NIFI-11679 Refactored EncryptedRepoContentAccessIT Configuration (#7369) 2023-06-13 11:06:45 -04:00
Mark Payne 15f8f872f6 NIFI-11471: Added a system test to verify controller service enable timeout.
This closes #7242.
2023-06-12 14:48:16 -04:00
Mark Payne 702c635034
NIFI-11670 Refactored Content Repo OutputStream to create new Claim per FlowFile
Rather than creating many FlowFiles with the same Content Claim, refactored content repos' OutputStreams and ClaimWriteCache so that a new ContentClaim is created for each FlowFile. This ensures that we have a content claim offset of 0. The poor performance was due to having to use StreamUtils.skip() in conjunction with the CipherInputStream, which would only skip a max of 511 bytes at a time. By using a separate Content Claim per FlowFile, we no longer need to seek after creating the CipherInputStream

This closes #7363

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-06-12 09:47:44 -05:00
Mark Payne 4b7e20740e
NIFI-11591: Added additional logging for DynamicallyModifyClasspath system test
This closes #7312

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-05-31 16:23:07 -05:00
Mark Payne 9f61b5f957
NIFI-11591 Improved stability of DynamicallyClassPath and AsyncCommitCallback tests
After terminating Processor in DynamicallyModifiedClasspathIT system test, keep trying to empty queue until successful instead of assuming success after the first iteration.

When writing to a replacement file in AsyncCommitCallbackIT, write to a temp file and then rename. This prevents the processor from picking up the file while it's still being written.

This closes #7302

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-05-25 19:14:01 -05:00
Mark Payne 108f841525
NIFI-11591 Corrected intermittent system test failures
When waiting for a Processor to stop completely in system tests, also consider any terminated threads. Consider the processor stopped only when all active threads and all terminated threads have gone to 0. Additionally, when stopping all components in a Process Group, wait for the PG to reflect that there are no running components.  Previously, we checked for processor active thread counts. However, this was problematic because the flow that was fetched was not fetched recursively and as a result, processors running in embedded groups were not always stopped when the waitForProcessorsStopped(String groupId) method returned. Finally, removed the step for gathering surefire-reports in failed system tests because it was not working as expected and was unneeded because the tests' logs were already gathered into the diagnostic dump that is uploaded.

Added fix for BatchFlowBetweenGroupsIT. The test would intermittently fail, based on timing. The test assumed that when Input Port in Group B was scheduled to run, it would trigger before FlowFiles in Group A finished processing. The Sleep processor caused a 10 ms delay for each of 5 FlowFiles which gives the Input Port about 50 ms to trigger. If it took longer to trigger the first time, the test failed. Adjusted the Sleep processor to use 2 seconds. So now instead of 50 milliseconds to start, it has 10 seconds. Overall this adds about 30-45 seconds to the run time of the test but ensures more-than-adequate time for the test to run, even on extremely slow hardware

This closes #7289

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-05-24 14:03:07 -05:00
Mark Payne a12c9ca9c7
NIFI-11557: Avoid using the expensive and unnecessary Files.walkFileTree on startup and initialization of Content Repository. Also performed some code cleanup: IntelliJ flagged many warnings in the class, mostly around methods that are no longer used and potential NullPointerExceptions, so those were cleaned up. Additionally, removed the nifi property for max flowfiles per claim - this property was never implemented. It was referenced, but the way in which is was used curiously had nothing to do with what the property was intended to be used for or for how it was documented. Instead, it was used to limit the max number of claims that could remain writable. As a result, it was removed.
NIFI-11557: Added an additional system test and updated github actions to include surefire-report in order to help diagnose problem that occurred in one of the last system-test runs in Github. Could not replicate problem locally
Signed-off-by: Matthew Burgess <mattyb149@apache.org>

This closes #7265
2023-05-23 14:29:29 -04:00
Lehel Boér 265b132e73
NIFI-11493: Defaulted dynamically modified classpath fix
This closes #7201.

Co-authored-by: Peter Turcsanyi <turcsanyi@apache.org>
Signed-off-by: Peter Turcsanyi <turcsanyi@apache.org>
2023-05-04 15:20:56 +02:00