Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revision processor up-to-date problem #198

Closed
hamzabekkouri opened this issue May 27, 2020 · 2 comments
Closed

revision processor up-to-date problem #198

hamzabekkouri opened this issue May 27, 2020 · 2 comments
Assignees

Comments

@hamzabekkouri
Copy link

  • Nipyapi version: last version
  • NiFi version: 1.11
  • NiFi-Registry version:
  • Python version: 3.6
  • Operating System: ubuntu

Description

when I want to update the processor attribute or any things on it, it shows me this error below, I did not have this problem before with nifi 1.8 version, but when I upgrade to nifi 1.11, the problem of revision appears always when I want update processor.

Error :

is unable to fulfill this request due to: [5, null, 90568d36-a77b-1115-ffff-ffff99537941] is not the most up-to-date revision. This component appears to have been modified

What I Did

def update_processor_attribute(root_pg_id,Json_props,Processor):
    proApi = nifi.apis.processors_api.ProcessorsApi(api_client=None)
    propsDto = models.processor_config_dto.ProcessorConfigDTO(properties=Json_props)
    proDto = nifi.models.processor_dto.ProcessorDTO(id=Processor.id,parent_group_id=root_pg_id,config=propsDto)
    proEntity = nifi.models.processor_entity.ProcessorEntity(revision=models.RevisionDTO(version=Processor.revision.version+1),component=proDto)
    proApi.update_processor(Processor.id,proEntity)
    

what I noticed from my script that did the upgrade is that when I add 1 for version it work for the one that is already created in nifi, but when I add processor with API and same time I do update it was not working !!

Urgency

Please give a brief description of how critical this issue is to you.
For example, if it's blocking your Production environment, or perhaps you are just notifying us of something you found but isn't blocking your workflow.

Please Mr @Chaffelson we need you help,

@Chaffelson
Copy link
Owner

nipyapi.canvas.update_processor doesn't currently have a refresh flag, which would be a good addition to make this work better.
Generally the process is to fetch the current revision using a get_processor command, then supply that with the next call. I do not think it needs to be incremented manually.

Is there a reason why you aren't using nipyapi.canvas.update_processor ?

@Chaffelson
Copy link
Owner

Fixed in v0.16.0 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants