Skip to content

[INFOPLAT-19548] Send legacy telemetry with PublishBatchNoAck (stacked on #23949) - #24062

Draft
pkcll wants to merge 1 commit into
INFOPLAT-19425-core-node-send-telem-chipfrom
legacy-telemetry-chip-ingress-noack
Draft

pkcll wants to merge 1 commit into
INFOPLAT-19425-core-node-send-telem-chipfrom
legacy-telemetry-chip-ingress-noack

Conversation

@pkcll

@pkcll pkcll commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

INFOPLAT-19548

Stacked on #23949 (base is that PR's branch; review only this PR's commit). Retarget to develop once #23949 merges.

What

  • Send legacy telemetry with batch.WithNoAck(), so batches go out as PublishBatchNoAck (server-side Kafka acks=0) instead of PublishBatch.
  • Set batch.WithTransactionEnabled(false) explicitly (partial delivery, per-event results) instead of relying on the library default.
  • Bump pkg/chipingress in all 9 modules to the head of chipingress/batch: add WithNoAck option chainlink-common#2491.
  • No new config key: legacy telemetry is always loss-tolerant, and OTI's own traffic through chip-ingress is already produced with acks=0.
  • ChipIngressEnabled docs and code comments now say what "sent" means.

Why

Follow-up to the round-3 review of #23949 (comment). With NoAck the server answers once it has validated the events and handed them to its producer, so a slow broker no longer holds the batch client's send slots. That shortens in-flight time, which helps the shutdown drain, the batch-split cost and reordering across concurrent sends.

telemetry_client_messages_sent keeps its name and its WSRPC meaning. For the chip path it now means "validated and handed to the producer, not persisted".

Tests

  1. go test -race ./core/services/synchronization/... ./core/services/telemetry/... ./core/config/... plus the config, resolver and TestScripts suites.
  2. The test client now mocks only PublishBatchNoAck. An acked PublishBatch call fails the test.
  3. New: request carries transaction_enabled=false; a mixed per-event result counts sent = n-1 and send_errors = 1.
  4. Mutation-checked: removing WithNoAck(), or setting WithTransactionEnabled(true), fails the new tests.
  5. The test helper now uses the shipped defaults (MaxBatchSize 100, DrainTimeout 1s).

Not tested: NoAck against a real chip-ingress. That needs atlas#13777.

Before this leaves draft

Legacy telemetry is loss-tolerant, and OTI's own traffic through
chip-ingress is already produced with acks=0. Send it with the batch
client's WithNoAck option so chip-ingress answers once it has validated
the events and handed them to its Kafka producer, instead of waiting for
the broker.

- Add batch.WithNoAck() and set batch.WithTransactionEnabled(false)
  explicitly, so per-event results no longer depend on the library
  default.
- Bump pkg/chipingress to chainlink-common#2491 in every module. This
  pins an unmerged commit and must be re-pinned to main before ready.
- Say in the docs and comments that "sent" now means accepted by
  chip-ingress's producer, not persisted.
- Tests: the mock chip client serves PublishBatchNoAck only and fails on
  PublishBatch; add coverage for transaction_enabled=false and for a
  partially rejected batch counting per event. The test client uses the
  shipped batch and drain defaults.

A chip-ingress without PublishBatchNoAck fails every batch with
Unimplemented and there is no fallback, so the server must deploy first.
@github-actions

Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting INFOPLAT-19425-core-node-send-telem-chip

@github-actions

Copy link
Copy Markdown
Contributor

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@cl-sonarqube-production

Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube

@trunk-io

trunk-io Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Static Badge   Static Badge   Static Badge

View Full Report ↗︎ ⋅ Docs

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant