Skip to content

Conversation

@viveksinghggits
Copy link
Contributor

Summary

In one of the previous PRs we made sure that we are publishing our helm chart to OCI container registry, as part of the work where we are going to eventually move to the OCI container registry for our helm chart repo.
After the chart is being published to to dev/staging registries, this PR makes sure that the chart get released to quay, as part of our release process.
We will keep publishing helm chart to the old github repo and quay container registry, for some time and will eventually move to just publishing it to OCI.

Proof of Work

This evg patch is for dev scenario: https://spruce.mongodb.com/version/68f74e0d5420540007c32361/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC
This one is for release, and we were able to publish to quay successfully: https://spruce.mongodb.com/version/68f75417f6cd5700079c0cb9/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC

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 21, 2025 10:31
@viveksinghggits viveksinghggits added the skip-changelog Use this label in Pull Request to not require new changelog entry file label Oct 21, 2025
@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
Copy link
Contributor Author

@MaciejKaras @lucian-tosa can you please have a look into this PR as well.

raise Exception(f"Unable to load Chart.yaml from dir {chart_path}")

# if build_scenario is release, the chart.yaml would already have correct chart version
if build_scenario == BUILD_SCENARIO_RELEASE:
Copy link
Collaborator

@MaciejKaras MaciejKaras Oct 23, 2025

Choose a reason for hiding this comment

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

why not hide this logic in build_info.json? You could specify for example new field version_prefix as 0.0.0+ in patch and staging build scenarios. If it is specified just concatenate it with actual version_id, otherwise use plain version_id

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, there are quite a few things here. First is, this change of figuring out the version of dev/staging is not really part of this PR, it was merged as part of the change in this PR.
Having said that, I can make the change (in new PR) but I would like to understand the benefit of doing that. According to me if we have the build_scenario and with that if we can figure something out without looking into build_info.json, does it make sense to look into build_info.json?
Having the eventual version dependent on build scenario makes the code more readable, if it's dev/staging we are appending 0.0.0. But if we read the prefix from build_info, like you said we are hiding away why we are appending things based on prefix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or in other words, does it make sense to make something configurable, which doesn't need to be. We know that we are not going to change 0.0.0 to something else.

Copy link
Collaborator

Choose a reason for hiding this comment

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

According to me if we have the build_scenario and with that if we can figure something out without looking into build_info.json, does it make sense to look into build_info.json?

If we follow this logic trail, we could just have the build_scenario variable and figure out everything in the code and don't read configuration in build_info.json at all. The reason for having build_info.json is to be able to configure different behaviour for different build scenarios and not have conditional logic in the code. Additional benefit is that we can read the build_info.json configuration and know how it is configured for each 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.

Having the eventual version dependent on build scenario makes the code more readable, if it's dev/staging we are appending 0.0.0. But if we read the prefix from build_info, like you said we are hiding away why we are appending things based on prefix.

I think we can still add comment about this in build_info.json next to dev and staging scenarios.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Or in other words, does it make sense to make something configurable, which doesn't need to be. We know that we are not going to change 0.0.0 to something else.

That's true, to build configuration will rarely change, but it doesn't mean this is the only benefit of having it - to change the configuration. The biggest gain in my opinion is to move abstract conditional logic from the code and make it simple, readable and testable.

Copy link
Contributor Author

@viveksinghggits viveksinghggits Oct 24, 2025

Choose a reason for hiding this comment

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

ok, I can make the change. Is it ok if I do it in the new PR?
The reason is, I want to focus one PR in just one change, don't want to do multiple changes in single PR.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sure, it can be done separately.

Copy link
Collaborator

@MaciejKaras MaciejKaras left a comment

Choose a reason for hiding this comment

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

LGMT!

@viveksinghggits viveksinghggits merged commit 0089223 into master Oct 24, 2025
28 of 37 checks passed
@viveksinghggits viveksinghggits deleted the chart-release-to-oci branch October 24, 2025 12:41
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.

3 participants