Skip to content

NIFI-14471 clear branch value when switching between registry clients…#10383

Merged
rfellows merged 2 commits intoapache:mainfrom
markobean:NIFI-14471
Oct 6, 2025
Merged

NIFI-14471 clear branch value when switching between registry clients…#10383
rfellows merged 2 commits intoapache:mainfrom
markobean:NIFI-14471

Conversation

@markobean
Copy link
Contributor

… in the import from registry form

Summary

NiFi can be configured with multiple Registry clients. When multiple clients have at least one that supports branching, e.g. GitHubFlowRegistryClient, and another which does not, e.g. NifiRegistryFlowRegistryClient, the client not supporting branching was being handed branch information. The information was a remnant from the branch-supporting client. Worse, if that branch name was not "main", an error was thrown.

On the "import from registry" form in the UI, the code was updated so that the branch details are wiped each time the registry selection is changed thereby preventing branches from being included in the API calls for non-supporting clients.

NIFI-14471

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

See Jira issue for steps to reproduce - except where the error is reported in the issue, the import of a dataflow should succeed.

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

Build

  • Build completed using ./mvnw clean install -P contrib-check
    • JDK 21
    • JDK 25

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

@mcgilman mcgilman added the ui Pull requests for work relating to the user interface label Oct 3, 2025
@rfellows
Copy link
Contributor

rfellows commented Oct 3, 2025

Will review...

Copy link
Contributor

@rfellows rfellows left a comment

Choose a reason for hiding this comment

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

Your solution works well, there is just one minor optimization we can now take as a result.

@rfellows rfellows added the hacktoberfest-accepted Hacktoberfest Accepted label Oct 3, 2025
Copy link
Contributor

@rfellows rfellows left a comment

Choose a reason for hiding this comment

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

Nice work @markobean, thanks for the fix! 👍

@markobean
Copy link
Contributor Author

FWIW - after the latest change, I repeated my test in a running NiFi. Everything continued to work well.

@rfellows
Copy link
Contributor

rfellows commented Oct 3, 2025

FWIW - after the latest change, I repeated my test in a running NiFi. Everything continued to work well.

Thanks, I had tested out that change locally before suggesting it as well.

I'll merge this once CI is green. Thanks again!

@rfellows rfellows merged commit 246e5f8 into apache:main Oct 6, 2025
7 checks passed
@markobean
Copy link
Contributor Author

markobean commented Oct 6, 2025 via email

awelless pushed a commit to awelless/nifi that referenced this pull request Nov 5, 2025
apache#10383)

* NIFI-14471 clear branch value when switching between registry clients in the import from registry form

* NIFI-14471 optimize by removing redundant method call

This closes apache#10383
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted Hacktoberfest Accepted ui Pull requests for work relating to the user interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants