Skip to content

fix: validate observability plaintext destinations during preflight - #1477

Merged
willkill07 merged 2 commits into
NVIDIA:mainfrom
ericevans-nv:fix/observability-plaintext-preflight
Oct 23, 2026
Merged

willkill07 merged 2 commits into
NVIDIA:mainfrom
ericevans-nv:fix/observability-plaintext-preflight

Conversation

@ericevans-nv

@ericevans-nv ericevans-nv commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Observability preflight could approve destinations that activation later rejected under the plaintext-host policy. This change catches those errors during validation so users can correct their configuration before deployment.

  • I confirm this contribution is my own work, or I have the right to submit it under this project's license.
  • I searched existing issues and open pull requests, and this does not duplicate existing work.

Details

  • Reuse activation’s transport-policy checks in plugin.validate() and plugin.validate_exact().
  • Validate unallowlisted HTTP trace destinations and HTTP logs, metrics, ATOF streams, and ATIF storage with configured headers.
  • Identify the affected signal and endpoint index without exposing credentials, URL paths, or query values.
  • Preserve permitted destinations and existing activation behavior.
  • Add regression coverage for rejected destinations, valid configurations, endpoint identification, and redaction.

Verification

  • Focused Rust regression tests: 8 passed.
  • Python suite with the rebuilt source binding: 86 native tests, 1,202 Python tests, and 24 example tests passed.
  • Rust formatting and Python lint, formatting, and type checks passed.

These test and static-check results were recorded before the final upstream synchronization; those checks were not rerun afterward.

Where should the reviewer start?

Start with the preflight entry points, then the destination-policy checks.

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

Summary by CodeRabbit

  • New Features
    • Observability configuration checks now flag remote destinations that use unencrypted connections, including trace, log, metric, stream, and storage endpoints.
    • HTTPS, loopback destinations, and hosts permitted by policy are accepted. Diagnostics identify the affected endpoint while redacting sensitive values.
    • Checks account for configured headers, inherited and automatic OpenTelemetry destinations, and disabled signals or components.

@ericevans-nv
ericevans-nv requested review from a team as code owners October 23, 2026 16:00
@github-actions github-actions Bot added size:L PR is large Bug issue describes bug; PR fixes bug lang:python PR changes/introduces Python code lang:rust PR changes/introduces Rust code labels Oct 23, 2026
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between 595ebad and 8a278c4.

📒 Files selected for processing: 1
  • python/tests/test_observability_plugin.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout: 1
  • GitHub Check: Detect docs changes
🧰 Additional context used
📓 Path-based instructions: 1
Tests should cover the behavior promised by the changed API surface, including error paths and cross-request isolation where relevant.

⚙️ CodeRabbit configuration file

Files:

  • python/tests/test_observability_plugin.py
🔇 Additional comments: 2
python/tests/test_observability_plugin.py: 2

10-10: LGTM!

Also applies to: 924-938, 940-966, 968-984, 986-990, 992-1004

868-922: 🩺 Stability & Availability

The claim that the fixture leaves process environment changes in place is refuted. The fixture changes the environment only through monkeypatch, which restores every change when the test ends.

The fixture calls monkeypatch.delenv(variable_name) for each OTEL_ variable and monkeypatch.setenv("NEMO_RELAY_TEST_SKIP_IMPLICIT_CONFIG", "1"). Pytest's monkeypatch fixture records the prior state of each change and undoes it in fixture teardown. Teardown runs whether the test passes or fails, so the restoration the comment requests already exists. The fixture is also function-scoped and autouse, so it applies to every test in TestPlaintextPreflight.

Walkthrough

Observability preflight validation now reports applicable plaintext destinations in OpenTelemetry, ATOF, and ATIF configurations. Dynamic configuration validation includes these diagnostics. Rust and Python tests cover destination policies, diagnostic redaction, and activation behavior.

Changes

Observability plaintext preflight

Layer / File(s) Summary
Destination validation rules
crates/core/src/observability/plugin_component.rs
A new validator checks applicable OpenTelemetry, ATOF, and ATIF destinations. It adds error diagnostics when transport validation fails.
Dynamic validation integration
crates/core/src/plugin/dynamic/configuration.rs
validate_exact and validation_report use a shared preflight helper. The helper adds plaintext-destination diagnostics for enabled observability components.
Preflight behavior tests
crates/core/tests/unit/observability/plugin_component_tests.rs, python/tests/test_observability_plugin.py
Tests cover destination policies, diagnostic fields and redaction, disabled signals, and activation when validation reports an error.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant validate_exact
  participant validate_static_preflight_configuration
  participant validate_observability_plaintext_destinations
  validate_exact->>validate_static_preflight_configuration: validate configuration
  validate_static_preflight_configuration->>validate_observability_plaintext_destinations: check enabled observability components
  validate_observability_plaintext_destinations-->>validate_static_preflight_configuration: return diagnostics
  validate_static_preflight_configuration-->>validate_exact: return validation report
Loading
Merge Risk: ⚪ Minimal · up to 8a278

No actionable merge-blocking risk remains from the reviewed changes.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 35.48% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 31 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title uses the allowed fix type, has a concise imperative summary, is lowercase, is 67 characters, and has no trailing period.
Description check Passed The description includes all required template sections, completed overview confirmations, implementation details, reviewer guidance, related issue information, and verification results.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

License Diff

Compared against origin/main.

Lockfile license changes

Lockfile License Changes

Rust

Added

  • None

Removed

  • None

Updated/Changed

tokio

Before:

  • tokio 1.51.1 (MIT)

After:

  • tokio 1.51.6 (MIT)

Node

Added

  • None

Removed

  • None

Updated/Changed

  • None

Python

Added

  • None

Removed

  • None

Updated/Changed

  • None
Status output
[license-diff] selected languages: rust, node, python
[license-diff] generating current inventory
[license-diff] current: generating Rust inventory
[license-diff] current: Rust inventory complete (487 packages)
[license-diff] current: generating Node inventory
[license-diff] current: Node inventory complete (424 packages)
[license-diff] current: generating Python inventory
[license-diff] current: Python inventory complete (134 packages)
[license-diff] current inventory complete
[license-diff] checking out base ref origin/main into a temporary worktree
[license-diff] base: generating Rust inventory
[license-diff] base: Rust inventory complete (487 packages)
[license-diff] base: generating Node inventory
[license-diff] base: Node inventory complete (424 packages)
[license-diff] base: generating Python inventory
[license-diff] base: Python inventory complete (134 packages)
[license-diff] base inventory complete
[license-diff] removing temporary base worktree
[license-diff] comparing inventories
[license-diff] rendering Markdown output
[license-diff] done

@ericevans-nv
ericevans-nv marked this pull request as draft October 23, 2026 16:04
@github-actions

Copy link
Copy Markdown

@ericevans-nv
ericevans-nv force-pushed the fix/observability-plaintext-preflight branch from 0c5cb16 to 595ebad Compare October 23, 2026 17:20
@ericevans-nv
ericevans-nv marked this pull request as ready for review October 23, 2026 17:21
@willkill07 willkill07 added this to the 0.11 milestone Oct 23, 2026
@willkill07
willkill07 removed the request for review from a team October 23, 2026 17:25

@mnajafian-nv mnajafian-nv 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.

lgtm

This branch was previously deployed

1 inactive deployment
fern — 8a278c48 Deployed Oct 23, 2026 by willkill07 via Clean up docs preview #6468
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug issue describes bug; PR fixes bug lang:python PR changes/introduces Python code lang:rust PR changes/introduces Rust code size:L PR is large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants