Repository navigation
test(fileservice): isolate external object storage integration - #26612
Closed
gouhongshen wants to merge 2 commits into
Closed
gouhongshen wants to merge 2 commits into
gouhongshen wants to merge 2 commits into
Conversation
1 task done
2 of 7 tasks
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #26541
What this PR does / why we need it:
Root cause
objectStorageArgumentsForTestmixed two test tiers. It always added a local disk backend, but it also discovereds3.json,s3_fs_test_new.xml, and every ambientTEST_S3FS_*variable. Coverage CI exported real Aliyun and QCloud credentials while runninggo 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
MO_RUN_EXTERNAL_OBJECT_STORAGE_TESTS=1before reading external configuration or contacting a providerpkg/fileservice,go.mod, orgo.sumThe 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 bypull_request_targetand 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 ambientTEST_S3FS_*variables alone is intentionally no longer supported.There is no production-code, API, wire-format, storage-format, or runtime behavior change.
Validation
go test -short ./pkg/fileservice -count=1with Aliyun and QCloud test variables deliberately pointed at127.0.0.1:1: passed in 28.275s without external connection attemptsgo test ./pkg/fileservice -count=1with external integration disabled: passed in 27.919sgo vet ./pkg/fileserviceactionlintv1.7.7 on the MatrixOne caller and both paired CI workflows; known custom-runner and existingjob.workflow_*false positives excludedgit diff --check