Skip to content

test(fileservice): isolate external object storage integration - #26612

Closed
gouhongshen wants to merge 2 commits into
matrixorigin:mainfrom
gouhongshen:agent/issue-26541-object-storage-tests
Closed

gouhongshen wants to merge 2 commits into
matrixorigin:mainfrom
gouhongshen:agent/issue-26541-object-storage-tests

Conversation

@gouhongshen

@gouhongshen gouhongshen commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

Fixes #26541

What this PR does / why we need it:

Root cause

objectStorageArgumentsForTest mixed two test tiers. It always added a local disk backend, but it also discovered s3.json, s3_fs_test_new.xml, and every ambient TEST_S3FS_* variable. Coverage CI exported real Aliyun and QCloud credentials while running go test -short, so ordinary UT coverage executed cross-cloud integration tests.

The reported failure was a TCP connect timeout from a Tencent Guangzhou TKE runner to Aliyun OSS. DNS resolved and no HTTP response was received. The same commit passed on rerun with a different ephemeral runner. Credentials, request semantics, SDK implementation, memory, and disk are therefore not the direct cause; the defect is allowing an external network dependency into the required short-test path.

Changes

  • split local and external object-storage argument sources
  • keep the existing object-storage and S3FS contract assertions shared between both tiers
  • require both non-short mode and MO_RUN_EXTERNAL_OBJECT_STORAGE_TESTS=1 before reading external configuration or contacting a provider
  • fail closed when explicitly enabled integration configuration is missing or malformed
  • move XML integration configuration loading out of package initialization
  • run real Aliyun/QCloud integration tests before merge when a PR changes pkg/fileservice, go.mod, or go.sum
  • retain a daily/manual integration run to detect provider, credential, or network drift independently of code changes

The PR trigger checks out the exact head commit only for repository members/collaborators or PRs explicitly labeled safe-to-test, preserving the security boundary required by pull_request_target and cloud secrets. Unrelated PRs do not allocate an object-storage integration runner.

Compatibility and rollout

Merge matrixorigin/CI#416 first, then this PR. Developers who intentionally run real object-storage tests must now use non-short mode and set MO_RUN_EXTERNAL_OBJECT_STORAGE_TESTS=1; relying on ambient TEST_S3FS_* variables alone is intentionally no longer supported.

There is no production-code, API, wire-format, storage-format, or runtime behavior change.

Validation

  • full go test -short ./pkg/fileservice -count=1 with Aliyun and QCloud test variables deliberately pointed at 127.0.0.1:1: passed in 28.275s without external connection attempts
  • full go test ./pkg/fileservice -count=1 with external integration disabled: passed in 27.919s
  • focused local/external tier tests in short and normal modes: passed; external tests reported explicit skips unless both opt-in conditions were met
  • go vet ./pkg/fileservice
  • actionlint v1.7.7 on the MatrixOne caller and both paired CI workflows; known custom-runner and existing job.workflow_* false positives excluded
  • git diff --check

This branch had an error being deployed

1 failed deployment
ci — b585673b Deployed Aug 3, 2026 by gouhongshen via Matrixone Utils CI / Coverage #44180
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working kind/test-ci size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: UT coverage Aliyun object-storage tests fail on endpoint timeouts

2 participants