Repository navigation
fix(stage): return an error for missing catalog context - #32741
Conversation
Signed-off-by: XuPeng-SH <[email protected]>
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? |
|
This pull request is merged. |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: d456b5b5b41f67ed611f5e9adc6a7fc42787e8d3
Assessment: approve
The guard handles missing process, base and Stage cache at the existing catalog owner, preserving initialized resolution and error propagation. The URI documentation matches the SDK and frozen 4.2.8 parser.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
Validation:
-
Reviewed the complete four-file delta, affected callers, existing controls, linked issue and all discussion entries. Saved the review plan and discussion assessment; source remains unchanged.
-
Reused exact-head successful server-build CI, eight Python offline matrix jobs and two core-import jobs. Verified the documented release boundary against frozen tag v4.2.8.
-
Isolation preflight, git diff --check and native prerequisite builds passed. Receipts and retained logs are reconciled in validation-manifest.json.
Limitations:
-
Local Go tests and vet were not executed: installed Go 1.26.6 is below the required 1.27.1, and toolchain bootstrap timed out after 180 seconds. This is an environment limitation, not a test result.
-
Author-reported Go package passes lack retained local artifacts; Go UT, coverage and SCA remained pending in the supplied CI snapshot.
What type of PR is this?
Which issue(s) this PR fixes:
Related to #18534.
What this PR does / why we need it:
Main already supports host- and path-form Stage URIs, but resolving either through a Datalink with no process panics in
StageLoadCatalog. For example,ParseDatalink("stage:///a/b/c/1.txt?size=c", nil)reaches the Stage cache before validating the range.Return an internal error when the process, its base, or its Stage cache is missing. This propagates through Datalink, export, and nested Stage resolution without returning a partial result. Initialized callers retain the existing Stage resolution, access checks, and range validation. The ordinary SQL process initialization path is unchanged; this PR does not claim a normal SQL statement alone produces a nil process.
Clarify the existing Stage URI syntax and the 4.2.8 server compatibility boundary in the SDK guide. The companion 4.2 change is in #32723.
Validation
5540b068209creproduced the nil pointer panic inStageLoadCatalog.pkg/datalinkandpkg/stage/stageutiltests passed with coverage; the regressions cover three missing-context states, both URI forms, five Datalink entry points, export and nested Stage. Existing valid Stage and malformed-range controls pass.go vetand incrementalgolangci-lintpassed for the changed packages. Main SDK URI helper examples for spaces, encoded slashes, literal percent sequences and host-form names passed.