-
Notifications
You must be signed in to change notification settings - Fork 2.9k
NIFI-15292 Refactor State Serialization in GetAsanaObject #10599
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
Conversation
- Replaced generic Java Object serialization with simplified String and Map serialization using Gson
|
@exceptionfactory Thank you for submitting this change. In overall looks good, but I'll get more into the details and review it later today. |
|
@takraj - thanks for reviewing, I'll wait for your feedback. As a side note, the current dependency usage makes me think we should deprecate this bundle. It is currently using the Asana client 1.0.0 (https://github.com/exceptionfactory/nifi/blob/main/nifi-extension-bundles/nifi-asana-bundle/pom.xml#L48) which is here https://github.com/Asana/java-asana. It is no longer maintained and the recommendation is: "We recommend using Java's HttpClient or similar HTTP libraries to make direct API requests instead." This bundle currently brings a lot of very old dependencies (grpc 1.59, google http client 1.47, etc). So unless someone is willing to do the work, I think we should mark it as deprecated for removal in the future. I don't think the effort is huge but as always it's a matter of finding someone :) |
Did you test, what happens after upgrading to the new format? I can't see any migration logic. Will the state be simply lost, or will it cause the processor to crash until the user clears the state? |
|
As I see there is an OpenAPI spec for Asana, so a new client could be simply generated from it: I can't tell however, how much work is it to adapt the differences if there are any. The original client was also generated from OpenAPI, but they have made a pre-built version available on maven too. I would suggest to create a NIFI ticket to migrate this component to a new, generated client. |
Yes, changing the format does result in exceptions on upgrade when there is existing state. This will require manual clearing of stored state in the associated cache server. |
@takraj Is this something you are planning to work on soon? If not, then I agree with Pierre's suggestion that the current Processor should be marked as deprecated for removal. Deprecating for removal could also provide the opportunity for a new future implementation if needed. Published NAR bundles of the current version could continue to be used, without maintaining the source code, if maintenance cycles are not available to work through the upgrade and redesign needed. |
|
@takraj and @pvillard31, I submitted PR #10601 to deprecate the current |
pvillard31
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @exceptionfactory - I'm a +1 with the current change as long as we add a note in the migration guide / release notes that clearing the state will be required. We then have the option or not to improve things to avoid the removal. I'll also +1 the addition of the deprecation notice.
@takraj - let me know your thoughts
|
Thanks @pvillard31, I updated the Migration Guidance for 2.7.0 to mention the state change and deprecation for |
|
@pvillard31 +1 from my side as well. |
|
Thanks for the reviews @takraj and @pvillard31! |
Summary
NIFI-15292 Refactors state serialization in the
GetAsanaObjectProcessor using simplifiedStringandMapStringimplementations with Google Gson.The refactored implementation replaces the generic Serializer and Deserializer implementation, built on Java Object serialization.
New unit tests exercise the streamlined implementations, and existing unit tests verify expected state handling behavior in the
GetAsanaObjectProcessor.Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000NIFI-00000Pull Request Formatting
mainbranchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
./mvnw clean install -P contrib-checkLicensing
LICENSEandNOTICEfilesDocumentation