Repository navigation
feat(reconciler): migrate MLRun labels to snake_case format - #819
Merged
Merged
Conversation
Update MLRun labels stamped by the JobSet reconciler from kebab-case (`created-by`, `experiment-id`, `workunit-id`) to snake_case (`created_by`, `experiment_id`, `workunit_id`) to align with Cloud MLRun and Diagon label naming standards. Maintain backward compatibility in mlRunOwnedByXManager by falling back to the legacy `created-by` label. TAG=agy CONV=9414b3de-bff6-4fa7-bf48-5be7c8a5ea6f
CatherineF-dev
marked this pull request as ready for review
September 8, 2026 11:02
CatherineF-dev
enabled auto-merge
September 8, 2026 11:02
1 task done
There was a problem hiding this comment.
Code Review
This pull request migrates MLRun labels from kebab-case to snake_case (e.g., changing 'created-by' to 'created_by') while maintaining backward compatibility for the legacy 'created-by' label. The feedback suggests adding an additional test case to fully verify the precedence logic when 'created_by' is set to a foreign owner but the legacy 'created-by' is set to 'xmanager'.
…edByXManager Drop backward compatibility fallback for the legacy created-by label since ManagedXprof MLRun integration is unlaunched and all runs will use the new snake_case created_by label. TAG=agy CONV=9414b3de-bff6-4fa7-bf48-5be7c8a5ea6f
andrzejfudro
approved these changes
Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrate MLRun labels stamped by the JobSet reconciler from kebab-case (
created-by,experiment-id,workunit-id) to snake_case (created_by,experiment_id,workunit_id) to align with Cloud MLRun and Diagon backend label conventions.Motivation & Context
In Cloud MLRun / Diagon, label keys follow snake_case naming conventions (such as
list_existing_sessions_only). Stamping kebab-case keys on MLRun resources leads to inconsistencies with downstream Diagon backend services. This change aligns all reconciler-generated MLRun label keys with snake_case standards.Key Changes
buildMLRunLabelsincmd/reconciler/jobset/reconciler.goto stampcreated_by,experiment_id, andworkunit_id.mlRunOwnedByXManagerincmd/reconciler/jobset/reconciler.goto checkcreated_by.cmd/reconciler/jobset/reconciler_test.go(TestBuildMLRunLabels,TestEnsureMLRunCreated,TestMLRunOwnedByXManager,TestUpsertExistingMLRun) to verify snake_case keys.Assumptions
None — requirements were fully specified.
Verification & Testing
bazel test //cmd/reconciler/jobset/...(Passed)./tools/analyze_diff_size.py --base-ref origin/main...(Passed)gofmt -w cmd/reconciler/jobset///cmd/reconciler/jobset:jobset_testpassed cleanly.Related Issues / Bugs
N/A
TAG=agy
CONV=9414b3de-bff6-4fa7-bf48-5be7c8a5ea6f