Repository navigation
Upgrade go-m1cpu to v0.2.4 to fix startup on Apple M5 Pro - #33635
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? |
|
Queue requested — the merge queue status continues in this comment ↓. |
|
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: 6e25d8ad25b04d2205e47dfcc7c94df7de808e7e
Assessment: approve
The dependency upgrade addresses the reported M5 startup failure through the existing CPU-detection dependency, and both Go modules select v0.2.4. No actionable defects were found.
Model: gpt-6.1-terra / max
Session: 01a23642-a5da-74a3-9479-4bd000540084 · slot 0 · generation 54
Validation:
-
Reviewed the complete diff, linked issues, discussion, Darwin consumer, and released v0.1.7 and v0.2.4 dependency implementations.
-
Both modules passed read-only module selection checks for go-m1cpu v0.2.4 and gopsutil v3.23.12; command receipts and logs are retained in the diagnostic directory.
-
After a successful private-runtime preflight, the upstream generation, voltage-state, and frequency-conversion tests passed on Linux with test-exec.
-
Supplied exact-head CI reports success for the Iceberg adapter tidy check and Linux build and unit tests.
Limitations:
- The Linux tests do not execute the Darwin IOKit path. The PR author reports successful M5 Pro tests and frequency readings with the committed modules, but detailed hardware-run logs were not supplied for independent verification.
✅ Merged into
|
…3692) ## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Fixes #33696. Related to #33377 (4.2-dev active-role enforcement) and #29148 (prepared-statement authorization). ## What this PR does / why we need it: Proxy opens a fresh authenticated connection on the destination CN. On main at `faafdf4fef03` and on #33568 at `89068bb76c96`, a session that had run `SET ROLE` could move under the login default role. The 4.2-dev fix in #33389 already kept the source connection when its active role differed from the target login. The source adds the active role ID and name to the existing account and user identity. The destination compares this identity at preflight and again before importing session state. A mismatch keeps the client on its source CN. Checking both role fields preserves `CURRENT_ROLE_ID()` and `CURRENT_ROLE()` across a rename and prevents a different role from matching a reused name. Export action 0 and `PrincipalVerified` field 2 retain their existing wire numbers. Main gives each session one active role. `SET SECONDARY ROLE ALL/NONE` leaves that role unchanged. The main protocol carries the role ID in field 3 and its name in field 5. Tag 4 is reserved. The 4.2-dev role snapshot uses tag 4 for its enabled secondary-role mode. [Main role semantics](#26734) · [4.2-dev role selection](https://github.com/matrixorigin/matrixone/blob/355a64c9bf9bd657d366f366e0aec05d85511012/pkg/frontend/authenticate.go#L3653-L3681) ### Validation on `5dbde1d75806` Local PR SCA selected `./...` because of `proto/query.proto`. Both `molint` and `golangci-lint` passed with the repository configuration. All 11 targeted race tests across four packages passed, including authenticated session migration between two CNs. A separate arm64 check with `GOEXPERIMENT=simd` reproduced the same `checkunsafe` warning in `distance_func_narrow_arm64.go:40` on clean main at `4a3e5182a6e3` and on this commit. ### Validation on `82ef44b94f8c` The full PR patch is identical before and after the rebase onto main at `c13851c20654` (#33635). The tests below ran with the updated dependency. One authenticated client connected through Proxy to two CNs. Each of three race-detector runs checked four transfers. A different login default, a renamed role with the same ID, and a reused role name with a different ID kept the source connection. Matching role ID and name moved the same connection to the other CN. Every attempt checked the backend address, role ID, role name, one allowed table read and one denied table read. [Two-CN assertions](https://github.com/matrixorigin/matrixone/blob/82ef44b94f8cd54dfd7a495529f1549c87104f7f/pkg/proxy/migration_principal_integration_test.go#L121-L154) <details> <summary>Two-CN test command and terminal output</summary> The checkout was clean, with the repository's CPU native libraries on Darwin/arm64. The sandbox isolates an unrelated local HAKeeper listener. ```sh git rev-parse HEAD go version export GOWORK=off GOEXPERIMENT=simd GOMAXPROCS=4 GOMEMLIMIT=5GiB export TMPDIR="$(mktemp -d)" printf '%s\n' '(version 1)' '(allow default)' '(deny network-outbound (remote ip "localhost:32001"))' > "$TMPDIR/hakeeper.sb" .agents/skills/mo-dev/scripts/mo-cgo-test -mod=readonly -p=2 -race -timeout=12m \ -exec "/usr/bin/sandbox-exec -f $TMPDIR/hakeeper.sb" \ -count=3 -v -run '^TestRenameUserProxyMigrationPrincipal$' ./pkg/proxy ``` ```text 82ef44b go version go1.27.1 darwin/arm64 === RUN TestRenameUserProxyMigrationPrincipal migration_principal_integration_test.go:142: different login default: backend 127.0.0.1:10120 -> 127.0.0.1:10120, role 3/migration_rb, allowed read on b and denied read on a migration_principal_integration_test.go:145: matching active role: backend 127.0.0.1:10120 -> 127.0.0.1:10160, role 3/migration_rb, allowed read on b and denied read on a migration_principal_integration_test.go:148: same role ID, renamed role: backend 127.0.0.1:10160 -> 127.0.0.1:10160, role 3/migration_rb, allowed read on b and denied read on a migration_principal_integration_test.go:151: same role name, different ID: backend 127.0.0.1:10160 -> 127.0.0.1:10160, role 3/migration_rb, allowed read on b and denied read on a --- PASS: TestRenameUserProxyMigrationPrincipal (16.21s) === RUN TestRenameUserProxyMigrationPrincipal migration_principal_integration_test.go:142: different login default: backend 127.0.0.1:10120 -> 127.0.0.1:10120, role 10002/migration_rb, allowed read on b and denied read on a migration_principal_integration_test.go:145: matching active role: backend 127.0.0.1:10120 -> 127.0.0.1:10160, role 10002/migration_rb, allowed read on b and denied read on a migration_principal_integration_test.go:148: same role ID, renamed role: backend 127.0.0.1:10160 -> 127.0.0.1:10160, role 10002/migration_rb, allowed read on b and denied read on a migration_principal_integration_test.go:151: same role name, different ID: backend 127.0.0.1:10160 -> 127.0.0.1:10160, role 10002/migration_rb, allowed read on b and denied read on a --- PASS: TestRenameUserProxyMigrationPrincipal (21.01s) === RUN TestRenameUserProxyMigrationPrincipal migration_principal_integration_test.go:142: different login default: backend 127.0.0.1:10120 -> 127.0.0.1:10120, role 10002/migration_rb, allowed read on b and denied read on a migration_principal_integration_test.go:145: matching active role: backend 127.0.0.1:10120 -> 127.0.0.1:10160, role 10002/migration_rb, allowed read on b and denied read on a migration_principal_integration_test.go:148: same role ID, renamed role: backend 127.0.0.1:10160 -> 127.0.0.1:10160, role 10002/migration_rb, allowed read on b and denied read on a migration_principal_integration_test.go:151: same role name, different ID: backend 127.0.0.1:10160 -> 127.0.0.1:10160, role 10002/migration_rb, allowed read on b and denied read on a --- PASS: TestRenameUserProxyMigrationPrincipal (18.84s) PASS ok github.com/matrixorigin/matrixone/pkg/proxy 59.630s exit 0 ``` </details> - 336 top-level Proxy tests, 59 frontend migration tests and 5 wire and prepared-statement regressions passed under the race detector. The prepared-statement cases include revoking SELECT between preflight and replay. - The combined tree with #33568 at `89068bb76c96` (`2c94a66d3aaf`) passed six migration and routing tests three times each under the race detector. - Go vet, molint and incremental golangci-lint passed. The generator reproduced the main binding byte for byte. The protobuf descriptor differs from main only in the two added fields and the reserved tag.
## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [x] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Related to #32278 and #33700. ## What this PR does / why we need it: Use the same conditional upgrade reference in the Codex and Claude development and review skills. Ordinary reviews skip release lookup, cluster setup and upgrade reporting when the changed path has no affected contract. Design review identifies the needed proof and implementation review can reuse qualifying evidence. - For a shared function ID or overload, compare the changed allocation and binding against pinned releases and peer branches. Before landing, refresh only comparisons whose registry inputs changed. A scoped registry and binding check is sufficient for a fresh allocation that preserves existing calls. - Preserve the published catalog `(Version, VersionOffset)`, migration order and effects. A required migration must reopen the predecessor's data, reach readiness and preserve the affected system or existing tenant operation. #33548 distinguishes a development-snapshot mismatch from a released upgrade path. - At a release cut, compare the predecessor's operations and maintenance fixes toward the candidate, including features absent from the target diff. A single PR checks its affected capability. A stateless operation can use a released result or compatible client. For persisted expressions, exercise old data and later writes. Examples include #32924, #33558 and #33560. - For a new durable format or a change to its selection, verify what the existing setting and the explicit opt-in each write. #25272 introduces a distinct disk layout. #32774 shows how existing byte and metadata checks can close a buffer-only change. - For restore, use the binding evidence actually available to the loader. Check the restored definition on success and verify that an unresolved binding leaves the definition and rows unchanged. #33036 documents a SQL-only archive where the same DDL can have two meanings. All four skill entry points passed validation. Checked the routing against CI scheduling (#33653), a test-only recovery fixture (#33684), a CPU metrics dependency (#33635), same-binary batch transport (#33269), and the actual #30833 ID collision. Reused the v4.2.9 catalog and default-expression results from #33700 and inspected two release-produced v1 manifests. The catalog reached READY before the old default failed on clean main, and the unchanged restore control reproduced its separate schema fingerprint rejection on both builds. --------- Signed-off-by: XuPeng-SH <[email protected]>
What type of PR is this?
Which issue(s) this PR fixes:
Related to shoenig/go-m1cpu#25 and shoenig/go-m1cpu#30.
What this PR does / why we need it:
On an Apple M5 Pro, MatrixOne test binaries could crash during startup when go-m1cpu v0.1.7 read a missing CPU frequency property. Upgrade the root module and the standalone Iceberg adapter to v0.2.4 and remove their v0.1.7 overrides. The released dependency handles missing values and reads the correct secondary-core frequency property on M5 Pro and M5 Max.
Verified on an M5 Pro with the committed module files. The go-m1cpu frequency tests, gopsutil CPU-info test and MatrixOne CPU metrics tests passed. The probe reported 4.608 GHz and 4.380 GHz. Both modules passed
go mod tidy -diff.