mattcasters opened a new pull request, #7360:
URL: https://github.com/apache/hop/pull/7360

   # Walkthrough - XML Deserialization Lookup Graceful Failure (Issue 7338)
   
   We fixed an issue where loading a pipeline XML file failed with a fatal 
exception if an error-handling configuration referenced a target transform name 
that no longer exists in the pipeline (or was deleted). We changed the 
deserialization process to handle missing references gracefully.
   
   ## Changes Made
   
   ### Core Metadata Serialization
   
   - Modified 
[XmlMetadataUtil.java](file:///home/matt/git/mattcasters/hop/core/src/main/java/org/apache/hop/metadata/serializer/xml/XmlMetadataUtil.java):
     - In `deSerializeXmlUsingNamedList(...)`, removed the throwing of 
`HopXmlException` when a referenced object name (e.g., in a named list such as 
`transforms` or `workflowActions`) cannot be found.
     - Instead, the method now returns `null`, allowing the deserialization of 
the parent object to finish successfully, setting the missing reference field 
to `null`.
   
   ### Core Engine Tests
   
   - Added a new unit test `testIssue7338()` to 
[PipelineMetaTest.java](file:///home/matt/git/mattcasters/hop/engine/src/test/java/org/apache/hop/pipeline/PipelineMetaTest.java):
     - Defines an XML pipeline with an error handling block that points to a 
non-existent transform `NonExistentTransform`.
     - Asserts that parsing this XML completes successfully, the pipeline is 
loaded, and the target transform field resolves to `null` without throwing a 
fatal deserialization error.
   
   ## Verification & Testing
   
   ### Compilation & Tests
   - Successfully ran Spotless formatting check:
     ```bash
     ./mvnw spotless:check -pl core,engine
     ```
   - Executed unit tests for `core` and `engine` modules, with all 584 tests 
passing successfully:
     ```bash
     ./mvnw test -pl core,engine
     ```
   - Executed transform integration tests successfully (exit code 0):
     ```bash
     integration-tests/scripts/run-tests.sh transforms
     ```
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to