Skip to content

agents: remove ZMQ agent - #636

Open
santigimeno wants to merge 1 commit into
node-v26.13.0-nsolid-v6.3.9-releasefrom
santi/remove-zmq-agent
Open

santigimeno wants to merge 1 commit into
node-v26.13.0-nsolid-v6.3.9-releasefrom
santi/remove-zmq-agent

Conversation

@santigimeno

Copy link
Copy Markdown
Member

Remove the ZMQ transport, its sodium dependency, bindings, configuration, build wiring and tests. Route profiling and snapshots through gRPC and reject asset requests before the agent is initialized.

Update the remaining tests and document the removed configuration.

Fixes: https://github.com/nodesource/nsolid-private/issues/72

Remove the ZMQ transport, its sodium dependency, bindings,
configuration, build wiring and tests. Route profiling and snapshots
through gRPC and reject asset requests before the agent is initialized.

Update the remaining tests and document the removed configuration.

Fixes: nodesource/nsolid-private#72
Signed-off-by: Santiago Gimeno <santiago.gimeno@gmail.com>
@santigimeno santigimeno self-assigned this Oct 29, 2026
@ns-control-tower

ns-control-tower commented Oct 29, 2026 •

Copy link
Copy Markdown

Walkthrough

Retires the ZMQ transport end-to-end. deps/zmq and deps/sodium are deleted (679 files, −113,874 lines) along with agents/zmq, the nsolid_zmq_agent binding (src/node_binding.cc, src/node_external_reference.h), the process.versions.zmq/.sodium entries, the command/data/bulk/pubkey/disableIpv6 config, the ZMQ tests, dep-updater scripts, and the docs for the removed env vars. The asset helpers in lib/nsolid.js no longer pick a transport — they always delegate to the gRPC agent — and GrpcAgent::do_start_prof_init now rejects asset requests with ENotAvailable (runtime code 1006) until the agent is ready (agents/grpc/src/grpc_agent.cc:2139). Build wiring (node.gyp/_gypi, Makefile, vcbuild.bat, tools/nix/v8.nix, LICENSE_NSOLID, help/manpage) is consistent; head-tree greps for zmq/sodium/NSOLID_COMMAND… leave only changelogs, the intentional doc note, the new test, and base64 false positives. The JS-side SaaS simplification is sound: the C++ agent parses the SaaS token itself (parse_saas_token).

overview
asset-request-view

Assessment

  • ⚠️ Blocking — stale test will fail. test/parallel/test-nsolid-config-zmq-channels.js is untouched by this PR but still asserts the removed command/data/bulk validation and localhost:<port> mapping (behavior changed at lib/nsolid.js:686); nothing throws anymore and the keys never reach nsolid.config, so every case fails. It is not skipped, so make test-ci will run it. Delete it (superseded by the new test/parallel/test-nsolid-no-zmq.js) or rewrite it. See the inline comment.
  • ✅ Removed-key semantics, SaaS/grpc config flows, error-code path (ENotAvailable → 1006), and test rewrites were traced against the implementation and are consistent.
  • ℹ️ CI context, both not caused by this PR (verify before merge): Linters / lint-js-and-md fails on doc/node.1 is out of date — the base tip 3da23a50 fails the identical check (run 40772568498); Nix files edited / lint-nix fails on nixfmt drift in tools/nix/sharedLibDeps.nix, a file this PR does not touch (surfaced only because the PR edits tools/nix/v8.nix). The main test suites (Linux/macOS/Windows/shared) were still running at review time.

Verdict: REQUEST_CHANGES — one stale test asserts behavior this PR removes; delete or update test/parallel/test-nsolid-config-zmq-channels.js and this is good to go.

Comment thread lib/nsolid.js
if (OBJECT_PROTO_NAMES.includes(key))
// Ignore constructor properties and removed agent options.
if (OBJECT_PROTO_NAMES.includes(key) ||
[ 'command', 'data', 'bulk', 'pubkey', 'disableIpv6' ].includes(key))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue
lib/nsolid.js:686

These keys are now silently ignored, but test/parallel/test-nsolid-config-zmq-channels.js (untouched by this PR) still asserts the removed behavior for command/data/bulk: it expects nsolid.start() with a non-string value to throw ERR_INVALID_ARG_TYPE, and numeric values to become localhost:PORT in nsolid.config. At this head nothing throws and the keys never reach nsolid.config, so every case in that test fails. It is not skipped, so make test-ci will run it.

Delete the file, or rewrite it: its scenarios are superseded by the new test/parallel/test-nsolid-no-zmq.js, which already asserts these keys are ignored.

🤖 Ask ns-control-tower to fix this

@ns-control-tower please fix: remove or update test/parallel/test-nsolid-config-zmq-channels.js; it still asserts the old command/data/bulk validation this PR removed and will fail in CI.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants