You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "martinzink (via GitHub)" <gi...@apache.org> on 2026/09/15 11:34:24 UTC
[PR] MINIFICPP-2901 Rust route_to_failure by default, rollback explicit [nifi-minifi-cpp]
martinzink opened a new pull request, #2262:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2262
Thank you for submitting a contribution to Apache NiFi - MiNiFi C++.
In order to streamline the review of the contribution we ask you to ensure the following steps have been taken:
### For all changes:
- [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
- [ ] Does your PR title start with MINIFICPP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
- [ ] Has your PR been rebased against the latest commit within the target branch (typically main)?
- [ ] Is your initial contribution a single, squashed commit?
### For code changes:
- [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the LICENSE file?
- [ ] If applicable, have you updated the NOTICE file?
### For documentation related changes:
- [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
### Note:
Please ensure that once the PR is submitted, you check GitHub Actions CI results for build issues and submit an update to your PR as soon as possible.
--
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] MINIFICPP-2901 Rust route_to_failure by default, rollback explicit [nifi-minifi-cpp]
Posted by "martinzink (via GitHub)" <gi...@apache.org>.
martinzink commented on PR #2262:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2262#issuecomment-5872061850
Rebased on top of #2258 and #2225 because they will be merged sooner and there will be conflicts, ive also added some more refactors on top after the rebases because that inspired some good changes
--
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] MINIFICPP-2901 Rust route_to_failure by default, rollback explicit [nifi-minifi-cpp]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #2262:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2262#discussion_r4015214401
##########
minifi_rust/minifi_native/src/api/errors.rs:
##########
@@ -69,23 +69,31 @@ impl From<RouteError> for ProcessError {
impl From<MinifiError> for ProcessError {
fn from(err: MinifiError) -> Self {
- ProcessError::Fatal(err)
+ ProcessError::Route(RouteError {
+ relationship: "failure",
+ source: Box::new(err),
+ log_level: LogLevel::Warn,
+ })
Review Comment:
This blanket conversion also changes every existing `?` on a `MinifiError` inside `ComplexProcessor` implementations into `Route("failure")`. Those processors own their session bookkeeping, so the wrapper has no current FlowFile to route and `process_error_to_status` instead reports `UNKNOWN_ERROR`; for example, `GenerateFlowFileRs` session operations, `LogAttributeRs::transfer`, `ZooProcessorRs` controller-service lookups, and `GetFileRs::report_metrics` now all take this unroutable path. Please migrate those top-level/infrastructure operations to `.rollback_err()?` (including the other Kamikaze trigger branches), or otherwise prevent `Route` from escaping the complex/source wrappers.
This issue also appears on line 85 of the same file.
--
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] MINIFICPP-2901 Rust route_to_failure by default, rollback explicit [nifi-minifi-cpp]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #2262:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2262#discussion_r4016687390
##########
minifi_rust/extensions/minifi_rs_playground/src/processors/duplicate_text.rs:
##########
@@ -65,6 +73,6 @@ impl ProcessorDefinition for DuplicateStreamText {
const SUPPORTS_DYNAMIC_PROPERTIES: bool = false;
const SUPPORTS_DYNAMIC_RELATIONSHIPS: bool = false;
const OUTPUT_ATTRIBUTES: &'static [OutputAttribute] = &[];
- const RELATIONSHIPS: &'static [Relationship] = &[SUCCESS];
+ const RELATIONSHIPS: &'static [Relationship] = &[SUCCESS, FAILURE];
Review Comment:
Adding `FAILURE` changes the processor's published relationship schema, but the checked-in generated documentation still lists only `success` for `DuplicateStreamText` (`minifi_rust/extensions/minifi_rs_playground/minifi_rs_playground.md:91-95`). Regenerate and commit the module documentation so users can configure the new error route from the documented contract.
##########
minifi_rust/minifi_native/src/api/processor_wrappers/flow_file_stream_transform.rs:
##########
@@ -116,13 +125,13 @@ where
session.write_stream(&flow_file, |output_stream| {
let transformed = match transform_fn(&simple_context, input_stream, output_stream) {
Ok(t) => t,
- Err(ProcessError::Route(route)) => {
- route.log(logger);
- TransformStreamResult::route_without_changes_by_name(route.relationship)
- }
- Err(ProcessError::Fatal(e)) => {
- return Err(e);
- }
+ Err(err) => match err.into_route(error_relationship) {
+ Ok(route) => {
+ route.log(logger);
+ TransformStreamResult::route_without_changes_by_name(route.relationship)
Review Comment:
This automatic error route relies on `IoState::Cancel` to preserve the original content, but `MockProcessSession::write_stream` currently ignores that state and always replaces the FlowFile content (`mock/mock_process_session.rs:109-113`). A stream transform that writes a prefix and then bubbles an error will therefore be transferred to the error relationship with partial content in wrapper-level tests, contrary to `route_without_changes`. Please make the mock honor cancellation and add a trigger-level regression test that checks the relationship and unchanged content.
--
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