Skip to content

Conversation

@lsierant
Copy link
Contributor

@lsierant lsierant commented Oct 24, 2025

Summary

This PR adds regression test for custom roles ensuring we will keep backwards compatibility wrt handling empty strings vs omitted fields.

In the subsequent #553 the serialization rules for custom roles will be changed.

Proof of Work

Tests passing.

@lsierant lsierant self-assigned this Oct 24, 2025
@github-actions
Copy link

github-actions bot commented Oct 24, 2025

⚠️ (this preview might not be accurate if the PR is not rebased on current master branch)

MCK 1.6.0 Release Notes

New Features

  • MongoDBCommunity: Added support to configure custom cluster domain via newly introduced spec.clusterDomain resource field. If spec.clusterDomain is not set, environment variable CLUSTER_DOMAIN is used as cluster domain. If the environment variable CLUSTER_DOMAIN is also not set, operator falls back to cluster.local as default cluster domain.
  • Helm Chart: Introduced two new helm fields operator.podSecurityContext and operator.securityContext that can be used to configure securityContext for Operator deployment through Helm Chart.

Bug Fixes

  • Fixed parsing of the customEnvVars Helm value when values contain = characters.
  • ReplicaSet: Blocked disabling TLS and changing member count simultaneously. These operations must now be applied separately to prevent configuration inconsistencies.

@lsierant lsierant added the skip-changelog Use this label in Pull Request to not require new changelog entry file label Oct 24, 2025
@lsierant lsierant force-pushed the lsierant/custom-roles-regression-tests branch 3 times, most recently from 3040210 to 70c14e8 Compare October 27, 2025 15:45
@lsierant lsierant force-pushed the lsierant/custom-roles-regression-tests branch from 70c14e8 to c150032 Compare October 27, 2025 15:49
@lsierant lsierant marked this pull request as ready for review October 27, 2025 16:01
@lsierant lsierant requested a review from a team as a code owner October 27, 2025 16:01


@fixture(scope="module")
def project_name_prefix(namespace: str) -> str:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is not necessary - in evg namespaces are already randomized

mongodb_role_with_empty_strings["spec"]["roles"][0]["role"] = "readWrite"
mongodb_role_with_empty_strings.update()

wait_until(lambda: replica_set.get_automation_config_tester().reached_version(rs_version + 1), timeout=120)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

asserting for versions is not good:

  • it prevents from re-running the test locally
  • it increases risk of flakiness in case any other changes were performed in the meantime

it's better to just wait for the desired state of AC

export RELEASE_INITIAL_COMMIT_SHA="9ed5f98fc70c5b3442f633d2393265fb8a2aba0c"
export RELEASE_INITIAL_VERSION="1.3.0"

export CLUSTER_TYPE=kind
Copy link
Contributor Author

Choose a reason for hiding this comment

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

local run was failing due to undefined errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Use this label in Pull Request to not require new changelog entry file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant