-
Notifications
You must be signed in to change notification settings - Fork 533
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
#2804) * RUBY-3268 search index management helpers (#2777) * RUBY-3268 Index View API for Search Indexes * documentation, and align method names with the spec * return the correct value here * suppress NamespaceNotFound errors for the drop operation * prose tests for search indexes * rubocop * prose tests pass * first stab at evergreen config for index management specs * rubocop * gah, executable permissions * don't use FLE for full atlas tests * make sure MONGODB_URI is set * set the timeout higher for the search index specs * pass all aggregation options through to the list indexes command * use the correct implementation for #empty? * remove unnecessary validation * bump drivers-evergreen-tools * RUBY-3324 bump drivers-evergreen-tools to get updated atlas setup/teardown (#2780) also, expose task_id expansion as environment variable to those scripts * RUBY-3328 add `execution` expansion to environment for atlas cluster name uniqueness (#2783)
- Loading branch information
Showing
32 changed files
with
1,170 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
. `dirname "$0"`/../spec/shared/shlib/distro.sh | ||
. `dirname "$0"`/../spec/shared/shlib/set_env.sh | ||
. `dirname "$0"`/functions.sh | ||
|
||
set_env_vars | ||
set_env_python | ||
set_env_ruby | ||
|
||
bundle_install | ||
|
||
ATLAS_URI=$MONGODB_URI \ | ||
SERVERLESS=1 \ | ||
EXAMPLE_TIMEOUT=600 \ | ||
bundle exec rspec -fd spec/integration/search_indexes_prose_spec.rb | ||
|
||
test_status=$? | ||
|
||
kill_jruby | ||
|
||
exit ${test_status} |
This file contains 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
Submodule drivers-evergreen-tools
updated
61 files
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'mongo/operation/create_search_indexes/op_msg' | ||
|
||
module Mongo | ||
module Operation | ||
# A MongoDB createSearchIndexes command operation. | ||
# | ||
# @api private | ||
class CreateSearchIndexes | ||
include Specifiable | ||
include OpMsgExecutable | ||
end | ||
end | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# frozen_string_literal: true | ||
|
||
module Mongo | ||
module Operation | ||
class CreateSearchIndexes | ||
# A MongoDB createSearchIndexes operation sent as an op message. | ||
# | ||
# @api private | ||
class OpMsg < OpMsgBase | ||
include ExecutableTransactionLabel | ||
|
||
private | ||
|
||
# Returns the command to send to the database, describing the | ||
# desired createSearchIndexes operation. | ||
# | ||
# @param [ Mongo::Server ] _server the server that will receive the | ||
# command | ||
# | ||
# @return [ Hash ] the selector | ||
def selector(_server) | ||
{ | ||
createSearchIndexes: coll_name, | ||
:$db => db_name, | ||
indexes: indexes, | ||
} | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'mongo/operation/drop_search_index/op_msg' | ||
|
||
module Mongo | ||
module Operation | ||
# A MongoDB dropSearchIndex command operation. | ||
# | ||
# @api private | ||
class DropSearchIndex | ||
include Specifiable | ||
include OpMsgExecutable | ||
end | ||
end | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# frozen_string_literal: true | ||
|
||
module Mongo | ||
module Operation | ||
class DropSearchIndex | ||
# A MongoDB createSearchIndexes operation sent as an op message. | ||
# | ||
# @api private | ||
class OpMsg < OpMsgBase | ||
include ExecutableTransactionLabel | ||
|
||
private | ||
|
||
# Returns the command to send to the database, describing the | ||
# desired dropSearchIndex operation. | ||
# | ||
# @param [ Mongo::Server ] _server the server that will receive the | ||
# command | ||
# | ||
# @return [ Hash ] the selector | ||
def selector(_server) | ||
{ | ||
dropSearchIndex: coll_name, | ||
:$db => db_name, | ||
}.tap do |sel| | ||
sel[:id] = index_id if index_id | ||
sel[:name] = index_name if index_name | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'mongo/operation/update_search_index/op_msg' | ||
|
||
module Mongo | ||
module Operation | ||
# A MongoDB updateSearchIndex command operation. | ||
# | ||
# @api private | ||
class UpdateSearchIndex | ||
include Specifiable | ||
include OpMsgExecutable | ||
end | ||
end | ||
end |
Oops, something went wrong.