Skip to content

fix(operator): preserve alpha service metadata precedence - #14855

Merged
julienmancuso merged 4 commits into
mainfrom
codex/fix-dyn-4442-service-metadata
Sep 15, 2026
Merged

julienmancuso merged 4 commits into
mainfrom
codex/fix-dyn-4442-service-metadata

Conversation

@julienmancuso

@julienmancuso julienmancuso commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • prevent DGD spec metadata defaults from occupying keys reserved by preserved v1alpha1 service annotations and labels
  • retain the intended precedence: graph defaults < v1alpha1 service metadata < explicit pod-template metadata
  • add regression coverage spanning alpha-to-beta conversion, template defaulting, and final resource metadata generation

Linear: https://linear.app/nvidia/issue/DYN-4442/dynamo150dgdr-service-level-specservicesnameannotationslabels-silently

Validation

  • GOCACHE=/private/tmp/dynamo-dyn4442-pr-go-cache go test ./internal/dynamo ./internal/dgdoverride ./api/v1alpha1 -count=1
  • git diff --check

pre-commit was not available in the local environment.

Closes DYN-4442

Summary by CodeRabbit

  • Bug Fixes
    • Preserved service-level annotations and labels when applying deployment metadata defaults.
    • Ensured metadata precedence is maintained across service, pod, and graph configuration layers.
    • Retained non-conflicting metadata from each configuration layer.

Signed-off-by: Julien Mancuso <jmancuso@nvidia.com>
@julienmancuso
julienmancuso requested a review from a team as a code owner September 15, 2026 15:47
@copy-pr-bot

copy-pr-bot Bot commented Sep 15, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added fix deployment::k8s Relates to dynamo deployment in kubernetes labels Sep 15, 2026
@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 59561773-6431-4b30-b281-06be68b1d76c

📥 Commits

Reviewing files that changed from the base of the PR and between c52945c and 4d57f17.

📒 Files selected for processing (2)
  • deploy/operator/internal/dynamo/graph.go
  • deploy/operator/internal/dynamo/graph_test.go

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


Walkthrough

The DGD metadata propagation path now receives the full DGD. It preserves converted service metadata, filters conflicting graph metadata, and applies remaining graph values as defaults. Tests verify service and pod precedence.

Changes

DGD metadata propagation

Layer / File(s) Summary
Metadata propagation and precedence
deploy/operator/internal/dynamo/graph.go
applyDGDTemplateDefaults passes the full DGD to propagateDGDSpecMetadata. The helper preserves alpha service annotations and labels, removes conflicting graph keys, and merges remaining graph metadata.
Metadata precedence validation
deploy/operator/internal/dynamo/graph_test.go
Tests pass graph metadata through the DGD and verify precedence among graph, service, and pod annotations and labels.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 4d57f

The metadata precedence regression is covered by the added test, with no remaining actionable risk identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly describes the main change: preserving v1alpha1 service metadata precedence in the operator.
Description check ✅ Passed The description explains the fix, precedence order, regression coverage, validation commands, and linked issue. It does not use all template headings and omits the required reviewer-start section, but…
  • Fix all pre-merge checks with AI

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

Comment thread deploy/operator/internal/dynamo/graph.go Outdated
Comment thread deploy/operator/internal/dynamo/graph.go Outdated
Comment thread deploy/operator/internal/dynamo/graph.go Outdated
Signed-off-by: Julien Mancuso <jmancuso@nvidia.com>
@pull-request-size pull-request-size Bot added size/L and removed size/M labels Sep 15, 2026
@julienmancuso

Copy link
Copy Markdown
Contributor Author

/ok to test 52ae45a

Comment thread deploy/operator/internal/dynamo/graph.go
Comment thread deploy/operator/internal/dynamo/graph_test.go Outdated
Signed-off-by: Julien Mancuso <jmancuso@nvidia.com>
@pull-request-size pull-request-size Bot added size/M and removed size/L labels Sep 15, 2026
@julienmancuso

Copy link
Copy Markdown
Contributor Author

/ok to test fbc6168

@julienmancuso
julienmancuso enabled auto-merge (squash) September 15, 2026 19:45
@julienmancuso
julienmancuso merged commit dbf505b into main Sep 15, 2026
112 checks passed
@julienmancuso
julienmancuso deleted the codex/fix-dyn-4442-service-metadata branch September 15, 2026 20:19
dagil-nvidia pushed a commit that referenced this pull request Sep 15, 2026
…ecedence (#14855) (#14882)

Signed-off-by: Julien Mancuso <jmancuso@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deployment::k8s Relates to dynamo deployment in kubernetes fix size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants