Skip to content

Conversation

viveksinghggits
Copy link
Contributor

@viveksinghggits viveksinghggits commented Oct 8, 2025

Summary

As part of our work to move towards OCI compatible container registries for our helm chart, we are also planning to run our E2E tests against the helm chart that we publish to OCI. This will make sure that we are testing in our E2E what we are providing to our customers.
As part of this effort we have already raised a PR that starts publishing our helm chart to the OCI container registry during dev/staging workflows.
This PR goes and changes our E2E tests to start consuming the helm chart from OCI registry instead of the local helm chart repo.

Proof of Work

Successful CI on this PR.
I also ran the test e2e_replica_set_migration locally and it was successful. The logs are here.

Checklist

  • Have you linked a jira ticket and/or is the ticket in the title?
  • Have you checked whether your jira ticket required DOCSP changes?
  • Have you added changelog file?

@viveksinghggits viveksinghggits requested a review from a team as a code owner October 8, 2025 15:48
@viveksinghggits viveksinghggits requested review from MaciejKaras and fealebenpae and removed request for a team October 8, 2025 15:48
@viveksinghggits viveksinghggits marked this pull request as draft October 8, 2025 15:48
@viveksinghggits viveksinghggits added the skip-changelog Use this label in Pull Request to not require new changelog entry file label Oct 8, 2025
@viveksinghggits viveksinghggits force-pushed the publish-chart-oci-prpatches branch from 9bd1970 to 5f0938b Compare October 8, 2025 15:50
@viveksinghggits viveksinghggits force-pushed the e2e-tests-on-published-chart branch from 9d6699b to 4ad79ae Compare October 8, 2025 15:51
@viveksinghggits viveksinghggits force-pushed the publish-chart-oci-prpatches branch from 5f0938b to 1b61956 Compare October 10, 2025 14:28
@viveksinghggits viveksinghggits force-pushed the e2e-tests-on-published-chart branch from 4ad79ae to 9394e7c Compare October 10, 2025 14:44
@MaciejKaras MaciejKaras removed their request for review October 10, 2025 14:58
@viveksinghggits viveksinghggits force-pushed the publish-chart-oci-prpatches branch from e885549 to 92d2fe6 Compare October 14, 2025 08:22
@viveksinghggits viveksinghggits force-pushed the e2e-tests-on-published-chart branch 2 times, most recently from 464fc81 to 5d55e9f Compare October 15, 2025 14:43
@viveksinghggits viveksinghggits changed the title E2e tests on published chart Run MCK E2E tests against OCI published helm chart instead of local chart Oct 17, 2025
@viveksinghggits viveksinghggits changed the title Run MCK E2E tests against OCI published helm chart instead of local chart [CLOUDP-352109] Run MCK E2E tests against OCI published helm chart Oct 17, 2025
Base automatically changed from publish-chart-oci-prpatches to master October 17, 2025 11:34
@viveksinghggits viveksinghggits force-pushed the e2e-tests-on-published-chart branch from b485e0c to e81238f Compare October 17, 2025 12:19
@github-actions
Copy link

⚠️ (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.

@viveksinghggits viveksinghggits marked this pull request as ready for review October 17, 2025 13:48


def main():
build_scenario = os.environ.get("BUILD_SCENARIO")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's not hide the dependency on "BUILD_SCENARIO" env var here and pass it directly as cmd flag.

helm_params+=("--set" "omDebugHttp=true")
fi

if [[ -n "${helm_oci_regisry:-}" ]]; then
Copy link
Collaborator

Choose a reason for hiding this comment

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

are those values optional or should be expected to be present?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

these values must be set for evergreen patches but will not be set for local tests. we are trying to run the tests image here that we don't do when we run the tests locally so we should be good in always expecting this to be set.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If that is the case we should fail in case they are missing and not omit setting them up, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's right. I will make the change.

non_semver_custom_operator_version = os.environ.get(OPERATOR_VERSION_ENV_VAR_NAME)
# when we publish the helm chart we append `0.0.0+` in the chart version, details are
# here https://docs.google.com/document/d/1eJ8iKsI0libbpcJakGjxcPfbrTn8lmcZDbQH1UqMR_g/edit?tab=t.gg5ble8qlesq
custom_operator_version = f"0.0.0+{non_semver_custom_operator_version}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

this will not work when testing against released version which uses semantic version i.e. when we run e2e smoke tests after publishing images to production

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for mentioning this, I missed testing smoke tests while implementing this.

# if operator_version is not specified and we are not installing the MCK or MEKO chart
# it would mean we want to install OCI published helm chart. Figure out respective version,
# it is set in env var `OPERATOR_VERSION` based on build_scenario.
if not operator_version and helm_chart_path not in (
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see this code in two places, it would make sense to encapsulate it in method

helm_args: Optional[Dict] = None,
helm_options: Optional[List[str]] = None,
helm_chart_path: Optional[str] = "helm_chart",
helm_chart_path: Optional[str] = None,
Copy link
Collaborator

Choose a reason for hiding this comment

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

q: how can we instruct this function to use local helm charts for local tests? Ideally we should be able to set this somewhere in the context files and override it by default locally, for example by specifying it in local-defaults-context.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's the plan. I am working on the change that will make sure that we are able to run the tests locally. Will push the changes soon.

@viveksinghggits viveksinghggits force-pushed the e2e-tests-on-published-chart branch from e2a0c99 to 5cb41a0 Compare October 22, 2025 15:19
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.

2 participants