Skip to content

NIFI-16333 - Bypass Secrets Manager cache when a connector starts - #11663

Merged
exceptionfactory merged 3 commits into
apache:mainfrom
pvillard31:NIFI-16333
Sep 14, 2026
Merged

exceptionfactory merged 3 commits into
apache:mainfrom
pvillard31:NIFI-16333

Conversation

@pvillard31

Copy link
Copy Markdown
Contributor

Summary

NIFI-16333 - Bypass Secrets Manager cache when a connector starts

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 contains commits signed with a registered key indicating Verified status

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 ./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

@pvillard31
pvillard31 requested a review from markap14 September 10, 2026 13:15

@exceptionfactory exceptionfactory left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for adjusting this behavior @pvillard31, this sounds reasonable for Connector starting. The general approach looks good, I noted a couple minor recommendations

}

try (final NarCloseable ignored = NarCloseable.withComponentNarLoader(extensionManager, connectorDetails.getConnector().getClass(), getIdentifier())) {
activeFlowContext.getConfigurationContext().resolvePropertyValues(false);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does this introduce a potential issue where we would call resolvePropertyValues(false); and then later call resolvePropertyValues(true) such that the latter call would resolve values using a stale cache, whereas this call used newer versions?

If so, would it make sense to just simply call invalidateCache() instead? Then there'd be no need to introduce a new override to resolvePropertyValues...

@pvillard31

Copy link
Copy Markdown
Contributor Author

Thanks @markap14 - this is a good idea and I followed your recommendation, this makes it cleaner. Thanks for the review @exceptionfactory.

@markap14 markap14 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @pvillard31 this looks simpler and more straight-forward. +1 from me. @exceptionfactory any other concerns or shall we merge (pending successful CI checks)?

@pvillard31

Copy link
Copy Markdown
Contributor Author

rebased and fixed merge conflicts

@exceptionfactory exceptionfactory left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for pointing in a simpler direction @markap14, and thanks for making the adjustments @pvillard31, the latest version looks good.

@exceptionfactory
exceptionfactory merged commit 8a5aebe into apache:main Sep 14, 2026
19 of 21 checks passed
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