Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
12 changes: 6 additions & 6 deletions .evergreen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1475,7 +1475,7 @@ buildvariants:
run_on:
- rhel9-power-small
- rhel9-power-large
allowed_requesters: [ "patch", "github_tag" ]
allowed_requesters: [ "patch", "github_tag" , "commit"]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by this is correct - I mean merging to master will trigger this task

depends_on:
- name: build_operator_ubi
variant: init_test_run
Expand All @@ -1498,7 +1498,7 @@ buildvariants:
run_on:
- rhel9-zseries-small
- rhel9-zseries-large
allowed_requesters: [ "patch", "github_tag" ]
allowed_requesters: [ "patch", "github_tag", "commit"]
depends_on:
- name: build_operator_ubi
variant: init_test_run
Expand All @@ -1520,7 +1520,7 @@ buildvariants:
tags: [ "e2e_test_suite", "e2e_smoke_release_test_suite" ]
run_on:
- ubuntu2204-arm64-large
allowed_requesters: [ "patch", "github_tag" ]
allowed_requesters: [ "patch", "github_tag", "commit"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enabling these builds to be triggered on direct commits in addition to patches and GitHub tags

Can you please explain this a bit, just for my understanding. Do you mean, now this test will also be run when a commit is pushed to a PR branch? If yes, was not does if we just had patch?

Copy link
Collaborator Author

@nammn nammn Aug 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no - only direct commits to master - which means merges to mainline (mainline is master in our case) in evergreen terminology (more on the linked docs).

"Yes, setting allowed_requesters: ["commit"] is correct if you want your Evergreen task to run only on mainline (master) commits—i.e., after a branch is merged into master. This will prevent the task from running on PRs, patches, or other request types."

<<: *base_no_om_image_dependency
tasks:
- name: e2e_smoke_arm_task_group
Expand All @@ -1530,7 +1530,7 @@ buildvariants:
tags: [ "e2e_test_suite", "e2e_smoke_release_test_suite", "static" ]
run_on:
- ubuntu2204-arm64-large
allowed_requesters: [ "patch", "github_tag" ]
allowed_requesters: [ "patch", "github_tag", "commit"]
<<: *base_no_om_image_dependency
tasks:
- name: e2e_smoke_arm_task_group
Expand All @@ -1541,7 +1541,7 @@ buildvariants:
run_on:
- rhel9-zseries-small
- rhel9-zseries-large
allowed_requesters: [ "patch", "github_tag" ]
allowed_requesters: [ "patch", "github_tag", "commit"]
depends_on:
- name: build_operator_ubi
variant: init_test_run
Expand All @@ -1564,7 +1564,7 @@ buildvariants:
run_on:
- rhel9-power-small
- rhel9-power-large
allowed_requesters: [ "patch", "github_tag" ]
allowed_requesters: [ "patch", "github_tag", "commit"]
depends_on:
- name: build_operator_ubi
variant: init_test_run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def replica_set(namespace: str, custom_mdb_version) -> MongoDB:
return resource.update()


@fixture(scope="module")
@fixture(scope="function")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are editing the user and secret later - module scope means we wouldn't return the "updated" user/secret...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blocking: Doesn't this also mean that we will revert any change made to the user?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right, that whole setup is bad. Let me rework that whole structure. We should have function for reads and generally split up read and write...

Copy link
Collaborator Author

@nammn nammn Aug 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adressed here: 06effa5

ugh i remember that we had the idea of reworking all tests to follow a clear pattern such that we are not running into that again..

def scram_user(namespace: str) -> MongoDBUser:
resource = MongoDBUser.from_yaml(find_fixture("scram-sha-user.yaml"), namespace=namespace)

Expand All @@ -53,13 +53,13 @@ def scram_user(namespace: str) -> MongoDBUser:
return resource.update()


@fixture(scope="module")
@fixture(scope="function")
def standard_secret(replica_set: MongoDB):
secret_name = "{}-{}-{}".format(replica_set.name, USER_NAME, USER_DATABASE)
return read_secret(replica_set.namespace, secret_name)


@fixture(scope="module")
@fixture(scope="function")
def connection_string_secret(replica_set: MongoDB):
return read_secret(replica_set.namespace, CONNECTION_STRING_SECRET_NAME)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ def test_user_can_authenticate_with_new_password(self):
password="my-new-password",
username="mms-user-1",
auth_mechanism="SCRAM-SHA-256",
attempts=20,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missed that from prior pr where we changed the default to 50...

Copy link
Collaborator Author

@nammn nammn Aug 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1m is way too close to the actual time required to pass the test. When it passed it needed 55 seconds

)

def test_user_cannot_authenticate_with_old_password(self):
Expand Down
17 changes: 9 additions & 8 deletions scripts/evergreen/setup_aws.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@ install_aws_cli_pip() {
return 1
fi

# Use pip3 if available, otherwise pip
local pip_cmd="pip3"
if ! command -v pip3 &> /dev/null; then
pip_cmd="pip"
# Check if AWS CLI exists and works before installing
if command -v aws &> /dev/null && aws --version &> /dev/null 2>&1; then
echo "AWS CLI is already installed and working:"
aws --version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already ran the aws --version command on line 52, so we don't really have to run it on 54 right? if we are just making sure that aws is working properly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed

return 0
fi

echo "Installing AWS CLI using ${pip_cmd}..."
${pip_cmd} install --user awscli
echo "Installing AWS CLI using pip3..."
pip3 install --user awscli

# Add ~/.local/bin to PATH if not already there (where pip --user installs)
if [[ ":${PATH}:" != *":${HOME}/.local/bin:"* ]]; then
Expand All @@ -64,11 +65,11 @@ install_aws_cli_pip() {
fi

# Verify installation
if command -v aws &> /dev/null; then
if command -v aws &> /dev/null && aws --version &> /dev/null 2>&1; then
echo "AWS CLI v1 installed successfully:"
aws --version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed

else
echo "Error: AWS CLI v1 installation failed or not found in PATH" >&2
echo "Error: AWS CLI v1 installation failed" >&2
return 1
fi
}
Expand Down