Created 06-15-2023 02:28 AM
Hi,
My issue related to committing workflow changes onto my Github repository. I have made changes in the providers.xml file and now my Nifi flows are linked to Github flowPersistenceProvider.
However, when I try to commit changes to the same linked repo, it gives me below error:
and in the log files, it says: "Flow version is not added yet, can not be serialized.. Returning Conflict response."
I also witnessed on "show local changes" that the prompt gives an error "version must be greater than 1". Are these linked?
Any guideline would help. Thanks.
Created 06-15-2023 05:36 AM
@Kiranq
This is what I believe you executed from yoru description:
You were originally using the the FileSystemFlowPersistenceProvider and has already version controlled one or more NiFi Process Groups (PG) to your NiFi-Registry?
Then you change your configuration to use the GitFlowPersistenceProvider?
This is what I believe you did not do:
Prior to switching flow persistence providers, did you stop version control on all your PGs?
In order to switch the Flow Persistence Provider, it is necessary to reset NiFi Registry. For example, to switch from FileSystemFlowPersistenceProvider to GitFlowPersistenceProvider, follow these steps:
Stop version control on all ProcessGroups in NiFi
Stop NiFi Registry
Move the H2 DB (specified as nifi.registry.db.directory in nifi-registry.properties) and Flow Storage Directory for FileSystemFlowPersistenceProvider directories somewhere for back up
Configure GitFlowPersistenceProvider provider in providers.xml
Start NiFi Registry
Recreate any buckets
Start version control on all ProcessGroups again.
It appears as though you may not have followed the above documented steps in the NiFi-Registry admin guide (https://nifi.apache.org/docs/nifi-registry-docs/html/administration-guide.html#flow-persistence-prov...). This leaves you with your Metadata Database with info about your version controlled PGs and that metadata references flows persisted that it can no longer find in the flow persistence provider configured.
If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped.
Thank you,
Matt
Created 06-15-2023 05:36 AM
@Kiranq
This is what I believe you executed from yoru description:
You were originally using the the FileSystemFlowPersistenceProvider and has already version controlled one or more NiFi Process Groups (PG) to your NiFi-Registry?
Then you change your configuration to use the GitFlowPersistenceProvider?
This is what I believe you did not do:
Prior to switching flow persistence providers, did you stop version control on all your PGs?
In order to switch the Flow Persistence Provider, it is necessary to reset NiFi Registry. For example, to switch from FileSystemFlowPersistenceProvider to GitFlowPersistenceProvider, follow these steps:
Stop version control on all ProcessGroups in NiFi
Stop NiFi Registry
Move the H2 DB (specified as nifi.registry.db.directory in nifi-registry.properties) and Flow Storage Directory for FileSystemFlowPersistenceProvider directories somewhere for back up
Configure GitFlowPersistenceProvider provider in providers.xml
Start NiFi Registry
Recreate any buckets
Start version control on all ProcessGroups again.
It appears as though you may not have followed the above documented steps in the NiFi-Registry admin guide (https://nifi.apache.org/docs/nifi-registry-docs/html/administration-guide.html#flow-persistence-prov...). This leaves you with your Metadata Database with info about your version controlled PGs and that metadata references flows persisted that it can no longer find in the flow persistence provider configured.
If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped.
Thank you,
Matt
Created 10-04-2024 10:18 AM
Hi Matt, Is there any way to recover the registry, if we have missed to stop the version control
Created 10-04-2024 12:20 PM
@Abibee04
Please start a new Community question with the details of your query.
I am not clear what you mean by "recover the registry", so the more detail you can provide the better in that new community question by sharing what step you performed and what you are looking to accomplish.
Thank you,
Matt
Created 06-15-2023 08:29 AM
@MattWho thanks for your response.
I followed the documented way to switch between flow persistence providers but still getting an error however, a different now:
I am witnessing that if I commit and push changes to my Git repo using VS Code, the error I mentioned in my last message disappears, however, using UI when I try to commit changes, it is now showing me above error.
In all, I am unable to commit changes to my flows when it is linked with to a Github repo. I am wondering if this functionality that I am trying is even possible?
If it helps, my nifi-registry-app logs are rotating between these two kinds of errors when I make any changes in my workflow:
An unexpected error has occurred: org.apache.nifi.registry.flow.FlowPersistenceException: Git directory <path to git directory on my local machine> is not clean or has uncommitted changes, resolve those changes first to save flow contents.. Returning Internal Server Error response.
I commit and push changes through VS Code (success) since NiFi UI throws error. Then I try to redo "commit local changes" from NiFi UI, it gives below error in my log file.
Flow version is not added yet, can not be serialized.. Returning Conflict response.
Looking forward to any guideline.
Thanks.
Created 06-16-2023 09:58 AM
@Kiranq
1. What version of NiFi and NiFi-Registry are you using?
2. How is your GitFlowPersistenceProvider configured?
Matt