Repository navigation
CI - Build MinIO test image from official source - #10765
Conversation
quay.io/minio/minio no longer answers anonymous pulls ("unauthorized"), so
the S3 and external table workflows fail before any test runs, as they did
when minio/minio left Docker Hub. pgsty/minio is the maintained community
fork with the same entrypoint and user, pinned by release tag.
(do Backup-DbaDatabase)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
i like the more durable option as we wont have to rely on an unofficial repo |
Compile the final official MinIO release into an ephemeral local image, include license notices, and verify the pinned mc checksum so both integration workflows avoid third-party server registries. (do integration-tests-s3, integration-tests-external-table)
…ration-tests-external-table)
…gration-tests-external-table)
|
Update: I converted this PR from the proposed Why MinIO exists hereMinIO is not a dbatools runtime dependency. It was introduced in #10126 to give the SQL Server 2022 backup/restore tests a real S3-compatible boundary; #10137 expanded that coverage to HTTPS and additional restore behavior. The external-table workflow now uses the same kind of boundary. Keeping the fixture in a container matters to the current test contract. SQL Server and MinIO share the Why this broke twiceThe recent failures were distribution failures, not dbatools command regressions:
That is two server-image supply failures in 16 days. Both happened because a registry-hosted image was part of the critical path. Replacing Quay with another registry image would move the dependency without removing the failure mode. The originally proposed
This does not mean the maintained Silo fork is unsuitable. It means adopting it should be a deliberate compatibility and maintainer-trust decision, not another emergency two-line image substitution. What the PR does nowBoth workflows build the final official MinIO release, The shared build path now:
The official pinned The MinIO container name, hostname, Docker network, ports, credentials, TLS mount, and License postureMinIO and The built image remains local to the GitHub runner and is not published as a container or workflow artifact. The conservative compliance steps are to retain the upstream license/notice materials, identify the exact source and revision, make no MinIO source modifications, and avoid redistribution. If dbatools later publishes the binary or image, that is a different distribution posture. We would then need to provide the complete corresponding source for the conveyed binary and meet the AGPL object-code distribution requirements. This is an engineering compliance assessment rather than legal advice; the detailed references are in the PR body. What CI foundThe first source-build run failed at the post-build version assertion. Compilation had succeeded, but upstream's build metadata generator defaults locally compiled binaries to a The build now supplies that upstream release input, and the contract check requires it. The corrected image reports the exact pinned release. VerificationThe real boundary tests pass for both GitHub event paths:
The MinIO supply-chain contract, actionlint across all workflows, full-SHA action pinning, Bash syntax, and whitespace checks also pass. An independent review found no remaining Critical or Important issues. The branch is ready for maintainer review. I have not merged it. |
go mod verify ran against an empty module cache and verified nothing, so download the modules first. Assert the source tree is unchanged after the build and that the binary reports the pinned commit, not only the release. Run the image with --pull=never so a missing local build fails instead of falling back to a registry. Label the image AGPL-3.0-or-later, which is what the MinIO source headers grant. The contract check now accepts any full-SHA setup-go pin so Dependabot bumps pass, and rejects publishing or exporting the image or binary from either workflow as well as from the build helper. (do integration-tests-s3, integration-tests-external-table) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review: licensing statement and codeI checked the license posture above against the upstream repositories and reviewed the code. The licensing statement holds. The review turned up two small licensing corrections, one inaccurate sentence in the description, and several code issues. All of them are fixed in d6b6a27 and the description is updated to match. Both integration lanes pass on that commit. This is an engineering check, not legal advice. Licensing claims
Corrections made:
Code changes in d6b6a27
Verification
Not changed
|
The S3 workflow discarded the Pester result, so the job stayed green when tests failed. It now checks the result the same way the external-table workflow does. Both workflows published the MinIO ports on every host interface. They are now bound to 127.0.0.1; SQL Server still reaches minio:9000 over localnet. The contract check requires the loopback binding and rejects any other published port or host networking for the MinIO container. (do integration-tests-s3, integration-tests-external-table) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Follow-up in bf23744, from a second review pass of d6b6a27. Two issues, both older than this PR but both relevant to what it claims. The S3 job could not fail on a failed test. The last step was MinIO was published on every host interface. Both workflows used
Checked locally:
Not changed: |
The loop piped docker logs into grep -q. grep -q exits on the first match, and with pipefail the resulting broken pipe in docker logs made the test false even though SQL Server was ready, so the step timed out after two minutes at random. grep now reads the whole log. (do integration-tests-external-table) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
9aa49ec fixes a flaky wait loop that failed the external-table push run on bf23744 (attempt 1; the rerun passed). The step that starts SQL Server 2025 tested readiness with In the failed run SQL Server logged the ready line at 13:58:09, five seconds after the container started, and the loop still ran its full two minutes and exited 1. The loop now uses |
|
approved by codex 👍🏼 |
Summary
Build the MinIO CI server image locally from the final official MinIO source release instead of pulling another prebuilt server image from a registry.
Both integration workflows now:
go mod download,go mod verify, and the upstreammake buildtarget;LICENSE,NOTICE, andCREDITS;mcbinary's SHA-256 before executing it.The Docker network,
miniohostname, container ports, credentials, TLS certificate mount, andserver /datacommand are unchanged. The MinIO ports are now published on the runner's loopback interface only, and the S3 job now fails when its Pester run fails instead of discarding the result.Why MinIO is here
MinIO is a test fixture, not a dbatools runtime dependency. #10126 introduced it so SQL Server 2022 backup and restore commands could be tested against a real S3-compatible endpoint. #10137 added HTTPS and broader restore coverage. The external-table workflow also uses the same real S3 boundary.
Keeping the fixture containerized preserves an important part of that test contract: SQL Server and MinIO share
localnet, SQL Server reacheshttps://minio:9000, and the mounted certificate is valid forDNS:minio. Installing MinIO directly on the runner would require changing routing, endpoint names, and certificate handling in addition to changing the supply mechanism.Why this failed twice
These were distribution failures upstream of dbatools, not regressions in the PowerShell commands:
minio/minio:RELEASE.2025-09-07T16-13-09Zfrom Docker Hub and downloadedmcfromdl.min.io.dl.min.ioclient URL returned 410. #10688 moved the server toquay.io/minio/minioand the client to its official pinned GitHub release asset.Changing to another anonymously pulled image would preserve the same failure mode. It would also add a new publisher decision: the proposed
pgsty/minio:RELEASE.2026-08-04T00-00-00Zwas the last release under that image name. PGSTY renamed the project and every delivery surface topgsty/silotwo days later; its 2026-08-06 release notes also say complete license-compliance materials were added to every artifact in that later release.MinIO's own community distribution has meanwhile moved to source-only. The official repository says precompiled community releases are no longer provided and recommends building from source. The selected final official release is pinned to full commit
9e49d5e7a648f00e26f2246f4dc28e6b07f8c84a, requires Go 1.24.8, and carries the last security fix released to the community edition. The repository has since been archived, and seven advisories published in March and April 2026 list this release as affected and are fixed only in AIStor. That is acceptable for an ephemeral fixture that only the runner can reach; it is not a release to run anywhere else.This removes the server-image registry from the critical path. It does not pretend CI is network-free: the workflow still needs GitHub and the pinned Go module sources to compile the fixture. The source clone comes from the archived
minio/miniorepository, so it would fail if that repository were withdrawn. dbatools does not mirror or republish the source.Supply-chain controls
mcchecksum are repository-pinned.GOTOOLCHAIN=localprevents an implicit toolchain substitution.go mod downloadfetches the modules and checks each one againstgo.sum;go mod verifythen confirms the cached copies are unaltered.FROM scratchand carries OCI source, version, revision, and license labels.LICENSE,NOTICE, andCREDITSfiles.docker run --pull=nevermakes a missing local image fail instead of falling back to a registry.127.0.0.1only; SQL Server reaches it asminio:9000overlocalnet. The contract check rejects any other published port or host networking for the MinIO container.License review
MinIO and
mcare AGPL-3.0. The engineering conclusion is that compiling and running the unmodified tagged MinIO source as a separate, ephemeral CI server does not make dbatools an AGPL work: the programs remain separate processes and communicate through the public S3 protocol. AGPL section 2 permits making and running a covered work that is not conveyed, without conditions. The image is not published or retained as a downloadable artifact, and the officialmcasset is consumed rather than redistributed.The conservative compliance measures here are to retain the upstream license and notice material, identify the exact source and its
AGPL-3.0-or-laterlicense in OCI metadata, make no MinIO source changes, and keep the resulting image runner-local. If dbatools later publishes the binary or image, that would be a different distribution posture and would require providing the complete corresponding source and satisfying the AGPL object-code distribution requirements. This is an engineering compliance assessment, not legal advice; see MinIO's compliance notice and AGPL sections 2, 5, 6, and 13.Verification
Local checks completed:
The first GitHub Actions run proved the post-build assertion was useful: upstream defaults a locally compiled binary's embedded prefix to
DEVELOPMENT. The build now sets upstream'sMINIO_RELEASE=RELEASEinput, the assertion sees the exact pinned release, and the corrected runs pass.GitHub Actions completed both real integration lanes successfully for both the push and pull-request events:
mcbucket setupReferences
RELEASE.2025-10-15T17-29-55ZRELEASE.2026-08-06T00-00-00Z