slambrose commented on PR #8536: URL: https://github.com/apache/nifi/pull/8536#issuecomment-2040356905
> Thanks for the latest updates @slambrose, this is looking closer to completion. > > Changing the `InMemoryFlowRegistry` to return `true` makes sense, as it is only used in Stateless operation, and it is the only Flow Registry Client available when running. It would be helpful to add a basic unit test class for `InMemoryFlowRegistry`, just to track that expected behavior. > > The other consideration is the base Registry URL. Although the current `getBaseRegistryUrl()` method works when a Registry server is accessible directly, if there is a reverse proxy in front that has an additional context path, rebuilding the URL with just the host and port presents a problem. For example: > > ``` > https://nifi-registry.local/context-path/nifi-registry-api > ``` > > The method would return the following: > > ``` > https://nifi-registry.local > ``` > > The Registry Client would then attempt to append `/nifi-registry-api` as the context path from the root, which would result in failures. > > In light of the fact that the `storageLocation` includes the full path, it seems like a regular expression match would address all scenarios. Something along the lines of the following pattern: > > ``` > ^(https?://.+?/nifi-registry-api).*$ > ``` > > With that pattern, the first capturing group can then be used at the registry URL. Additional Unit tests will be address in future work for InMemoryFlowRegistry class. Regex change has been added. Ready for re-review @exceptionfactory -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
