Skip to content

NIFI-11001: When new components are added, track a mapping of its Ver…#6836

Closed
markap14 wants to merge 1 commit intoapache:mainfrom
markap14:NIFI-11001
Closed

NIFI-11001: When new components are added, track a mapping of its Ver…#6836
markap14 wants to merge 1 commit intoapache:mainfrom
markap14:NIFI-11001

Conversation

@markap14
Copy link
Contributor

…sioned Compoenent ID to the component itself. Then, use this when creating connections. This is important because if a Process Group has multiple components with the same Versioned Component ID across multiple child groups, the Versioned Component ID may be changed upon adding the component. Maintaining this mapping allows us to still create the connection correctly.

Summary

NIFI-00000

Tracking

Please complete the following tracking steps prior to pull request creation.

Issue Tracking

Pull Request Tracking

  • Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
  • Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000

Pull Request Formatting

  • Pull Request based on current revision of the main branch
  • Pull Request refers to a feature branch with one commit containing changes

Verification

Please indicate the verification steps performed prior to pull request creation.

Build

  • Build completed using mvn clean install -P contrib-check
    • JDK 8
    • JDK 11
    • JDK 17

Licensing

  • New dependencies are compatible with the Apache License 2.0 according to the License Policy
  • New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

  • Documentation formatting appears as expected in rendered files

…sioned Compoenent ID to the component itself. Then, use this when creating connections. This is important because if a Process Group has multiple components with the same Versioned Component ID across multiple child groups, the Versioned Component ID may be changed upon adding the component. Maintaining this mapping allows us to still create the connection correctly.
Copy link
Contributor

@exceptionfactory exceptionfactory left a comment

Choose a reason for hiding this comment

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

Thanks the improvement @markap14, the code looks straightforward. Based on the Jira issue description, it seems like it would be helpful to have some kind of testing to exercise these changes. The current StandardVersionedComponentSynchronizerTest is extensive, covering a number of scenarios, but it seems like it could be useful to add one that exercises this new tracking behavior. The ConnectableAdditionTracker is also fairly simple in the way it wraps the HashMap, but it could be helpful to have a basic unit test covering its behavior.

Copy link
Contributor

@bbende bbende left a comment

Choose a reason for hiding this comment

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

Verified this resolves the reported issue, I'm a +1 baring any test updates requested

@asfgit asfgit closed this in 228a344 Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants