Skip to content

NIFI-6025: Include Processor 'scheduled state' (i.e., Enabled or Disa…#3546

Closed
markap14 wants to merge 2 commits intoapache:masterfrom
markap14:NIFI-6025
Closed

NIFI-6025: Include Processor 'scheduled state' (i.e., Enabled or Disa…#3546
markap14 wants to merge 2 commits intoapache:masterfrom
markap14:NIFI-6025

Conversation

@markap14
Copy link
Contributor

…bled) in the VersionedProcessor when pushing to Flow Registry and take into account when updating flows on the NiFi side

Thank you for submitting a contribution to Apache NiFi.

Please provide a short description of the PR here:

Description of PR

Enables X functionality; fixes bug NIFI-YYYY.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced
    in the commit message?

  • Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

  • Has your PR been rebased against the latest commit within the target branch (typically master)?

  • Is your initial contribution a single, squashed commit? Additional commits in response to PR reviewer feedback should be made on this branch and pushed to allow change tracking. Do not squash or use --force when pushing to allow for clean monitoring of changes.

For code changes:

  • Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
  • Have you written or updated unit tests to verify your changes?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
  • If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
  • If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered?

Note:

Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.

@mcgilman
Copy link
Contributor

mcgilman commented Jul 2, 2019

Will review...

@mcgilman
Copy link
Contributor

mcgilman commented Jul 2, 2019

@markap14 If I only changed the scheduled state to disabled, it does not show as a local change. I expected that disabling a processor in my flow would be recognized as a local change. It was not. Once I made another change, I was able to save a new revision. Upon import of that revision that processor was correctly disabled.

@bbende
Copy link
Contributor

bbende commented Jul 12, 2019

@markap14 it seems like the scheduled state only gets applied if some other change is also made to the component which triggers the update.

Example:

  • Created a PG with proc1 enabled, proc2 disabled
  • Start version control
  • Import another instance of it and verify the procs have correct state
  • Change original PG so that proc1 is disabled, and proc2 is enabled, also moved position of proc2 to make a local change
  • Commit version 2
  • Change version on second PG and it correctly updates proc2, but leaves proc1 enabled

When stepping through in the debugger it never enters the updateProcessor method for proc1. The only reason I can think is because it wasn't considered an affected component b/c nothing in the flow diff showed proc1.

This probably ties back into Matt's question because if we start adding schedule state into the flow diff then it will become a local change by default, and then we have to decide if we want to add the code to filter it out on NiFi side.

@markap14
Copy link
Contributor Author

@bbende I think you and @mcgilman are saying the same thing. That was my intent, but I don't have a strong preference whether or not to consider that a local change, one way or the other. But given that you both were surprised by the behavior, I will update the PR so that enabling or disabling the component will be considered a local change. Thanks.

@markap14
Copy link
Contributor Author

OK I pushed an update to the PR. However, since we are changing the comparison logic, that has to be done in the nifi-registry project, so this is now blocked by NIFIREG-294.

markap14 added 2 commits July 25, 2019 11:09
…bled) in the VersionedProcessor when pushing to Flow Registry and take into account when updating flows on the NiFi side
@bbende
Copy link
Contributor

bbende commented Jul 29, 2019

+1 Tested the latest commit and it resolved the issue I described above.

Will merge this right after next registry release.

@asfgit asfgit closed this in 4ae1fec Aug 29, 2019
szaboferee pushed a commit to szaboferee/nifi that referenced this pull request Oct 7, 2019
…bled) in the VersionedProcessor when pushing to Flow Registry and take into account when updating flows on the NiFi side

NIFI-6025: Include difference in Scheduled State as a Local Flow Difference

This closes apache#3546.

Signed-off-by: Bryan Bende <bbende@apache.org>
patricker pushed a commit to patricker/nifi that referenced this pull request Jan 22, 2020
…bled) in the VersionedProcessor when pushing to Flow Registry and take into account when updating flows on the NiFi side

NIFI-6025: Include difference in Scheduled State as a Local Flow Difference

This closes apache#3546.

Signed-off-by: Bryan Bende <bbende@apache.org>
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