You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@streampipes.apache.org by "aviralnull (via GitHub)" <gi...@apache.org> on 2026/02/09 10:26:42 UTC

[PR] HTTP Server adapter now works after moving nested JSON (#3690) The ad…

aviralnull opened a new pull request, #4156:
URL: https://github.com/apache/streampipes/pull/4156

   …apter was crashing when reopened after moving nested properties because path references weren't updated. Now validates paths and handles errors gracefully.
   
   <!--
     ~ Licensed to the Apache Software Foundation (ASF) under one or more
     ~ contributor license agreements.  See the NOTICE file distributed with
     ~ this work for additional information regarding copyright ownership.
     ~ The ASF licenses this file to You under the Apache License, Version 2.0
     ~ (the "License"); you may not use this file except in compliance with
     ~ the License.  You may obtain a copy of the License at
     ~
     ~    http://www.apache.org/licenses/LICENSE-2.0
     ~
     ~ Unless required by applicable law or agreed to in writing, software
     ~ distributed under the License is distributed on an "AS IS" BASIS,
     ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     ~ See the License for the specific language governing permissions and
     ~ limitations under the License.
     ~
     -->
   
     <!--
   Thanks for contributing! Here are some tips you can follow to help us incorporate your contribution quickly and easily:
   1. If this is your first time, please read our contributor guidelines:
       - https://streampipes.apache.org/community/get-involved/
       - https://cwiki.apache.org/confluence/display/STREAMPIPES/Getting+Started
   2. Make sure the PR title is formatted like: `[#<GitHub issue id>] PR title ...`
   3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., `[WIP][#<GitHub issue id>] PR title ...`.
   4. Please write your PR title to summarize what this PR proposes/fixes.
   5. Link the PR to the corresponding GitHub issue (if present) in the `Development` section in the right menu bar.
   6. Be sure to keep the PR description updated to reflect all changes.
   7. If possible, provide a concise example to reproduce the issue for a faster review.
   8. Make sure tests pass via `mvn clean install`.
   9. (Optional) If the contribution is large, please file an Apache ICLA
       - http://apache.org/licenses/icla.pdf
   -->
   
   ### Purpose
   <!--
   Please clarify what changes you are proposing and describe how those changes will address the issue.
   Furthermore, describe potential consequences the changes might have.
   -->
   
   ### Remarks
   <!--
   Is there anything left we need to pay attention on?
   Are there some references that might be important? E.g. links to Confluence, or discussions
   on the mailing list or GitHub.
   -->
   PR introduces (a) breaking change(s): <yes/no>
   
   PR introduces (a) deprecation(s): <yes/no>
   


-- 
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: dev-unsubscribe@streampipes.apache.org

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


Re: [PR] HTTP Server adapter now works after moving nested JSON (#3690) The ad…

Posted by "aviralnull (via GitHub)" <gi...@apache.org>.
aviralnull commented on PR #4156:
URL: https://github.com/apache/streampipes/pull/4156#issuecomment-3870832133

   ## Purpose
   Fixes a crash in the HTTP Server adapter when reopening it after moving nested JSON properties.
   
   ## Root Cause
   After nested properties were moved, internal path references were not updated correctly.
   This caused invalid path access and resulted in a crash when reopening the adapter.
   
   ## Solution
   - Added path validation before access
   - Implemented graceful error handling
   - Introduced ToOriginalSchemaConverter for schema consistency
   - Added comprehensive unit tests
   
   ## Testing
   - Added new unit tests for conversion logic
   - Verified adapter can be reopened without crash
   - All tests pass locally
   
   PR introduces (a) breaking change(s): no  
   PR introduces (a) deprecation(s): no
   


-- 
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: dev-unsubscribe@streampipes.apache.org

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


Re: [PR] HTTP Server adapter now works after moving nested JSON (#3690) The ad…

Posted by "aviralnull (via GitHub)" <gi...@apache.org>.
aviralnull commented on PR #4156:
URL: https://github.com/apache/streampipes/pull/4156#issuecomment-3871184031

   @dominikriemer - Fair point, and I apologize for the messy PR. To be honest, I used AI to help with parts of this but didn't verify the generated code against the actual codebase before submitting. That's on me - I should have caught that it was creating methods that don't exist in StreamPipes. 
   I am genuinely interested in fixing this issue though. Looking at the stack trace, the error flows through ConversionUtils.findProperty() at line 91, then ToOriginalSchemaConverter.visit() and MoveRuleDescription.accept(). I'm just not clear on where the validation should actually go - in findProperty() itself to handle missing properties, or earlier in the flow before transformation happens? Are there existing validation patterns I should follow?
   I'll dig into the actual code properly this time and come back with a real fix that fits the existing structure. Thanks for the feedback - I appreciate you taking the time to point this out.


-- 
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: dev-unsubscribe@streampipes.apache.org

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


Re: [PR] HTTP Server adapter now works after moving nested JSON (#3690) The ad…

Posted by "dominikriemer (via GitHub)" <gi...@apache.org>.
dominikriemer commented on PR #4156:
URL: https://github.com/apache/streampipes/pull/4156#issuecomment-3871099166

   These methods do not even exist anymore so I guess this is just an AI - flagging as spam


-- 
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: dev-unsubscribe@streampipes.apache.org

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


Re: [PR] HTTP Server adapter now works after moving nested JSON (#3690) The ad…

Posted by "dominikriemer (via GitHub)" <gi...@apache.org>.
dominikriemer closed pull request #4156: HTTP Server adapter now works after moving nested JSON (#3690) The ad…
URL: https://github.com/apache/streampipes/pull/4156


-- 
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: dev-unsubscribe@streampipes.apache.org

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