Skip to content

NIFI-2642 Catches (and ignores) ResourceNotFoundException during the …#931

Closed
jtstorck wants to merge 1 commit intoapache:masterfrom
jtstorck:NIFI-2642
Closed

NIFI-2642 Catches (and ignores) ResourceNotFoundException during the …#931
jtstorck wants to merge 1 commit intoapache:masterfrom
jtstorck:NIFI-2642

Conversation

@jtstorck
Copy link
Contributor

…updating of a property value for a controller service when the current value points to a controller service that has been deleted, allowing the assigning of a new controller service to continue.

…updating of a property value for a controller service when the current value points to a controller service that has been deleted, allowing the assigning of a new controller service to continue.
@olegz
Copy link
Contributor

olegz commented Aug 24, 2016

Reviewing

final Authorizable currentServiceAuthorizable = lookup.getControllerService(currentValue).getAuthorizable();
currentServiceAuthorizable.authorize(authorizer, RequestAction.READ, user);
} catch (ResourceNotFoundException e) {
// ignore if the resource is not found, if currentValue was previously deleted, it should not stop assignment of proposedValue
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if instead of raising and then catching exception and do nothing we should instead introduce canLocate(id) or isLocatable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That section of code can still raise an AccessDeniedException, we're just ignoring the RNFE in this specific case. There are probably other cases where the RNFE would bubble up to the UI, where the exception mapper would handle it properly, but in this case it was preventing the new controller service to be assigned. I think for 1.0.0, this is the best fix.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair enough
+1, merging

@asfgit asfgit closed this in 6475924 Aug 24, 2016
@jtstorck jtstorck deleted the NIFI-2642 branch August 24, 2016 21:05
asfgit pushed a commit that referenced this pull request Sep 10, 2016
Added 'file.lastModifiedTime' attribute to ListFileTransfer, which is
the abstract class extended by ListSFTP.
String literal attribute names were replaced with static references to
attribute name constants in ListFile.
ListFileTransfer stores the 'file.lastModifiedTime' attribute in the
format specified in ListFile.FILE_MODIFY_DATE_ATTR_FORMAT

Updated WritesAttribute description for file last modify time attribute
to mirror the entry in ListFile

Signed-off-by: Joe Skora <jskora@gmail.com>

This closes #931.
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.

2 participants