Skip to content

refactor(api): remove spec.trace from AgentRuntime CRD - #377

Merged
pdettori merged 1 commit into
rossoctl:mainfrom
rh-dnagornuks:remove-trace-from-agentruntime
May 27, 2026
Merged

refactor(api): remove spec.trace from AgentRuntime CRD#377
pdettori merged 1 commit into
rossoctl:mainfrom
rh-dnagornuks:remove-trace-from-agentruntime

Conversation

@rh-dnagornuks

@rh-dnagornuks rh-dnagornuks commented May 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Removes the per-workload tracing configuration (spec.trace) from the AgentRuntime CRD, along with the TraceSpec, SamplingSpec, and TraceProtocol types. Tracing configuration was never consumed by any reconciliation or injection path. — the ResolvedConfig.TraceEndpoint/TraceProtocol/TraceSamplingRate fields were populated from the CR but never consumed by the pod mutator or container builder, making them dead code from inception. The MLflow controller also has no trace/OTEL references.

Changes

  • Remove TraceSpec, SamplingSpec, and TraceProtocol types from agentruntime_types.go
  • Remove spec.trace field from AgentRuntimeSpec and regenerate CRD manifests / deepcopy
  • Remove trace-related overrides from AgentRuntimeOverrides and extractOverrides in the webhook injector
  • Remove traceConfig struct and Trace field from the controller's resolvedConfig (config-hash computation)
  • Remove dead TraceEndpoint/TraceProtocol/TraceSamplingRate fields from ResolvedConfig — these were never read by any code path
  • Remove trace override application from ResolveConfig
  • Update sample YAML and documentation: remove trace mention
  • Remove all trace-specific test cases

Testing

  • make fmt vet and make test — pass
  • pre-commit run --all-files — all hooks pass
  • Deployed to live cluster — AgentRuntime CRD doesn't contain trace related fields

Related Issues

Resolves: RHAIENG-4932 (partial — trace removal only; identity retained)

Made with Cursor

@rh-dnagornuks
rh-dnagornuks force-pushed the remove-trace-from-agentruntime branch 2 times, most recently from 3bd2015 to 72c2819 Compare May 27, 2026 08:54
Strip the tracing configuration from the AgentRuntime API surface.
Tracing configuration now lives exclusively in cluster and
namespace-level ConfigMaps, not per-CR fields.

- Remove TraceSpec, SamplingSpec, and TraceProtocol types from
  agentruntime_types.go
- Remove trace overrides from AgentRuntimeOverrides and ResolveConfig
- Clean up controller config resolution (drop Trace from resolvedConfig)
- Update sample YAMLs (remove trace blocks, keep identity)
- Regenerate CRD manifests and deepcopy via controller-gen
- Update all affected tests and docs

Ref: RHAIENG-4932

Signed-off-by: Daniels Nagornuks <dnagornu@redhat.com>

Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
@rh-dnagornuks
rh-dnagornuks force-pushed the remove-trace-from-agentruntime branch from 72c2819 to 0c74a2a Compare May 27, 2026 10:04
@rh-dnagornuks
rh-dnagornuks marked this pull request as ready for review May 27, 2026 10:08
@rh-dnagornuks
rh-dnagornuks requested a review from a team as a code owner May 27, 2026 10:08

@pdettori pdettori left a comment

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.

Clean, thorough removal of dead spec.trace code from the AgentRuntime CRD. The TraceSpec, SamplingSpec, and TraceProtocol types were populated from the CR but never consumed by any reconciliation or injection path — genuine dead code from inception.

Areas reviewed: Go (API types, controller, webhook/injector), Helm/CRD manifests, Docs, Tests, YAML samples, Security, Commit conventions

Spec alignment (specs/001-agentcard-into-status/): No conflict. That spec adds status.card (card discovery) while this PR removes dead fields from spec.trace — orthogonal subresources and concerns. spec.identity (SPIFFE) is preserved, which the card-discovery mTLS path depends on.

CI: All 15 checks passing.
Commit: Single squashed commit, DCO signed-off, conventional format.

No issues found. LGTM.

@pdettori
pdettori merged commit 3b0351f into rossoctl:main May 27, 2026
15 checks passed
@github-project-automation github-project-automation Bot moved this from New /:ToDo to Done in Rossoctl Issue Prioritization May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants