simonbence commented on PR #8726:
URL: https://github.com/apache/nifi/pull/8726#issuecomment-2090578311

   > Hi @simonbence ! I have been working on a GitHub based registry client and 
this evolved from that.
   > 
   > In my first iteration I had a property called "Branch" on the GH Registry 
Client, which does work fine, but it means that all operations on the client 
are tied to that one branch, which means just to import or save to a different 
branch you need multiple registry clients per branch which didn't feel correct.
   > 
   > Branch really needs to be another parameter to all the methods the way 
that we send in some combination of bucketId, flowId, version. So I refactored 
some of the methods to consolidate all the String arguments into "location" 
objects to reduce the number of arguments per method, and also to hopefully 
avoid needing to change method signatures in the future if a new argument is 
needed. The new branch methods all provide default implementations so any 
existing registry clients can ignore those if they don't care about branching.
   > 
   > I'm not sure when the UI can be updated, but the end goal would be for the 
screens where you save/import to/from a registry client, that you would see:
   > 
   > * Registry Client
   > * Branch
   > * Bucket
   > * Flow
   > * Versions list
   > 
   > For now branch is an optional field when saving/importing, and if not 
specified then the backend will call `getDefaultBranch` from the client and use 
that.
   > 
   > For NiFi Registry, I doubt that we will implement branching there, 
although its possible some day, so for now the branch argument is mostly just 
passed around and not used when interacting with NiFi Registry.
   > 
   > This PR on it's own is a little hard to test the branching changes, but 
the main thing would be making sure that no regressions happen when using NiFi 
Registry, which I did do a bit of testing. After this is merged then I can 
submit the GH Registry Client and then further testing can be done using 
branches there.
   
   Thanks for the quick and comprehensive answer! I really like the "location" 
idea. I left a couple of comments but I think part of my questions might have 
answered by this. 


-- 
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]

Reply via email to