Commit Graph

124 Commits

Author SHA1 Message Date
Joe Witt ded48269fe
Merge branch 'NIFI-10272-RC2' 2022-08-01 06:10:25 -07:00
Mark Payne d5386acb4f
NIFI-10290: Updated system tests to ensure that they do not attempt to start processors while the processors are still validating.
This closes #6253

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2022-07-28 13:36:22 -05:00
Joe Witt 8c66bf948c
NIFI-10272-RC2 prepare for next development iteration 2022-07-27 13:24:09 -07:00
Joe Witt 8d256784d8
NIFI-10272-RC2 prepare release nifi-1.17.0-RC2 2022-07-27 13:24:06 -07:00
Mark Payne 8a1249ee39
NIFI-10279: This closes #6246. Increased timeout in TestExecuteStateless, removed explicit timeouts on stateless system tests that were too aggressive so that the tests use the default 5 minute timeout defined in StatelessSystemIT
Signed-off-by: Joe Witt <joewitt@apache.org>
2022-07-25 14:33:48 -07:00
Mark Payne 0497907829
NIFI-10262: Ensure that when an Exception is thrown from a Controller Service's @OnEnabled method that we properly handle that Exception and continue enabling the other services in the given collection of services
This closes #6236

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2022-07-25 10:02:21 -05:00
Mark Payne bc4e3e850b
NIFI-10246: When syncing Controller Services, wait until any DISABLING Controller Service has fully disabled before attempting to synchronize them. Also performed some minor refactoring/cleanup for System Tests in order to make writing a system test for this simpler
This closes #6219

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2022-07-22 13:31:06 -05:00
Nissim Shiman db11961026
NIFI-9440 Allow Controller Services to have configurable Bulletins
Signed-off-by: Matthew Burgess <mattyb149@apache.org>

This closes #6035
2022-06-28 10:44:45 -04:00
Mark Payne ac8c1b0326
NIFI-10148: Fixed bug in SwappablePriorityQueue, in which the Active Queue Size could be decremented before the Unacknowledged Queue Size is incremented when FlowFiles are polled. This can result in the SwappablePrioriotyQueue incorrectly returning a value of true from the isEmpty() method. Additionally, updated the NiFiSystemIT so that if waiting for a particular queue size we periodically log size of all queues, which aids in debugging, and added necessary methods to FlowClient to make that happen.
This closes #6143

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2022-06-21 15:55:47 -05:00
exceptionfactory bd45eb4995 NIFI-10100 Upgraded Jersey to 2.35
- Replaced individual version references with Jersey BOM dependency

Signed-off-by: Nathan Gough <thenatog@gmail.com>

This closes #6106.
2022-06-16 23:09:22 -04:00
Mark Payne 005fbe3c50
NIFI-10063: Wait for processor to become valid before attempting to start it
This closes #6083

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2022-05-31 10:34:02 -05:00
exceptionfactory 99be62be67
NIFI-9958 Add Framework Support for Sensitive Dynamic Properties (#6057)
* NIFI-9958 Implemented Sensitive Dynamic Properties

- Added SupportsSensitiveDynamicProperties annotation for components
- Added optional sensitive query parameter to Property Descriptor REST Resource methods
- Added system tests for components supporting sensitive dynamic properties
- Updated REST Resources to support Sensitive Dynamic Property Names
- Updated Documentation Writer to indicate component support for Sensitive Dynamic Properties
- Updated InvokeHTTP to support Sensitive Dynamic Properties
- Updated Auditor components to handle masking Sensitive Dynamic Properties

* Refactored Property Descriptor REST method handling

- Corrected AbstractDocumentationWriter evaluation of support for sensitive dynamic properties
- Refactored Controller Service Dynamic Properties system tests to new class

* Updated AbstractComponentNode.getProperties() to get canonical descriptor
2022-05-23 17:20:54 -04:00
Mark Payne 38b51b0dde
NIFI-10037: When system test fails to clean up flow, destroy the entire environment so that the next test starts in a healthy state. Name troubleshooting directories with the name of the test class to avoid ambiguity. Also added a log statement so that we know which test is running when looking at the log output from the tests themselves. Finally, found an issue in AbstractComponentNode in which we iterate over the elements in a Map and call setProperty, which can update the underlying Map - updated to first create a copy of the HashMap. Updated that in this Jira because I suspect it is causing one of the tests failures that I've been investigating.
This closes #6059

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2022-05-19 13:14:30 -05:00
markap14 88e53eae8c
NIFI-10001: Fixed bugs that caused some components to not have their scheduled state updated. (#6049)
* NIFI-10001: Fixed issue in which some components may fail to update the scheduled state when comparing flows

* NIFI-10001: Fixed bugs that caused some components to not have their scheduled state updated. When comparing two flows, now allow specifying how to determine a VersionedComponent's ID for comparison. When comparing local flow against flow from registry, use Versioned Component ID. But when comparing two instantiated flows, such as local flow vs. cluster flow, use the VersionedComponent's Instance ID instead. This ensures that we can properly compare two components even if there are several instances of a given flow
2022-05-18 13:53:36 -04:00
exceptionfactory 85d5e2071b
NIFI-10031 Downgraded Jakarta Mail from 2.0.1 to 1.6.7 (#6052)
- Downgraded Jakarta Activation from 2.0.1 to 1.2.2 in nifi-bootstrap
- Updated assembly configurations to include Jakarta Activation in java11 directory
2022-05-18 11:38:36 -04:00
markap14 8031b62351
NIFI-10001: When enabling a collection of Controller Services, change… (#6042)
* NIFI-10001: When enabling a collection of Controller Services, changed logic. Instead of enabling dependent services and waiting for them to complete enablement before starting a given service, just start the services given. The previous logic was necessary long ago because we couldn't enable a service unless all dependent services were fully enabled. But that changed a while ago. Now, we can enable a service when it's invalid. It'll just keep trying to enable until it becomes valid. At that point, it will complete its transition from ENABLING to ENABLED.

* NIFI-10001: Restored previous implementation for StandardControllerServiceProvider, as the changes were not ultimately what we needed. Changed StandardProcessGroup to use a ConcurrentHashMap for controller services instead of a HashMap with readLock. This was causing a deadlock when we enable a Controller Service that references another service during flow synchronization. Flow Synchronization was happening within a write lock and enabling the service required a read lock on the group. Eventually the thread holding the write lock would timeout and release the write lock. But this caused significant delays on startup. By changing to a ConcurrentHashMap, we alleviate the need for the Read Lock. Also noticed in testing that the StandardNiFiServiceFacade did not save flow changes when enabling dependent services so added call to controllerFacade.save().
2022-05-13 15:09:23 -04:00
exceptionfactory 4f423a59ba
NIFI-9952 Upgraded Jackson BOM to 2.13.2.20220328
- Removed unnecessary references to jackson.version property
- Removed unnecessary dependency management references to Jackson libraries

This closes #5992

Signed-off-by: Mike Thomsen <mthomsen@apache.org>
2022-04-23 08:23:39 -04:00
Paul Grey 4450f4ce50
NIFI-9941 - fix handling of ReportingTask stop request
Signed-off-by: Matthew Burgess <mattyb149@apache.org>

This closes #5985
2022-04-21 14:18:09 -04:00
Mark Payne aeaec170d5 NIFI-9861: Removed BlockListClassLoader in favor of AllowListClassLoader
NIFI-9861: Fixed stateless-processor-tests assembly to ensure that all necessary libraries were included; removed BlockListClassLoader
NIFI-9861: Fixed issue in which we would list .class files as files that we allow through the AllowListClassLoader but didn't allow them.

This closes #5925.

Signed-off-by: Peter Turcsanyi <turcsanyi@apache.org>
2022-04-20 22:49:43 +02:00
Joe Witt 84340962d4
NIFI-9927 Initial Commit to clean up all extraneous version/group declarations.
This closes #5969

Signed-off-by: Mike Thomsen <mthomsen@apache.org>
2022-04-16 12:05:07 -04:00
exceptionfactory 15f7590f7a
NIFI-9901 Added nifi-xml-processing to nifi-commons
- Refactored XML parsing to use providers from nifi-xml-processing
- Configured spotbugs-maven-plugin with findsecbugs-plugin in nifi-xml-processing
- Disabled Validate DTD in default configuration for EvaluateXPath and EvaluateXQuery
- Replaced configuration of DocumentBuilder and streaming XML Readers with shared components
- Removed XML utilities from nifi-security-utils
- Moved Commons Configuration classes to nifi-lookup-services

This closes #5962
Signed-off-by: Paul Grey <greyp@apache.org>
2022-04-13 19:56:57 -04:00
Joe Witt 873d25585c
NIFI-9780 Merge branch 'NIFI-9780-RC3' 2022-04-04 08:35:23 -07:00
exceptionfactory f57facdbcf
NIFI-9858 Refactored nifi-system-test-suite using generated certificates
- Added NiFiSystemKeyStoreProvider for configuration of Key Pair and self-signed Certificate
- Updated standalone and clustered instance configuration properties
- Removed expiring keystore.jks and truststore.jks

This closes #5922
Signed-off-by: Paul Grey <greyp@apache.org>
2022-04-01 16:10:37 -04:00
Mark Payne 2e66cf7114 NIFI-9854: Include slf4j-api as runtime scope for nifi-stateless-system-test-suite; When constructing the classes to block for the stateless ClassLoader, allow through any classes that come from Java Home's lib/ directory
This closes #5920.

Signed-off-by: Peter Turcsanyi <turcsanyi@apache.org>
2022-04-01 17:51:07 +02:00
exceptionfactory 105890ef37
NIFI-9773 Refactored nifi-system-tests using JUnit 5
- Enabled system-tests workflow on push and pull requests

This closes #5901

Signed-off-by: Mike Thomsen <mthomsen@apache.org>
2022-03-26 07:22:07 -04:00
exceptionfactory 5928d2048e
NIFI-9793 Added wait for Controller Service run status in tests
- Added check for controller-level service run status in disableControllerLevelServices to avoid HTTP 409 Conflict response when attempting to delete services

This closes #5863

Signed-off-by: Paul Grey <greyp@apache.org>
2022-03-21 16:13:32 -04:00
Joe Witt 0419dc2939
NIFI-9780-RC3 prepare for next development iteration 2022-03-21 11:58:27 -07:00
Joe Witt b019a9191f
NIFI-9780-RC3 prepare release nifi-1.16.0-RC3 2022-03-21 11:58:09 -07:00
Paul Grey a7abe6d722 NIFI-9795 - checkstyle, rat issues in nifi-system-test-suite module
Signed-off-by: Nathan Gough <thenatog@gmail.com>

This closes #5864.
2022-03-14 13:08:03 -04:00
Joe Witt 72fadf9e51
NIFI-9780 fixing many inconsistent pom project declarations and updated org apache parent version 2022-03-10 11:15:16 -07:00
Mark Payne 8959226b50
NIFI-9754: Introduced VersionedExternalFlow
- Updated stateless and StandardProcessGroup, etc. to make use of VersionedExternalFlow
- Updated StatelessDataflowDefinition to use ExternalVersionedFlow instead of generic type
- Updated Stateless Bootstrap to avoid loading stateless engine libs from root class path but instead use a NarClassLoader to load the statelss nar

Signed-off-by: Joe Gresock <jgresock@gmail.com>

This closes #5832.
2022-03-04 07:19:38 -05:00
Paul Grey d2e90dd160
NIFI-9751 - Poll as needed during system-tests to ensure expected state
This closes #5829

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2022-03-03 15:24:52 -06:00
Paul Grey 6bc85155f9
NIFI-9749 - Capture additional logging for system-test workflow runs
This closes #5827

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2022-03-02 18:52:43 -06:00
Paul Grey 875f589548
NIFI-9738 - VersionedComponent data members should derive from Object
Signed-off-by: Joe Gresock <jgresock@gmail.com>

This closes #5816.
2022-03-01 06:06:48 -05:00
exceptionfactory 52f21390db
NIFI-9688 Improve Logback shutdown handling (#5805)
* NIFI-9688 Improved Logback shutdown handling
- Added environment variable to disable Logback shutdown on web application termination
- Added shutdown hook to Logback configuration
- Added Logback shutdown hook configuration to system tests
2022-02-28 14:29:44 -05:00
Mark Payne 6cea5ea520
NIFI-9729: When restarting components in the VersionedFlowSynchronizer, first filter out any components that are intended to be stopped.
Signed-off-by: Joe Gresock <jgresock@gmail.com>

This closes #5806.
2022-02-25 14:29:38 -05:00
Mark Payne c453d2ba8f
NIFI-9723: When we add controller-level Controller Services on restart of NiFi, ensure that all Controller Services are updated to include their property values, etc. Also ensure that for these services and reporting tasks we decrypt the property values.
Signed-off-by: Joe Gresock <jgresock@gmail.com>

This closes #5797.
2022-02-24 15:13:14 -05:00
Hsin-Ying Lee c331f9cb9a
NIFI-9227 Run Once not working when scheduling strategy is CRON or Event driven (#5445) 2022-02-24 12:27:01 -05:00
timeabarna 63a543cd67
NIFI-9475 Provide Framework-Level Retries for NiFi Relationships (#5593) 2022-02-15 15:40:41 -05:00
greyp9 87cfd43f6f
NIFI-9233 - Improve reliability of system integration tests (#5749)
* NIFI-9233 - Improve reliability of system integration tests
2022-02-15 13:14:01 -05:00
exceptionfactory dc7d9510cd NIFI-9610 Refactored nifi-processor-utils to separate modules
- Added nifi-bin-manager
- Added nifi-event-listen
- Added nifi-event-put
- Added nifi-listed-entity
- Added nifi-put-pattern
- Removed nifi-processor-utils

Signed-off-by: Nathan Gough <thenatog@gmail.com>

This closes #5729.
2022-02-01 12:59:16 -05:00
Mark Payne 1617406041 NIFI-9576: Introduced a BlockListClassLoader that can be used by stateless in order to isolate both the Stateless Engine and the NiFi extensions from extraneous classes that exist in the System ClassLoader
This closes #5705.

Signed-off-by: Peter Turcsanyi <turcsanyi@apache.org>
2022-01-26 17:28:15 +01:00
Mark Payne b5dd35431e NIFI-9293: Ensure that we properly set the scheduled flag in the LifecycleState when stopping processors. Added system test to verify that @OnScheduled, onTrigger, @OnUnscheduled, @OnStopped are all called and in the expected order
This closes #5706.

Signed-off-by: Peter Turcsanyi <turcsanyi@apache.org>
2022-01-24 22:07:31 +01:00
Mark Payne 72e54f4fab NIFI-9390: Updates to MergeContent / MergeRecord so that they play nicely within Stateless
NIFI-9390: Addressed underlying condition in stateless framework that caused Merge-related processors and similar to not properly be triggered as necessary. Added several system tests to verify different configurations.

NIFI-9390: Simplified the logic for how to iterate over the components in a Stateless flow that are ready to be triggered

This closes #5634.

Co-authored-by: Peter Turcsanyi <turcsanyi@apache.org>
Signed-off-by: Peter Turcsanyi <turcsanyi@apache.org>
2022-01-11 09:45:00 +01:00
Mark Payne 20392d5ef4
NIFI-9503: Fixed issue in system-tests
- Fixed system-tests workflow so that troubleshooting info is always uploaded for failures

This closes #5614

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2021-12-18 19:59:54 -06:00
Joe Gresock 429087c11d
NIFI-9386: Adding status task schedule to Stateless engine config
Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

This closes #5532.
2021-12-13 12:08:54 +01:00
Mark Payne 97198e35a0
NIFI-9382: This closes #5584. Added system test that replicates issue in which a closed shared classloader causes issues when used again
NIFI-9382: Fixed issue with SharedInstanceClassLoader where the classloader may get closed but then get used again. When the SharedInstanceClassLoader is closed, we will now ensure that we don't use anymore and instead create a new one.

Signed-off-by: Joe Witt <joewitt@apache.org>
2021-12-09 12:41:57 -07:00
Mark Payne 90b39b593a
NIFI-9069 Changed framework dataflow serialization to support JSON
- Changed framework so that it serializes the dataflow into a VersionedDataflow using JSON as well as XML, and prefers the JSON representation on load, if it's available. This also results in the need for the cluster protocol to exchange its representation of the dataflow to using JSON. Rather than re-implementing all of the complex logic of Flow Fingerprinting, updated to just inherit the cluster's flow.
- Moved logic to synchronize Process Group with Versioned Process Group into a new ProcessGroupSynchronizer class instead of having all of the logic within StandardProcessGroup
- Reworked versioned components to use an instance id.
- Renamed StandardFlowSynchronizer to XmlFlowSynchronizer; introduced new StandardFlowSynchronizer that delegates to the appropriate (Xml or Versioned)FlowSynchronzer
- Updated to allow import of VersionedProcessGroup even if not all bundles are available - will now use ghost components
- Introduced a VersionedDataflow object to hold controller-level services, reporting tasks, parameter contexts, templates, etc.
- Allow mutable requests to be made while nodes are disconnected. Also fixed issue in AbstractPolicyBasedAuthorizer that caused ClassNotFoundException / NoClassDefFoundError if the authorizations were changed and then a node attempts to rejoin the cluster. The Authorizer was attempting to use XmlUtils, which is in nifi-security-utils and so so by madking nifi-security-utils a provided dependency of nifi-framework-api, but this doesn't work, because nifi-framework-api is loaded by a higher-level classloader, so the classloader that loads AbstractPolicyBasedAuthorizer will never have the appropriate classloader to provide nifi-security-utils. Addressed this by copying the code for creating a safe document builder from XmlUtils to AbstractPolicyBasedAuthorizer.
- Fixed bug that occurred when importing a Process Group that has 2 parameter contexts, one inheriting from another, where neither is pre-defined in the existing flow
- Fixed bug that was encountered when Updating a Versioned Process Group where one version had a disabled processor and the other had the processor running.
- Increased system-tests workflow timeout to 120 minutes
- Added additional exception handling to system tests

This closes #5514

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2021-12-02 15:10:38 -06:00
exceptionfactory 6a6b755aaa
NIFI-9394 Removed RequestLogger and TimerFilter
- Removed logger references from logback.xml

Signed-off-by: Joe Gresock <jgresock@gmail.com>

This closes #5543.
2021-11-29 12:55:39 -05:00
markap14 839fbf7d19
NIFI-9382: Created a new ClassloaderIsolationKey mechanism by which H… (#5533)
* NIFI-9382: Created a new ClassloaderIsolationKey mechanism by which Hadoop related processors (and potentially others) can indicate that they need full classloaders to be cloned but can share with other instances in certain circumstances
- Added system tests

* NIFI-9382: Renamed interface based on review feedback

* NIFI-9382: Removed ReentrantKerberosUser.
2021-11-22 14:55:19 -05:00