Skip to content

CLOUDP-295785 - script to create release_info.json #307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Aug 7, 2025

Conversation

MaciejKaras
Copy link
Collaborator

@MaciejKaras MaciejKaras commented Aug 1, 2025

Summary

New build_info.json file that contains information about each image, binary and helm-chart that we are building per environment. This will necessary for:

  • building images in dev and staging (different platforms and registries)
  • building binaries (in dev we only need linux/amd64)
  • creating SBOMs - we need information about the image location as well as the supported platforms
  • promoting images - build_info.json stores information about production repositories

After new build and release process will start to use build_info.json, we can get rid of duplicated information in release.json script.

Added release_info.py script that builds relevant release information. This file will be added to GitHub Release assets and backup in S3 storage. This will be helpful for promotion process. Additionally our customers requested for information about all image versions that are shipped with the operator. This file will provide such information.

➜  mongodb-kubernetes git:(ar-related-versions) ✗ python3 -m scripts.release.release_info --help
usage: release_info.py [-h] [-p ] [-c ] [-s ] [-v ] [--output ]

Create relevant release artifacts information in JSON format.

options:
  -h, --help            show this help message and exit
  -p, --path            Path to the Git repository. Default is the current directory '.'
  -c, --changelog-path
                        Path to the changelog directory relative to a current working directory. Default is 'changelog/'
  -s, --initial-commit-sha
                        SHA of the initial commit to start from if no previous version tag is found.
  -v, --initial-version
                        Version to use if no previous version tag is found. Default is '1.0.0'
  --output, -o          Path to save the release information file. If not provided, prints to stdout.

Proof of Work

Passing unit tests + tested the script locally. Example output of command python3 -m scripts.release.release_info --initial-version "1.3.0" -o release_info.json:

{
  "images": {
    "mongodbOperator": {
      "repository": "quay.io/mongodb/mongodb-kubernetes",
      "platforms": [
        "linux/arm64",
        "linux/amd64"
      ],
      "version": "1.3.0"
    },
    "initDatabase": {
      "repository": "quay.io/mongodb/mongodb-kubernetes-init-database",
      "platforms": [
        "linux/arm64",
        "linux/amd64"
      ],
      "version": "1.3.0"
    },
    "initAppDb": {
      "repository": "quay.io/mongodb/mongodb-kubernetes-init-appdb",
      "platforms": [
        "linux/arm64",
        "linux/amd64"
      ],
      "version": "1.3.0"
    },
    "initOpsManager": {
      "repository": "quay.io/mongodb/mongodb-kubernetes-init-ops-manager",
      "platforms": [
        "linux/arm64",
        "linux/amd64"
      ],
      "version": "1.3.0"
    },
    "database": {
      "repository": "quay.io/mongodb/mongodb-kubernetes-database",
      "platforms": [
        "linux/arm64",
        "linux/amd64"
      ],
      "version": "1.3.0"
    },
    "readinessprobe": {
      "repository": "quay.io/mongodb/mongodb-kubernetes-readinessprobe",
      "platforms": [
        "linux/arm64",
        "linux/amd64"
      ],
      "version": "1.0.22"
    },
    "operator-version-upgrade-post-start-hook": {
      "repository": "quay.io/mongodb/mongodb-kubernetes-operator-version-upgrade-post-start-hook",
      "platforms": [
        "linux/arm64",
        "linux/amd64"
      ],
      "version": "1.0.9"
    }
  },
  "binaries": {
    "kubectl-mongodb": {
      "platforms": [
        "darwin/amd64",
        "darwin/arm64",
        "linux/amd64",
        "linux/arm64"
      ],
      "version": "1.3.0"
    }
  },
  "helm-charts": {
    "mongodb-kubernetes": {
      "repository": "quay.io/mongodb/helm-charts",
      "version": "1.3.0"
    }
  }
}

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?

Copy link

github-actions bot commented Aug 1, 2025

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

MCK 1.2.1 Release Notes

Other Changes

  • Optional permissions for PersistentVolumeClaim moved to a separate role. When managing the operator with Helm it is possible to disable permissions for PersistentVolumeClaim resources by setting operator.enablePVCResize value to false (true by default). When enabled, previously these permissions were part of the primary operator role. With this change, permissions have a separate role.
  • subresourceEnabled Helm value was removed. This setting used to be true by default and made it possible to exclude subresource permissions from the operator role by specifying false as the value. We are removing this configuration option, making the operator roles always have subresource permissions. This setting was introduced as a temporary solution for this OpenShift issue. The issue has since been resolved and the setting is no longer needed.

@MaciejKaras MaciejKaras marked this pull request as ready for review August 1, 2025 13:31
@MaciejKaras MaciejKaras requested a review from a team as a code owner August 1, 2025 13:31
@MaciejKaras MaciejKaras added the skip-changelog Use this label in Pull Request to not require new changelog entry file label Aug 1, 2025
@MaciejKaras MaciejKaras requested review from nammn and Julien-Ben August 1, 2025 13:35
@MaciejKaras MaciejKaras force-pushed the ar-related-versions branch from 01de91c to 2317dc5 Compare August 5, 2025 09:05
@MaciejKaras MaciejKaras requested a review from lucian-tosa August 5, 2025 10:42
@MaciejKaras MaciejKaras merged commit 64ca2a8 into master Aug 7, 2025
35 of 38 checks passed
@MaciejKaras MaciejKaras deleted the ar-related-versions branch August 7, 2025 06:59
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.

4 participants