You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "exceptionfactory (via GitHub)" <gi...@apache.org> on 2025/12/04 03:44:56 UTC

[PR] NIFI-15292 Refactor State Serialization in GetAsanaObject [nifi]

exceptionfactory opened a new pull request, #10599:
URL: https://github.com/apache/nifi/pull/10599

   # Summary
   
   [NIFI-15292](https://issues.apache.org/jira/browse/NIFI-15292) Refactors state serialization in the `GetAsanaObject` Processor using simplified `String` and `MapString` implementations 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 `GetAsanaObject` Processor.
   
   # Tracking
   
   Please complete the following tracking steps prior to pull request creation.
   
   ### Issue Tracking
   
   - [X] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created
   
   ### Pull Request Tracking
   
   - [X] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-00000`
   - [X] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-00000`
   
   ### Pull Request Formatting
   
   - [X] Pull Request based on current revision of the `main` branch
   - [X] Pull Request refers to a feature branch with one commit containing changes
   
   # Verification
   
   Please indicate the verification steps performed prior to pull request creation.
   
   ### Build
   
   - [ ] Build completed using `./mvnw clean install -P contrib-check`
     - [ ] JDK 21
     - [ ] JDK 25
   
   ### Licensing
   
   - [ ] New dependencies are compatible with the [Apache License 2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License Policy](https://www.apache.org/legal/resolved.html)
   - [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` files
   
   ### Documentation
   
   - [ ] Documentation formatting appears as expected in rendered files
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] NIFI-15292 Refactor State Serialization in GetAsanaObject [nifi]

Posted by "takraj (via GitHub)" <gi...@apache.org>.
takraj commented on PR #10599:
URL: https://github.com/apache/nifi/pull/10599#issuecomment-3611087932

   @exceptionfactory Thank you for submitting this change. In overall looks good, but I'll get more into the details and review it later today.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] NIFI-15292 Refactor State Serialization in GetAsanaObject [nifi]

Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory commented on PR #10599:
URL: https://github.com/apache/nifi/pull/10599#issuecomment-3612936749

   @takraj and @pvillard31, I submitted PR #10601 to deprecate the current `GetAsanaObject` Processor and supporting Controller Service for removal. That should provide a path forward, just leaving this current issue as a minimal change to eliminate Java Object serialization.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] NIFI-15292 Refactor State Serialization in GetAsanaObject [nifi]

Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory commented on PR #10599:
URL: https://github.com/apache/nifi/pull/10599#issuecomment-3613080128

   Thanks @pvillard31, I updated the [Migration Guidance for 2.7.0](https://cwiki.apache.org/confluence/display/NIFI/Migration+Guidance#MigrationGuidance-Migratingto2.7.0) to mention the state change and deprecation for `GetAsanaObject`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] NIFI-15292 Refactor State Serialization in GetAsanaObject [nifi]

Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory commented on PR #10599:
URL: https://github.com/apache/nifi/pull/10599#issuecomment-3612432435

   > @exceptionfactory
   > 
   > > implementation replaces the generic Serializer and Deserializer implementation, built on Java Object serialization.
   > 
   > 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?
   
   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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] NIFI-15292 Refactor State Serialization in GetAsanaObject [nifi]

Posted by "pvillard31 (via GitHub)" <gi...@apache.org>.
pvillard31 closed pull request #10599: NIFI-15292 Refactor State Serialization in GetAsanaObject
URL: https://github.com/apache/nifi/pull/10599


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] NIFI-15292 Refactor State Serialization in GetAsanaObject [nifi]

Posted by "pvillard31 (via GitHub)" <gi...@apache.org>.
pvillard31 commented on PR #10599:
URL: https://github.com/apache/nifi/pull/10599#issuecomment-3611121178

   @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 :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] NIFI-15292 Refactor State Serialization in GetAsanaObject [nifi]

Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory commented on PR #10599:
URL: https://github.com/apache/nifi/pull/10599#issuecomment-3612443820

   > @pvillard31
   > 
   > As I see there is an OpenAPI spec for Asana, so a new client could be simply generated from it: https://github.com/Asana/openapi
   > 
   > 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.
   
   @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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] NIFI-15292 Refactor State Serialization in GetAsanaObject [nifi]

Posted by "takraj (via GitHub)" <gi...@apache.org>.
takraj commented on PR #10599:
URL: https://github.com/apache/nifi/pull/10599#issuecomment-3611821640

   @exceptionfactory
   
   > implementation replaces the generic Serializer and Deserializer implementation, built on Java Object serialization.
   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?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] NIFI-15292 Refactor State Serialization in GetAsanaObject [nifi]

Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory commented on PR #10599:
URL: https://github.com/apache/nifi/pull/10599#issuecomment-3613101762

   Thanks for the reviews @takraj and @pvillard31!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] NIFI-15292 Refactor State Serialization in GetAsanaObject [nifi]

Posted by "takraj (via GitHub)" <gi...@apache.org>.
takraj commented on PR #10599:
URL: https://github.com/apache/nifi/pull/10599#issuecomment-3613090505

   @pvillard31 +1 from my side as well.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org