Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 156 additions & 1 deletion common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ variables:

# Used to determine load_libs_version for *-latest builds.
# Same as maxServerVersion supported in download_server.go
max_server_version: &max_server_version "8.3"
max_server_version: &max_server_version "9.0"

parameters:
- key: fake_tag_for_release_testing
Expand Down Expand Up @@ -1916,6 +1916,100 @@ tasks:
vars:
target: test:awsauth ${testArgs}

- name: integration-9.0
tags: ["9.0"]
commands:
- func: "fetch source"
- command: expansions.update
- func: "install mise and go"
- func: "download mongod and shell"
vars:
mongo_version: "9.0.0-alpha1"
- func: "start mongod"
vars:
USE_TLS: "true"
- func: "wait for mongod to be ready"
vars:
USE_TLS: "true"
- func: "run make target"
vars:
target: build
- func: "run make target"
vars:
target: test:integration -ssl=true ${testArgs}

- name: integration-9.0-auth
tags: ["9.0", "auth"]
commands:
- func: "fetch source"
# Concat auth args
- command: expansions.update
params:
updates:
- key: "mongod_args_tls"
concat: " --auth"
- func: "install mise and go"
- func: "download mongod and shell"
vars:
mongo_version: "9.0.0-alpha1"
- func: "start mongod"
vars:
USE_TLS: "true"
- func: "wait for mongod to be ready"
vars:
USE_TLS: "true"
- func: "create mongod users"
vars:
USE_TLS: "true"
- func: "run make target"
vars:
target: build
- func: "run make target"
vars:
target: test:integration -ssl=true -auth=true ${testArgs}

- name: integration-9.0-cluster
tags: ["9.0", "cluster"]
commands:
- func: "fetch source"
- command: expansions.update
- func: "install mise and go"
- func: "download mongod and shell"
vars:
mongo_version: "9.0.0-alpha1"
- func: "create repl_set"
vars:
USE_TLS: "true"
load_libs_version: "9.0"
- func: "run make target"
vars:
target: build
- func: "run make target"
vars:
target: test:integration -ssl=true -topology=replSet ${testArgs}

- name: aws-auth-9.0
tags: ["9.0", "aws-auth"]
commands:
- func: "fetch source"
- command: expansions.update
- func: "install mise and go"
- func: "download mongod and shell"
vars:
edition: "enterprise"
mongo_version: "9.0.0-alpha1"
- func: "start mongod"
vars:
AWS_AUTH: "true"
- func: "wait for mongod to be ready"
vars:
AWS_AUTH: "true"
- func: "add-aws-auth-variables-to-file"
- func: "setup-aws-auth-test-with-assume-role-credentials"
- func: "run make target"
vars:
target: test:awsauth ${testArgs}

- name: integration-latest
tags: ["latest"]
commands:
Expand Down Expand Up @@ -2349,6 +2443,24 @@ tasks:
test_path: "test/legacy42"
load_libs_version: "8.3"

- name: legacy-jstests-9.0 # The server jstests from the tools removal from server in 4.2
tags: ["9.0"]
commands:
- func: "fetch source"
- func: "get buildnumber"
- func: "setup credentials"
- func: "install mise and go"
- func: "download mongod and shell"
vars:
mongo_version: "9.0.0-alpha1"
- func: "run make target"
vars:
target: build
- func: "run legacy tests"
vars:
test_path: "test/legacy42"
load_libs_version: "9.0"

- name: legacy-jstests-latest # The server jstests from the tools removal from server in 4.2
tags: ["latest"]
commands:
Expand Down Expand Up @@ -2528,6 +2640,24 @@ tasks:
resmoke_suite: "core${resmoke_use_tls}"
excludes: "requires_unstable,${excludes}"

- name: qa-tests-9.0
tags: ["9.0"]
commands:
- func: "fetch source"
- func: "get buildnumber"
- func: "setup credentials"
- func: "install mise and go"
- func: "download mongod and shell"
vars:
mongo_version: "9.0.0-alpha1"
- func: "run make target"
vars:
target: build
- func: "run qa-tests"
vars:
resmoke_suite: "core${resmoke_use_tls}"
excludes: "requires_unstable,${excludes}"

- name: qa-tests-latest
tags: ["latest"]
commands:
Expand Down Expand Up @@ -2786,6 +2916,17 @@ buildvariants:
- name: "push"
run_on: rhel80-small

- name: debian13
display_name: Debian 13
run_on:
- debian13-small
tasks:
- name: "dist"
- name: "sign"
run_on: rhel87-small
- name: "push"
run_on: rhel80-small

#######################################
# macOS x86_64 Buildvariant #
#######################################
Expand Down Expand Up @@ -2863,6 +3004,7 @@ buildvariants:
- name: ".8.1"
- name: ".8.2"
- name: ".8.3"
- name: ".9.0"
- name: ".latest"
- name: ".kerberos"
- name: "dist"
Expand Down Expand Up @@ -2901,6 +3043,7 @@ buildvariants:
- name: ".8.1"
- name: ".8.2"
- name: ".8.3"
- name: ".9.0"
- name: ".latest"
- name: ".kerberos"

Expand Down Expand Up @@ -2965,6 +3108,17 @@ buildvariants:
- name: "push"
run_on: rhel80-small

- name: suse16
display_name: SUSE 16
run_on:
- suse16-small
tasks:
- name: "dist"
- name: "sign"
run_on: rhel87-small
- name: "push"
run_on: rhel80-small

#######################################
# Ubuntu x86_64 Buildvariants #
#######################################
Expand Down Expand Up @@ -3062,6 +3216,7 @@ buildvariants:
- name: ".8.1"
- name: ".8.2"
- name: ".8.3"
- name: ".9.0"
- name: ".latest"
- name: ".kerberos"
- name: "dist"
Expand Down
14 changes: 11 additions & 3 deletions common/archive/demultiplexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,15 @@ type Demultiplexer struct {
IsAtlasProxy bool
}

// CreateDemux builds a Demultiplexer for an archive. sourceVersion must be the
// server version that *produced* the archive (from the archive prelude), not the
// destination server version. The physical namespace that timeseries data is
// stored under in the archive is determined by the source server: pre-8.3 sources
// store it under "system.buckets.<coll>", while viewless-timeseries sources (8.3+)
// store it under "<coll>". This must match how PreludeExplorer derives the
// receiver namespace, otherwise the demux listens on the wrong namespace.
func CreateDemux(
version db.Version,
sourceVersion db.Version,
namespaceMetadatas []*CollectionMetadata,
in io.Reader,
isAtlasProxy bool,
Expand All @@ -75,8 +82,9 @@ func CreateDemux(
}

var ns string
if cm.Type == "timeseries" && !version.SupportsRawData() {
// 8.3+ supports viewless timeseries.
if cm.Type == "timeseries" && !sourceVersion.SupportsRawData() {
// Sources older than 8.3 store timeseries data under system.buckets;
// 8.3+ sources use viewless timeseries stored under the collection name.
ns = cm.Database + "." + common.TimeseriesBucketPrefix + cm.Collection
} else {
ns = cm.Database + "." + cm.Collection
Expand Down
16 changes: 10 additions & 6 deletions mongoexport/mongoexport.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,12 +402,10 @@ func (exp *MongoExport) verifyCollectionExists() (bool, error) {
// Internal function that handles exporting to the given writer. Used primarily
// for testing, because it bypasses writing to the file system.
func (exp *MongoExport) exportInternal(out io.Writer) (int64, error) {
// Check if the collection exists before starting export
exists, err := exp.verifyCollectionExists()
if err != nil || !exists {
return 0, err
}

// Servers that support the rawData API (8.3+) use viewless timeseries collections, where the
// legacy system.buckets namespace no longer exists. This is checked before verifying that the
// collection exists, since verifyCollectionExists would otherwise report it as missing and
// return early without surfacing the more useful error below.
if exp.version.SupportsRawData() &&
strings.HasPrefix(exp.ToolOptions.Collection, common.TimeseriesBucketPrefix) {
return 0, fmt.Errorf(
Expand All @@ -416,6 +414,12 @@ func (exp *MongoExport) exportInternal(out io.Writer) (int64, error) {
)
}

// Check if the collection exists before starting export
exists, err := exp.verifyCollectionExists()
if err != nil || !exists {
return 0, err
}

max, err := exp.getCount()
if err != nil {
return 0, err
Expand Down
11 changes: 10 additions & 1 deletion mongorestore/mongorestore.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,17 @@ func (restore *MongoRestore) Restore() Result {
// Create the demux before intent creation, because muted archive intents need
// to register themselves with the demux directly
if restore.InputOptions.Archive != "" {
// The demux must listen on the namespace that the archive data was written
// under, which is determined by the server version that produced the archive
// (the same version PreludeExplorer uses to derive the receiver namespace),
// not the destination server version. Archives too old to record a parseable
// version predate viewless timeseries, so they always used system.buckets.
sourceVersion, verErr := db.StrToVersion(restore.archive.Prelude.Header.ServerVersion)
if verErr != nil {
sourceVersion = db.Version{}
}
restore.archive.Demux = archive.CreateDemux(
restore.serverVersion,
sourceVersion,
restore.archive.Prelude.NamespaceMetadatas,
restore.archive.In,
restore.isAtlasProxy,
Expand Down
Loading