mattcasters opened a new pull request, #7361:
URL: https://github.com/apache/hop/pull/7361
issue #7304 : Added Pipeline/Workflow Log option to fail the parent
pipeline/workflow if the logging fails
### Summary of Changes
#### 1. Core Models & Metadata
- **`PipelineLog` & `WorkflowLog`**: Added `failParentOnLoggingFailure`
boolean property to control parent execution failure propagation on logging
failure.
#### 2. User Interface
- **`PipelineLogEditor` & `WorkflowLogEditor`**: Added a `Fail
pipeline/workflow if logging fails` checkbox to the editors, bound it to the
model properties, and added translation label strings in
`messages_en_US.properties`.
#### 3. Log Execution & Propagation Logic
- **`PipelineStartLoggingXp` & `WorkflowStartLoggingXp`**:
- Modified execution logic to check if errors occurred during the logging
pipeline execution (`loggingPipeline.getErrors() > 0`) and throw a
`HopException`.
- Added conditional checks so that logging failures only stop/fail the
parent pipeline/workflow if `failParentOnLoggingFailure` is active. Otherwise,
failures are gracefully logged as errors without interrupting the parent thread.
- Expanded exception messages to explicitly log the underlying root cause
messages.
#### 4. Integration Tests
- **`integration-tests/logging`**: Created a new integration test project to
verify both pipeline and workflow logging failure propagation:
- Added project configs (`hop-config.json`, etc.) and metadata run
configurations.
- Created failing logging pipelines using the `Abort` transform.
- Implemented main workflows (`main-001-...` and `main-002-...`)
validating that target objects fail when `failParentOnLoggingFailure` is
checked (routing conditional false hops to `Success` actions).
--
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]