Skip to content

feat(intake): add traces API to intake#9

Merged
BrianNewsom merged 1 commit into
mainfrom
brnewsom/fp-157-get-traces-api
May 21, 2026
Merged

feat(intake): add traces API to intake#9
BrianNewsom merged 1 commit into
mainfrom
brnewsom/fp-157-get-traces-api

Conversation

@BrianNewsom

@BrianNewsom BrianNewsom commented May 21, 2026

Copy link
Copy Markdown
Contributor

Also fixes a number of subtle bugs, including duplicate ATIF token counting.

Validation:

  • uv run --frozen pytest services/intake/tests/test_traces_api.py services/intake/tests/test_traces_clickhouse_repository.py services/intake/tests/test_spans_schemas.py services/intake/tests/test_atif_v17.py services/intake/tests/integration/spans/test_chat_completions_ingest.py services/intake/tests/integration/spans/test_atif_ingest.py services/intake/tests/integration/spans/test_traces_read.py -q
  • uv run --frozen pytest sdk/python/nemo-platform/tests/api_resources/intake/test_traces.py -q
  • uv run --frozen ruff check services/intake/src/nmp/intake services/intake/tests
  • pnpm --filter @nemo/sdk test
  • pnpm gen:check

@BrianNewsom
BrianNewsom requested review from a team as code owners May 21, 2026 15:25
@github-actions

github-actions Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the DCO ✍️ ✅
Posted by the DCO Assistant Lite bot.

@BrianNewsom

Copy link
Copy Markdown
Contributor Author

I have read the DCO document, and I hereby sign the DCO.

@github-actions

github-actions Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

Documentation preview is ready

Preview: https://jubilant-adventure-g4rv38m.pages.github.io/pr-preview/pr-9/pr-9/

Built from b988a41 in workflow run.

This preview is deployed from this PR branch, updates when docs changes are pushed, and will be removed when the PR closes.

@github-actions

github-actions Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 18001/23916 75.3% 61.6%
Integration Tests 11427/22698 50.3% 25.6%

Comment thread services/intake/src/nmp/intake/spans/domain.py Outdated
Comment thread services/intake/src/nmp/intake/spans/trace_repository.py Outdated
@BrianNewsom
BrianNewsom force-pushed the brnewsom/fp-157-get-traces-api branch from f785f6c to 533757b Compare May 21, 2026 18:41
Mirrors the traces API work from the original Platform repository and includes generated SDK/CLI/auth updates plus review feedback.

Signed-off-by: Brian Newsom <brnewsom@nvidia.com>
@BrianNewsom
BrianNewsom force-pushed the brnewsom/fp-157-get-traces-api branch from 533757b to b988a41 Compare May 21, 2026 18:44
@BrianNewsom
BrianNewsom added this pull request to the merge queue May 21, 2026
Merged via the queue into main with commit fa6232c May 21, 2026
23 checks passed
benmccown added a commit that referenced this pull request Jun 23, 2026
Composition over inheritance for the k8s reconcilers (review #2/#3):
* Extract StatusProjector (pod-status projection, crash-loop/pending-timeout
  error builders, host URL) and ResourceDeleter (idempotent 404-tolerant
  delete) as standalone collaborators.
* Reconciler is now a pure interface (the 5 verbs); NimOperatorReconciler and
  K8sReconciler compose the projector + deleter instead of inheriting them.
  The backend builds both collaborators in init() and injects them.

Thread the reconcile context through the backend interface (review #19):
* create/update/get_model_deployment_status now take a single
  ctx: ModelContext instead of (deployment, config, model_entity); applied
  across the ServiceBackend ABC and the docker / none / k8s backends, the
  deployment reconciler call sites, and the test mocks. delete stays
  (workspace, name).

Fixes + nits:
* Harden NIMService status read against a null status/state (review #15):
  (nim_status.get("state") or "").lower() can no longer raise.
* Convert nim_operator logging to structured extra={} (review #13); avoid the
  reserved LogRecord 'name' key (use resource_name / deployment_name).
* Flatten the Files-service create/update branches into a guard-clause helper
  (review #14).
* compile_puller_job: rename args -> container_args (review #17).
* Reconciler nits: import the vllm_k8s_compiler module under its full name
  (review #7), reflow the P3 (a)/(b) comment (review #8), quote values in the
  model-source error (review #9), drop the _ = image_pull_secrets dance
  (review #12), name the event-message cap MAX_EVENT_MESSAGE_CHARS (review #6),
  and document the _select_reconciler None contract (review #16).

Signed-off-by: Ben McCown <bmccown@nvidia.com>
benmccown added a commit that referenced this pull request Jun 24, 2026
Composition over inheritance for the k8s reconcilers (review #2/#3):
* Extract StatusProjector (pod-status projection, crash-loop/pending-timeout
  error builders, host URL) and ResourceDeleter (idempotent 404-tolerant
  delete) as standalone collaborators.
* Reconciler is now a pure interface (the 5 verbs); NimOperatorReconciler and
  K8sReconciler compose the projector + deleter instead of inheriting them.
  The backend builds both collaborators in init() and injects them.

Thread the reconcile context through the backend interface (review #19):
* create/update/get_model_deployment_status now take a single
  ctx: ModelContext instead of (deployment, config, model_entity); applied
  across the ServiceBackend ABC and the docker / none / k8s backends, the
  deployment reconciler call sites, and the test mocks. delete stays
  (workspace, name).

Fixes + nits:
* Harden NIMService status read against a null status/state (review #15):
  (nim_status.get("state") or "").lower() can no longer raise.
* Convert nim_operator logging to structured extra={} (review #13); avoid the
  reserved LogRecord 'name' key (use resource_name / deployment_name).
* Flatten the Files-service create/update branches into a guard-clause helper
  (review #14).
* compile_puller_job: rename args -> container_args (review #17).
* Reconciler nits: import the vllm_k8s_compiler module under its full name
  (review #7), reflow the P3 (a)/(b) comment (review #8), quote values in the
  model-source error (review #9), drop the _ = image_pull_secrets dance
  (review #12), name the event-message cap MAX_EVENT_MESSAGE_CHARS (review #6),
  and document the _select_reconciler None contract (review #16).

Signed-off-by: Ben McCown <bmccown@nvidia.com>
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