Repository navigation
dxf: derive current keyspace when acquiring task runtime - #69434
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthrough
ChangesAcquireTaskRuntime Refactor
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #69434 +/- ##
================================================
- Coverage 76.3177% 74.4967% -1.8210%
================================================
Files 2041 2042 +1
Lines 561171 574351 +13180
================================================
- Hits 428273 427873 -400
- Misses 131997 146094 +14097
+ Partials 901 384 -517
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
/retest |
|
🔍 Starting code review for this PR... |
ingress-bot
left a comment
There was a problem hiding this comment.
This review was generated by AI and should be verified by a human reviewer.
Manual follow-up is recommended before merge.
Summary
- Total findings: 4
- Inline comments: 4
- Summary-only findings (no inline anchor): 0
Findings (highest risk first)
🟡 [Minor] (2)
- AcquireTaskRuntime doc omits the implicit store-keyspace precondition on sessionProvider (pkg/dxf/framework/dxfutil/util.go:31, pkg/dxf/framework/dxfutil/util.go:40)
- GenHolderID extraction is incomplete: test holderID() helpers and inline literals still duplicate the format policy (pkg/dxf/framework/dxfutil/util.go:88, pkg/dxf/framework/taskexecutor/manager_test.go:252, pkg/dxf/framework/taskexecutor/manager_test.go:682, pkg/dxf/framework/taskexecutor/manager_test.go:736, pkg/dxf/framework/scheduler/scheduler_manager_nokit_test.go:293)
🧹 [Nit] (2)
- GenHolderID doc comment uses infinitive verb and omits the component parameter from the description (pkg/dxf/framework/dxfutil/util.go:87)
- se.Store assignment in expectRuntimeFromNewSession lacks a comment explaining its role in keyspace routing (pkg/dxf/framework/scheduler/scheduler_manager_nokit_test.go:76, pkg/dxf/framework/taskexecutor/manager_test.go:72)
| server.EXPECT().GetRuntime().Return(runtime).AnyTimes() | ||
| taskMgr.EXPECT().WithNewSession(gomock.Any()).DoAndReturn(func(fn func(sessionctx.Context) error) error { | ||
| se := utilmock.NewContext() | ||
| se.Store = runtime.Store() |
There was a problem hiding this comment.
🧹 [Nit] se.Store assignment in expectRuntimeFromNewSession lacks a comment explaining its role in keyspace routing
The added se.Store = runtime.Store() line controls which branch of AcquireTaskRuntime executes: it makes the mock session's store carry the same keyspace as the runtime, so the same-keyspace path is taken and GetRuntime() is called. Without this context, the assignment reads as boilerplate rather than a contract-critical setup.
|
/retest |
1 similar comment
|
/retest |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: joechenrh, wjhuang2016 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
What problem does this PR solve?
Issue Number: ref #69182
Problem Summary:
DXF scheduler and taskexecutor runtime acquisition used the manager store keyspace as the current keyspace. When a task session is created for the runtime lookup, the actual current keyspace should come from that session's store so cross-keyspace runtime acquisition is based on the session that is doing the lookup.
What changed and how does it work?
dxfutil.AcquireTaskRuntimefromse.GetStore().GetKeyspace().dxfutil.GenHolderIDhelper for scheduler and executor runtime holder IDs.Check List
Tests
Unit test commands:
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.
Summary by CodeRabbit
New Features
Bug Fixes