Repository navigation
fix(frontend): persist default role selection - #30709
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
mo-bot review · Commit: Review completed. Read the assessment. |
|
mo-bot review · Commit: Review belongs to an older commit; it is not a review of the current head. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: fce997d52f9f30d8cd390270a5ae1e63f21d0096
Assessment: approve
Reviewed the complete seven-file delta and affected authorization, catalog, transaction and login owners. The design appropriately persists default-role selection through existing catalog and transaction mechanisms, validates all targets before writes, and preserves active-session roles and login fallback. No actionable defects remain.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1517-7f90-b3f9-c5f9f9e7031b · slot 0 · generation 1
Validation:
-
Traced self-service and cross-user authorization, direct grants, administrator protection, host/principal validation, atomic multi-target updates, rollback/cancellation cleanup, and interactions with role revocation and user/role deletion.
-
Reviewed unit-test assertions and SQL regression expectations covering persistence, fresh login, unchanged active sessions, NONE, rejected role selections and atomic failure.
-
Reused frozen exact-head success records for shared build, Ubuntu unit tests, static analysis, coverage, proxy BVT and pessimistic multi-CN BVT; inspected repository workflow and test selection.
-
Local git diff --check passed. Receipt checks/1792558367397821338-3.json matches the command, frozen HEAD, clean source fingerprint and retained diff-check.log.
-
Review evidence is retained at /home/xupeng/.local/state/mo-bot/jobs/95482d468752221bdf4c7d69/attempt-1/review-evidence.json. Source remained unchanged.
-
New catalog I/O and locks are confined to SET DEFAULT ROLE. Unrelated SQL paths add only a statement-type check; no performance improvement or benchmark result is claimed.
Limitations:
-
No local Go/native tests or live concurrency experiments were executed. Raw CI logs and author execution receipts were unavailable; author validation claims were treated as supplemental evidence.
-
The linked issue #30677 body was absent from frozen evidence; behavioral scope was assessed against the supplied PR contract and existing source behavior.
Merge Queue Status
This pull request spent 6 hours 13 minutes 42 seconds in the queue, with no time running CI. ReasonThe merge conditions cannot be satisfied due to failing checks
Failing checks: HintYou may have to fix your CI before adding the pull request to the queue again. Waiting for any of
All conditions
Requeued — the merge queue status continues in this comment ↓. |
aptend
left a comment
There was a problem hiding this comment.
Deep review completed at exact head fce997d52f9f30d8cd390270a5ae1e63f21d0096 (base/merge-base a648b13e53cf0a07ff19211203a69e37b2d1dd93).
No blocking findings. Read all seven changed files and the complete review/discussion/inline/thread history, plus issue #30677. This is a focused repair of an already parsed no-op, not a new role model; the design-document gate is not triggered.
Change/closure map:
- R3 authorization/catalog: self-service remains limited to the authenticated principal ID and a direct grant; cross-user changes retain ALTER USER/account authority, administrator protection, tenant-scoped background execution, escaped literals and explicit host validation. Unsupported ALL/multiple-role selections fail explicitly.
- R3 transaction/lifecycle: role -> deterministically ordered user locks -> ordered grant locks -> validate all targets -> ordered writes -> commit. Traced the interacting REVOKE/DROP USER/DROP ROLE owners, RC semantics, cancellation and failed-write/commit paths. Existing sessions are not switched; fresh login validates the stored grant and retains revoked/deleted-default fallback.
- UT/BVT: reviewed named positive, denial, host/identity, zero-ID, atomic-failure and commit-failure oracles. Minimum fixtures, scoped global executor restoration and SQL teardown are retained.
Q1-Q3 audit:
| Boundary | Closure |
|---|---|
| Q1 private executor/transaction | immediate executor Close; transaction finish after successful BEGIN; Close has independent cleanup-context rollback |
| Q2 creation/query/row locks | request-owned cancellable creation; existing statement/transaction lock cancellation and deadlock handling; finish precedes executor destruction |
| Q3 target/result state | bounded by this statement's target list; cleared result sets and lexical maps; no new worker, queue or retained cache |
Verified/reused raw exact-head evidence from CI run 39539932444:
- UT job 119025338762/checkpoint: unfiltered frontend selection with
-race -short -tags matrixone_test, stage exit 0. - Normal coverage job 119025384078:
-count=1 -covermode=set; producer exit 0, 83,507 pass events, no package/test failure events. - SCA job 119025338763: repository molint/vet pipeline and pinned golangci-lint 2.14.0, final 0 issues.
- Proxy BVT job 119028106116:
issue_30677_set_default_role.sql60/60 andrevoked_default_role_login.sql39/39, zero failed/ignored/abnormal. - Local isolated exact-head worktree: complete diff and
git diff --checkpassed.
No redundant local Go/native suite or live concurrency experiment was run. Author-reported same-instance repetitions and setter/REVOKE experiments are supplemental, not independently reproduced evidence. No wire/schema change, background generation or new unbounded hot-path mechanism is introduced.
b75c0ff to
c155d0e
Compare
Merge Queue Status
This pull request spent 4 hours 12 minutes 43 seconds in the queue, with no time running CI. ReasonThe merge conditions cannot be satisfied due to failing checks
HintYou may have to fix your CI before adding the pull request to the queue again. Waiting for any of
All conditions
Tick the box to put this pull request back in the merge queue (same as
|
What type of PR is this?
Which issue(s) this PR fixes:
Related to #30677
What this PR does / why we need it:
Implement the missing
SET DEFAULT ROLEexecution path and persist the selected role inmo_user.default_role.ALTER USERauthority.NONEstorespublic.ALLand multi-role lists are explicitly rejected because MatrixOne stores one default role per user.Validation
Current delivery head:
c155d0ef64bf98aa9f7baaa626793a3e1c3ea50a(treec18a0023de16876bbbd37da13db231da3222d753). The local integration is based on selected upstream snapshotd4c37f4d8722dd91b80f5f5547940004bf1b293f; its PR diff is seven frontend/SQL files (+1,138/-1). The PR base branch has since advanced to2b388dd1690f83e2e807d6809180336dae2a68eb; at readback, GitHub marked this PR mergeable but behind. The one later upstream commit's overlapping-file hunks are separate from this PR'sSET DEFAULT ROLEhandler.gofmtandgit diff --checkare clean. See the task's E50 source-validation receipt for exact command/log fingerprints.make buildpassed on this exact source. The built service recorded CNquery-ready:true, SQL listener startup, and explicitISCP-Task Startbefore the test runs.zz_accesscontrol/issue_30677_set_default_role.sqlpassed two normal comparison runs on this exact source: 60/60 each, failed/ignored/abnormal 0. Independent post-run catalog checks found no fixture users, roles or database, and the owned service shut down cleanly. Full command, binary/config/log/report hashes, and cleanup evidence are in E51.c155d0ef64bf98aa9f7baaa626793a3e1c3ea50a; applicable checks are pending. Prior b75 CI results do not establish this head's status. No CI/Required closure is claimed.Scope and limitations
ALLand multi-role default selections remain unsupported by the single-role catalog representation. The separate authorization-epoch cleanup timeout remains unresolved and is not changed by this PR. This PR is related to #30677; it does not request automatic issue closure, which remains subject to QA sign-off.