Repository navigation
ci(compose): build verified MinIO releases locally - #29370
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? |
|
Remote CI evidence at |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Reviewed cc855d6 against merge-base ac46f1a. No newly introduced merge-blocking defect found.
Validation:
- Both images built locally with --no-cache; the SHA-256 values match the official release checksum files, and --version confirms the intended MinIO/mc releases.
- Isolated Compose startup created the public mo-test bucket. An independent mc lookup succeeded, and restarting with the existing volume succeeded again.
- Reviewed-head PROXY and PESSIMISTIC CI both built the images and completed BVT with zero failures (77,941 and 42,991 successful cases respectively).
- Compose config and git diff --check passed.
One non-blocking, pre-existing unhappy-path gap: logservice still uses short-form depends_on: [createbuckets]. With an injected authentication failure, the new setup shell exited 1, but compose up -d returned 0 and started the dependent consumer. The same dependency weakness exists at the baseline. Consider changing this dependency to condition: service_completed_successfully so the new shell error propagation also gates database startup.
…TAS (#29369) ## What type of PR is this? - [x] BUG - [x] Improvement - [x] Test and CI ## Which issue(s) this PR fixes Fixes #29306 Fixes #29307 Fixes #29311 Fixes #29313 Fixes #29314 Supersedes #29349 and #29351 by combining their prepared-argument fixes with the downstream consumer, CTAS, and protocol closures. ## Root cause and changes Prepared values cross SQL and MySQL protocol boundaries as bytes/text while some consumers need the assignment or packet domain. The original fixes specialized direct calls but left downstream plans, internally reparsed CTAS inserts, cached execution, and mixed-CN dispatch with stale or incompatible domains. - Rebind `GENERATE_SERIES` consumers and result metadata at execution. Parameterized series gets a fresh runtime compilation because endpoint fractions and steps can change DATETIME scale without changing packet type. Real COM_STMT DATE/DATETIME packets keep temporal domain at series endpoints. - Refresh only inferred CTAS columns after specialization, map target-only columns correctly, reject incompatible inferred nullability/default changes, carry semantic parameter values through CTAS retry, and clear the sidecar on compile release/reset. - Bind direct prepared `UNNEST` JSON arguments to an old-operator-compatible JSON domain without a 65,535-byte TEXT cast. Keep HLL/bitmap state in a lossless internal binary domain, and preserve ENUM/SET numeric provenance. - Keep CEIL/FLOOR precision scalar through the private integer conversion. Introduce MORPC v95 placement and sender/receiver checks for this executor behavior; a new coordinator keeps affected work local while an older CN is present. The external MySQL protocol and persisted catalog/storage formats do not change. The approved rev4 design is `docs/design/20260924-prepared-argument-domains.md` (SHA-256 `7079eb07827ac8f81d87cd146d33a290b963ee4389cfba4ff495d56f4e33ce0f`). An earlier independent code review passed after its prior rebase; the current rebased head received a separate final review. ## Validation Evidence was gathered on the equivalent pre-rebase patch `99e419e925`; `git range-diff` maps all five PR commits unchanged to head `348d4e2f6d` on `main` `ac46f1a09b`. The sole new base change is in `pkg/sql/colexec/external` and does not intersect this PR. - `mo-cgo-test` with `-p 2 -count=1`: `pkg/defines`, `pkg/pb/plan`, `pkg/sql/plan`, `pkg/sql/compile`, `pkg/sql/colexec/table_function`, `pkg/frontend`, and `pkg/embed` all passed. - Focused regression checks passed for CTAS column order/defaults and retry cleanup, >65 KiB JSON and bitmap state, same binary statement across temporal scales, real DATE/DATETIME COM_STMT packets, and v94/v95 remote precision placement/send/receive gates. - Normal mo-tester comparison (`-n -g -o -p`) passed twice on one ready instance for `issue_29311_binary_state.sql` (26/26), `issue_29313_enum_set_aggregate.sql` (16/16), `issue_29314_scalar_precision.sql` (33/33), and `prepared_table_functions.sql` (37/37). Created tables were absent after teardown. - `make build-with-prebuilt-native`, incremental `go vet`, and incremental golangci-lint (0 issues) passed; `git diff --check` and gofmt clean. - Rolling mixed-CN check: a v94 CN initialized the cluster, then a v95 CN joined; SQL succeeded on both. A 4.2M-row table crossed the 512-block multi-CN threshold, and a prepared CEIL precision query on the v95 coordinator returned the expected sum. This external check did not record the identity of the worker that ran the query; the v94/v95 placement and fail-closed remote protocol branches are covered by the focused compile test. On the previous remote head `f464d449bc`, shared build and Ubuntu/x86 UT passed. ARM64 SCA found a missing `rows.Err`/Close in a test, fixed here. Both multi-CN BVT jobs failed during Quay MinIO image pulls before SQL (#29367; infrastructure fix #29370). UT Coverage timed out in `Checkout MatrixOne source` before tests, a recurrence of #28411; downstream Coverage lacked that producer and calculated no verdict. The new head's CI must be evaluated separately. Rollback: revert this PR's five commits; no data migration is required. ## Latest-main rebase and current validation Rebased onto `matrixorigin/main@44e5226` (including #29370). New head: `315ef452135f21335ff7e79281700cbd6ba127d2`. The complete binary diff against `main` is byte-for-byte identical to the diff before rebase, and `git diff --check` passes. Focused post-rebase CGo tests passed in `pkg/sql/plan`, `pkg/sql/compile`, `pkg/frontend`, and `pkg/embed`, including prepared series consumers, >65 KiB UNNEST, CTAS column mapping, precision protocol, temporal COM_STMT binding, and specialized-domain execution. The old BVT failures are not SQL test verdicts; CI on this new head is pending.
## What type of PR is this? - [x] BUG ## Which issue(s) this PR fixes: Fixes #29331. ## What this PR does / why we need it: `STR_TO_DATE` (and its `TO_DATE` alias) returned NULL for MySQL 8.0 date directives `%D`, `%j`, `%a`/`%W`, `%U`/`%u`/`%V`/`%v`, `%w`, and `%X`/`%x`. Parse these directives and resolve day-of-year and week dates after all fields have been read. Week dates take precedence over day-of-year, which takes precedence over a directly parsed month/day. Preserve MySQL's week-year pairing, week 00/53 behavior, literal short week-year, English weekday unique-prefix matching, and year-zero conversion boundary. Date-only format inference now includes these directives. ### Validation - The eight issue queries returned NULL on the base service; the new service returns the exact eight expected dates. - Focused directive tests, the full `./pkg/sql/plan/function` package, and planner return-type tests passed through `mo-cgo-test` with matching native artifacts. - `go vet -mod=readonly` passed for `./pkg/sql/plan/function` and `./pkg/sql/plan`. Incremental `golangci-lint` 2.5.0 built with Go 1.26.4 reported 0 issues. - The new SQL suite passed normal mo-tester comparison twice against a task-owned standalone service: 16/16 statements each run, zero failed/ignored/abnormal. It covers the eight issue queries, boundaries, invalid combinations, and table rows. - The existing `func_str_to_date.sql` suite passed 115/115 after refreshing two expected results for `%X%V %W` from NULL to its newly supported date `2004-10-18` (including `TO_DATE`). The service was shut down afterward. - `gofmt` and `git diff --check` passed. Independent GPT-6 medium design and final whole-diff review found no remaining blockers. ### Risk and rollback The new calendar resolution is limited to formats containing the newly supported directives. Calendar resolution applies only when ordinal or week fields were parsed. Exhausted repeated directives now preserve prior parsed fields; unsupported dynamic-format behavior remains unchanged. Boundary behavior follows MySQL 8.0.45 parsing semantics; the new unit tests cover precedence, year zero, missing ordinal, ambiguous/overlong weekday names, and malformed week pairs. Revert this commit to restore the previous NULL results. ### Follow-up fixes and latest main Independent MySQL 8.0.44 checks found three additional boundaries in the first PR revision: a leading `+` counts within the width of a numeric directive, an exhausted repeated `%j` must preserve the first parsed ordinal, and weekday words use MySQL's Latin1 byte classification. The follow-up commit fixes these at their shared parser boundaries, keeps negative inputs rejected, and adds focused UT and public SQL cases. The revised directive suite passed twice on the rebased binary, 16/16 statements each run. The existing `func_str_to_date.sql` suite passed 115/115. Full function-package UT, planner return-type UT, `go vet`, and incremental lint also passed locally. Rebased onto `main` containing #29370, which replaces the unauthorized Quay MinIO pulls with verified local image builds. On the pre-rebase head, Compose BVT stopped at that image pull, before executing this SQL. Coverage UT separately timed out after 10 minutes in `pkg/tests/issues/isolated` (`TestSpeedupAbortAllTxn`); that is not a date-parser test result. CI for the rebased head should be read from its checks. No distributed topology or GPU test was run locally; this is scalar date parsing.
## What type of PR is this? - [x] BUG ## Which issue(s) this PR fixes: Fixes #29327. ## What this PR does / why we need it: All six public `VEC*_FROM_BASE64` functions share `VecFromBase64[T]`. Malformed Base64 and decoded byte lengths that do not fit the selected element width were incorrectly reported as MatrixOne internal errors. Those two user-input rejection paths now return `ErrInvalidInput`. Valid decoding and the internal guard for unsupported generic element types are unchanged. ### Validation - On base `271c3f159957eab683cf4eb8474b7a353cfea622`, the new focused test failed for all six malformed-input variants with `internal error`. - Focused `TestVecFromBase64*` and the full `./pkg/sql/plan/function` package passed through `mo-cgo-test` with matching native artifacts, `-count=1`. - `go vet -mod=readonly ./pkg/sql/plan/function` passed. Incremental `golangci-lint` 2.5.0, built with Go 1.26.4, passed with 0 issues. - New `vector_base64_invalid_input.sql` passed normal mo-tester comparison twice against the task-owned standalone service: 11/11 statements per run, zero failed/ignored/abnormal. It checks all six malformed inputs, four applicable width mismatches, and a successful one-byte UINT8 control after errors. - `gofmt` and `git diff --check` passed. Independent GPT-6 medium design and whole-diff review found no blockers. ### Risk and rollback The public error classification and displayed prefix change from `internal error` to `invalid input`. This repository maps both to MySQL `ER_UNKNOWN_ERROR`; the MatrixOne error class is the intended contract. The CPU IVF-Flat caller produces well-formed, aligned Base64 and does not enter the changed branches. No GPU algorithm, native, protocol, or data-success path changes. Revert this commit to restore the previous classification. ### Rebase and CI interpretation Rebased onto `main` containing #29370, which fixes the unauthorized Quay MinIO image pulls used by Compose BVT. On the previous head, ordinary Ubuntu UT, SCA, and shared build passed; Compose BVT failed at image startup before executing the Base64 SQL. Coverage UT had a separate `TestAutoIDCacheRestartAndDisabledNode` context deadline failure in `pkg/tests/issues/isolated`. It must not be attributed to MinIO or to the changed Base64 error branches without a matching baseline. On the rebased head, focused `TestVecFromBase64*` and the full function package passed locally. CI for the rebased head should be read from its checks. No distributed topology or GPU execution was run locally; the changed error branches do not depend on either.
## What type of PR is this? - [x] BUG - [ ] API-change - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Fixes #29251 Fixes #29264 ## What this PR does / why we need it: Failed fulltext partition spills now close and remove the staging file without publishing it or freeing the still-resident partition. Short writes and close errors are treated as failures, so a later spill can retry safely. When a concurrent pool spill only partly succeeds, memory accounting includes the successful partitions even though the operation reports an error. `LocalFS` and `LocalETLFS` writer finalization closes and removes temporary files when close or publication fails. LocalETLFS owns its temporary file until a successful rename, independently of shadowed local errors. Read, size, close, directory, and rename failures clean it up; after successful rename, a directory-sync error does not remove the published destination. Focused failure-injection tests cover spill write/short-write/close failures, pool partial success and retry, LocalFS/ETL writer-close cleanup, and ETL read/size/rename failures. Validation: `make cgo`; targeted regression tests; `mo-cgo-test -count=1 ./pkg/fulltext` and `./pkg/fileservice`; `go vet ./pkg/fulltext ./pkg/fileservice`; `git diff --check`. GPT-6 medium design and final review completed, including a review-discovered pool accounting correction. ## Latest-main rebase and current validation Rebased onto `matrixorigin/main@44e5226` (including #29370). New head: `0b54b4079307fbdc1bdeefdeaa90ae89edd8d69d`. The complete binary diff against `main` is byte-for-byte identical to the diff before rebase, and `git diff --check` passes. Post-rebase CGo full package tests passed for `pkg/fulltext` and `pkg/fileservice`. On the old head, ordinary Ubuntu UT passed; UT Coverage failed because `TestIssue28234ExceptAllCluster` timed out after ten minutes; no attribution to this patch was established. Both multi-CN BVT jobs failed at MinIO startup before SQL; `main` now includes the MinIO compose fix #29370. The old BVT failures are not SQL test verdicts; CI on this new head is pending.
## 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 #29226. ## What this PR does / why we need it: With the same selected CNs `{A, B}`, switching the SQL coordinator previously reversed their IVF object partitions, moving reads away from reusable local cache entries. This change assigns vector-scan partitions by stable CN identity so a fixed selected CN set retains the same persisted-object owners across ingress changes. In-memory ownership follows the execution route through `ScanIdentity.IsRemote`, allowing a nonzero local partition to read coordinator-visible rows while a remote partition zero reads only its persisted objects. Writable-workspace and required-membership scans retain their existing local execution paths. The stable layout requires MORPC 96 on the coordinator and every selected worker. Upstream assigned MORPC 95 to prepared scalar precision and 94 to lossless NoFull CDC; this branch preserves both meanings. Old, unknown, or unavailable capabilities retain the legacy distributed layout. Sender and receiver guards reject incompatible remote partition-zero execution after a capability downgrade, including nested pipelines. Before sending a remote partition-zero pipeline, the sender also confirms the receiver version on the actual Pipeline stream, preventing a replacement older CN from running it after a separate capability probe. The need for this handshake is carried from the already constructed, post-folded pipeline during encoding, without decoding the serialized scope a second time. Capability probes use a timeout cause that does not report a false timeout on successful requests. ### Design review [XuPeng-SH approved the design at revision `5cd1a359d7`](#29319 (review)), covering the ownership invariant, nested transport, MORPC 96 mixed-version and rollback behavior, resource bounds, alternatives, and acceptance plan. The [design record](https://github.com/ck89119/matrixone/blob/4979ff8e20/docs/design/CLAUDE_ISSUE_29226_VECTOR_SCAN_OWNERSHIP.md) now records that decision. Design approval is separate from implementation approval. ### Validation Validated locally on macOS arm64 with Go 1.26.4 and the repository CGo test wrapper: - Focused vector-scan protocol, placement, partition, and transport tests passed with `-vet=all`, including post-folded handshake-flag propagation for remote zero and nonzero partitions and nested scans. The changed executable statements in this review fix had 19/21 (90.5%) coverage across focused and two-CN tests. - `TestIssue29226VectorScanAcrossCoordinators` passed against two embedded CNs through MySQL, including persisted and in-memory rows and transaction visibility. - `make err-check`, scoped `go vet`, and scoped golangci-lint v2.6.2 passed after merging main. The previous full `make static-check` passed before this merge. - The earlier multi-CN Compose jobs failed before BVT SQL because Quay denied the pinned MinIO images. This is tracked by #29367 and fixed upstream in #29370, both included in the prior merge. The coverage aggregator had no complete BVT profile and calculated no coverage verdict. CI for the new head is pending. - Full-size Wiki 10M cache/IO/decode/QPS acceptance remains pending; the small local comparison is not evidence of a production performance multiplier. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Both Compose BVT lanes on PR matrixorigin#29408 stop before SQL when Quay rejects pulls of the pinned MinIO server and mc images. Backport the tested main-branch fix from matrixorigin#29370: build those same binary releases from upstream GitHub assets and verify their SHA-256 hashes. Keep the existing MinIO configuration and make bucket setup fail on real mc errors while remaining safe to repeat after a restart. Validation: Compose config, both image builds, healthy MinIO, public mo-test bucket, repeated bucket setup, and diff check passed locally. (cherry picked from commit 44e5226)
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue #29406 ## What this PR does / why we need it: Backport #27377 (`2073cfdfa566cf41e591e24a108f3ce22065f927`) to `4.2-dev`. The Proxy backend handshake uses frontend IOSession reads, which arm an absolute socket read deadline using SessionTimeout (24 hours by default). Without clearing it before handing the connection to the long-lived tunnel, an actively used connection can expire approximately 24 hours after authentication. Migration control reads and cached connection reuse can re-arm the same deadline. This backport clears the phase-owned read deadline at all three handoffs: - Successful backend handshake, after joining the handshake worker and cancellation interrupt. - Migration, after the final control statement. - Cached backend reuse, after SET CONNECTION ID. A failed clear prevents handoff; cached backends that cannot be cleared are discarded. Existing handshake, migration, cancellation, connection ownership, and cache capacity protections are preserved. No timeout setting, wire protocol, persistence format, or query execution behavior changes. Compatibility adaptation is limited to using the existing 4.2 `parent` context for migration error attribution and keeping only this fix's migration tests, without unrelated newer-main tests. ### Validation Base: `6ca0a25ca5d5d3c8fe22d8587bc7e703cd034cac`. Native artifacts were built with `make cgo` inside the isolated 4.2 worktree. Go version: `go1.26.4 darwin/arm64`. - All five handoff/deadline regression tests passed, including migration and cached-reuse clear failures. - Full `pkg/proxy` suite passed with `-count=1 -timeout=300s` through the repository CGo test wrapper. - `git diff --check` passed. The tests validate deadline state and failure ownership without waiting 24 hours. ### Compose CI repair on 4.2-dev The first CI run failed before BVT SQL started: Quay rejected pulls for the pinned MinIO server and mc images in both Compose lanes ([PROXY job](https://github.com/matrixorigin/matrixone/actions/runs/36317763336/job/108627987240), [PESSIMISTIC job](https://github.com/matrixorigin/matrixone/actions/runs/36317763336/job/108627987185)). The later log-export and coverage errors were consequences of Compose never starting. This is the 4.2 backport of the merged main fix [#29370](#29370), not a proxy failure. Compose now builds the **same pinned MinIO and mc releases** from their official GitHub release binaries, verifies fixed SHA-256 hashes, and preserves the server configuration. Bucket setup reports real mc errors and tolerates an existing bucket on restart. Local validation passed: Compose configuration, both image builds, healthy MinIO, public `mo-test` bucket, repeated initialization, and `git diff --check`. The full Compose BVT lanes remain subject to the new CI run. A live 24-hour connection soak and multi-CN end-to-end validation were not run. #29407 is a separate MORPC/Pipeline investigation and is not claimed as fixed by this backport. --------- Co-authored-by: davis zhen <[email protected]> Co-authored-by: XuPeng-SH <[email protected]>
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #29367
What this PR does / why we need it:
Seven current PRs lost both multi-CN BVT lanes before any SQL ran: Compose attempted to pull the pinned MinIO and mc images from Quay and received HTTP 401. The later connection-refused and Coverage aggregation failures were consequences of the missing Compose services.
Build the same MinIO and mc release versions from their official GitHub release binaries, checking hard-coded SHA-256 values before making them executable. Pin the already-used MatrixOne Ubuntu base image by digest. Compose builds these two services on a fresh runner instead of pulling the inaccessible Quay images. The service command, credentials, data volume, healthcheck and public
mo-testbucket remain the same. The bucket setup now propagates real mc errors and tolerates an existing bucket on restart.Design and review: independent design and final diff review found no remaining blocker. The fixed linux/amd64 binaries match the x86 BVT runners; Compose explicitly selects that platform. Other services continue to use the existing images and build rules.
Validation at
c4ad946df23e9e892500be94a065cdb8c900b6b8:docker compose ... config --quiet: passed.docker compose ... build minio createbuckets: both downloaded exact official assets, verified SHA-256 and built.docker compose ... up -d createbucketsin an isolated local project: auto-built images, MinIO became healthy, setup exited 0, and the bucket was created with public access. A separate mc lookup succeeded.downwithout deleting the MinIO volume, thenup -d createbuckets: setup exited 0 again with the existing bucket.git diff --check: passed.The full multi-CN BVT lanes are pending this PR's CI. Build still needs GitHub release-asset availability and the same MatrixOne Ubuntu base image already required elsewhere in CI. Revert this commit to restore the previous image references if needed.