Skip to content

MINIFICPP-2927 Add FetchOPCFile processor - #2287

Open
lordgamez wants to merge 1 commit into
apache:MINIFICPP-2908from
lordgamez:MINIFICPP-2927
Open

lordgamez wants to merge 1 commit into
apache:MINIFICPP-2908from
lordgamez:MINIFICPP-2927

Conversation

@lordgamez

@lordgamez lordgamez commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

https://issues.apache.org/jira/browse/MINIFICPP-2927

Depends on #2268


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?
  • 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.

@lordgamez
lordgamez force-pushed the MINIFICPP-2927 branch 2 times, most recently from c4b212f to 3b6ce15 Compare October 20, 2026 08:53
@lordgamez
lordgamez marked this pull request as ready for review October 20, 2026 10:31
@lordgamez
lordgamez requested a balanced review from Copilot November 9, 2026 14:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

4 open issues
What changed in this PR

Adds the new FetchOPCFile OPC UA processor and supporting test infrastructure to enable fetching file contents from OPC UA FileType nodes (including optional “lazy” change detection).

Changes:

  • Introduces FetchOPCFile processor implementation plus shared OPC UA file-transfer utilities.
  • Adds extensive unit + behave/E2E test coverage (including an OPC UA file server container/image).
  • Updates processor documentation and the generated docker manifest reference.
File Description
extensions/​opc/​tests/​features/​steps/​steps.py Adds Behave steps for provisioning an OPC UA file server and populating files.
extensions/​opc/​tests/​features/​resources/​opcua-file-server/​file_server.cpp Implements a lightweight open62541-based OPC UA file server exposing /data as FileType nodes.
extensions/​opc/​tests/​features/​resources/​opcua-file-server/​Dockerfile Builds the OPC UA file server image used by Behave scenarios.
extensions/​opc/​tests/​features/​opcua_file_transfer.feature Adds E2E scenario validating FetchOPCFile against the file server container.
extensions/​opc/​tests/​features/​containers/​opc_ua_file_server_container.py Adds a dedicated test container wrapper for the OPC UA file server.
extensions/​opc/​tests/​OpcUaTestServer.h Extends the in-process test server with FileType-like nodes and method callbacks.
extensions/​opc/​tests/​FetchOPCFileTests.cpp Adds comprehensive unit tests for FetchOPCFile behavior and edge cases.
extensions/​opc/​src/​OPCFileTransfer.cpp Implements RemoteFile Open/Read/Close interactions and chunking behavior.
extensions/​opc/​src/​OPCCommon.cpp Adds reusable helpers (nodeIdAttributes, method calls, browse name/scalar reads, findChild).
extensions/​opc/​src/​FetchOPCFile.cpp Implements the new FetchOPCFile processor logic, caching, and lazy-mode state handling.
extensions/​opc/​include/​OPCFileTransfer.h Declares RemoteFile/RemoteFileHandle and chunk wrapper types.
extensions/​opc/​include/​OPCCommon.h Declares MethodOutput and new Client helper APIs + nodeIdAttributes.
extensions/​opc/​include/​FetchOPCFile.h Declares FetchOPCFile properties/relationships/attributes and internal state.
README.md Updates extension processor list to include FetchOPCEvents and FetchOPCFile.
PROCESSORS.md Documents FetchOPCFile processor properties/relationships/output attributes.
.github/​references/​docker_manifest.json Adds the FetchOPCFile processor metadata entry used by the docker manifest reference.

Review effort: Lite

Comment thread extensions/opc/include/OPCCommon.h Resolved
Comment thread extensions/opc/src/FetchOPCFile.cpp Resolved
Comment thread extensions/opc/src/OPCCommon.cpp Resolved
Comment thread PROCESSORS.md
Comment on lines +1149 to +1150
| Certificate path | | | Path to the DER-encoded cert file |
| Key path | | | Path to the DER-encoded key file |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally we use PEM, can we support both PEM and DER?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally we only used DER key format for the initial processors, but from what I see in the open62541 library PEM is also supported with and without password. As the PEM keys are also converted to DER format in the library, and from what I see in the git logs, PEM support was probably added later than the first introduced OPC UA processors, that is why it was not supported before. We can add the support for it, but as this is a common feature that affects all processors I would handle it separately, I created a new jira for it: https://issues.apache.org/jira/browse/MINIFICPP-2953

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants