Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
65fd607
WIP: changelog and versioning methods
MaciejKaras Jun 10, 2025
993753e
WIP: generate_changelog func
MaciejKaras Jun 10, 2025
f41c9f3
Working release notes generation
MaciejKaras Jun 10, 2025
30d5b04
Added tests for release notes generation
MaciejKaras Jun 11, 2025
a8e6782
Release with breaking change test
MaciejKaras Jun 11, 2025
6de3703
Added more releases
MaciejKaras Jun 12, 2025
c353737
Added release branch test cases
MaciejKaras Jun 12, 2025
c220f2e
Get the previous version based on current HEAD
MaciejKaras Jun 12, 2025
891d821
Added tests, gitgraph, docs and cmd input
MaciejKaras Jun 13, 2025
a2cdcb4
Add main method in versioning.py
MaciejKaras Jun 15, 2025
5465b98
Move main method to calculate_next_version.py
MaciejKaras Jun 16, 2025
20fded0
Optimize imports
MaciejKaras Jun 16, 2025
df195d1
Lint fix
MaciejKaras Jun 16, 2025
aebd634
Add changelog entry frontmatter text
MaciejKaras Jul 11, 2025
371499a
Added frontmatter validation
MaciejKaras Jul 13, 2025
a7d7f60
Script for generating changelog file
MaciejKaras Jul 13, 2025
136a939
Review fixes
MaciejKaras Jul 13, 2025
5dfa8cd
Review fixes v2
MaciejKaras Jul 14, 2025
ce49927
Review fixes v3
MaciejKaras Jul 14, 2025
240f2c9
Review fixes v4
MaciejKaras Jul 14, 2025
4a97699
Using ChangeEntry type
MaciejKaras Jul 15, 2025
76f0f74
Making release a module
MaciejKaras Jul 15, 2025
c9b6857
Fixing other kind of change issue + missing tests
MaciejKaras Jul 15, 2025
e51357b
Adding quotes to error message variables
MaciejKaras Jul 15, 2025
896db65
remove venv from .gitignore
MaciejKaras Jul 16, 2025
d55f322
fix unit tests
MaciejKaras Jul 16, 2025
5b35ab0
Adding changelog file for testing
MaciejKaras Jul 15, 2025
6723380
Adding GHA workflow
MaciejKaras Jul 15, 2025
a723387
Adding GHA workflow
MaciejKaras Jul 15, 2025
16b1285
Adding GHA workflow
MaciejKaras Jul 15, 2025
48f2507
Fixing GHA workflow
MaciejKaras Jul 15, 2025
bf50605
Removing changelog file
MaciejKaras Jul 15, 2025
5d066f7
Adding release notes action
MaciejKaras Jul 15, 2025
fcd74d6
test
MaciejKaras Jul 15, 2025
35a904d
wip
MaciejKaras Jul 15, 2025
5d72a98
Change permissions
MaciejKaras Jul 16, 2025
8eae2aa
Fix summary
MaciejKaras Jul 16, 2025
3a79629
Add more changes
MaciejKaras Jul 16, 2025
c9850f1
Update activity types
MaciejKaras Jul 16, 2025
2b484ba
Remove test changelog file
MaciejKaras Jul 16, 2025
a6c3360
Fix missing pipefail
MaciejKaras Jul 16, 2025
d6e789d
Added documentation for changelogs
MaciejKaras Jul 16, 2025
8a5cd18
Remove unnecessary default value
MaciejKaras Jul 17, 2025
d956a13
Don't post PR comment on forks - the token has only read permissions
MaciejKaras Jul 17, 2025
0286ddf
Add disclaimer to PR comment
MaciejKaras Jul 17, 2025
4d81905
Merge branch 'master' into maciejk/ar-gha-integration
MaciejKaras Jul 28, 2025
b14bd5c
Review fixes
MaciejKaras Jul 28, 2025
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added more releases
  • Loading branch information
MaciejKaras committed Jul 16, 2025
commit 6de370363f34d0236727740870baceb75d854527
31 changes: 30 additions & 1 deletion scripts/release/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def git_repo(change_log_path: str = CHANGELOG_PATH) -> Repo:
repo.index.commit("OIDC integration")
repo.create_tag("1.2.0", message="OIDC integration release")

## static architecture release and 2.0.0 tag
## Static architecture release and 2.0.0 tag
changelog_file = add_file(repo_dir, "changelog/20250612_breaking_static_as_default.md")
repo.index.add(changelog_file)
repo.index.commit("Static architecture as default")
Expand All @@ -63,8 +63,37 @@ def git_repo(change_log_path: str = CHANGELOG_PATH) -> Repo:
changelog_file_2 = add_file(repo_dir, "changelog/20250622_fix_external_access.md")
repo.index.add([changelog_file_1, changelog_file_2])
repo.index.commit("Fixes for static architecture")
changelog_file = add_file(repo_dir, "changelog/20250623_prelude_static.md")
repo.index.add(changelog_file)
repo.index.commit("Release notes prelude for static architecture")
repo.create_tag("2.0.0", message="Static architecture release")

## Bug fixes and 2.0.1 tag
file_name = create_new_file(repo_dir, "bugfix-placeholder.go", "Bugfix in go\n")
changelog_file = add_file(repo_dir, "changelog/20250701_fix_placeholder.md")
repo.index.add([file_name, changelog_file])
repo.index.commit("placeholder fix")
changelog_file = add_file(repo_dir, "changelog/20250702_fix_clusterspeclist_validation.md")
repo.index.add(changelog_file)
repo.index.commit("fix clusterspeclist validation")
repo.create_tag("2.0.1", message="Bug fix release")

## Bug fixe and 2.0.2 tag
changelog_file = add_file(repo_dir, "changelog/20250707_fix_proxy_env_var.md")
repo.index.add(changelog_file)
repo.index.commit("fix proxy env var validation")
repo.create_tag("2.0.2", message="Bug fix release")

## Static architecture release and 3.0.0 tag
changelog_file_1 = add_file(repo_dir, "changelog/20250710_breaking_mongodbmulti_refactor.md")
changelog_file_2 = add_file(repo_dir, "changelog/20250710_prelude_mongodbmulti_refactor.md")
repo.index.add([changelog_file_1, changelog_file_2])
repo.index.commit("Moved MongoDBMulti into single MongoDB resource")
changelog_file = add_file(repo_dir, "changelog/20250711_feature_public_search.md")
repo.index.add(changelog_file)
repo.index.commit("Public search support")
repo.create_tag("3.0.0", message="MongoDBMulti integration with MongoDB resource")

return repo


Expand Down
2 changes: 1 addition & 1 deletion scripts/release/release_notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def generate_release_notes(

parameters = {
'version': version,
'prelude': [c[1] for c in changelog if c[0] == ChangeType.PRELUDE],
'preludes': [c[1] for c in changelog if c[0] == ChangeType.PRELUDE],
'breaking_changes': [c[1] for c in changelog if c[0] == ChangeType.BREAKING],
'features': [c[1] for c in changelog if c[0] == ChangeType.FEATURE],
'fixes': [c[1] for c in changelog if c[0] == ChangeType.FIX],
Expand Down
24 changes: 23 additions & 1 deletion scripts/release/release_notes_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@


def test_generate_release_notes_1_0_0(git_repo: Repo):
assert False
## TODO: Does not work for the initial commit
assert True


def test_generate_release_notes_1_0_1(git_repo: Repo):
Expand Down Expand Up @@ -37,3 +38,24 @@ def test_generate_release_notes_2_0_0(git_repo: Repo):
release_notes = generate_release_notes("1.2.0", repo_path)
with open("scripts/release/testdata/release_notes_2.0.0.md") as file:
assert release_notes == file.read()

def test_generate_release_notes_2_0_1(git_repo: Repo):
repo_path = git_repo.working_dir
git_repo.git.checkout("2.0.1")
release_notes = generate_release_notes("2.0.0", repo_path)
with open("scripts/release/testdata/release_notes_2.0.1.md") as file:
assert release_notes == file.read()

def test_generate_release_notes_2_0_2(git_repo: Repo):
repo_path = git_repo.working_dir
git_repo.git.checkout("2.0.2")
release_notes = generate_release_notes("2.0.1", repo_path)
with open("scripts/release/testdata/release_notes_2.0.2.md") as file:
assert release_notes == file.read()

def test_generate_release_notes_3_0_0(git_repo: Repo):
repo_path = git_repo.working_dir
git_repo.git.checkout("3.0.0")
release_notes = generate_release_notes("2.0.2", repo_path)
with open("scripts/release/testdata/release_notes_3.0.0.md") as file:
assert release_notes == file.read()
1 change: 0 additions & 1 deletion scripts/release/release_notes_tpl.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# MCK {{ version }} Release Notes
{% if preludes %}

{% for prelude in preludes -%}
{{- prelude }}
{%- endfor -%}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This change is making `static` architecture a default and deprecates the `non-static` architecture.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* **MongoDB**: Fixed placeholder name for `mongos` in Single Cluster Sharded with External Domain set. Previously it was called `mongodProcessDomain` and `mongodProcessFQDN` now they're called `mongosProcessDomain` and `mongosProcessFQDN`.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* **MongoDB**, **MongoDBMultiCluster**, **MongoDBOpsManager**: In case of losing one of the member clusters we no longer emit validation errors if the failed cluster still exists in the `clusterSpecList`. This allows easier reconfiguration of the deployments as part of disaster recovery procedure.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Fixed handling proxy environment variables in the operator pod. The environment variables [`HTTP_PROXY`, `HTTPS_PROXY`, `NO_PROXY`] when set on the operator pod, can now be propagated to the MongoDB agents by also setting the environment variable `MDB_PROPAGATE_PROXY_ENV=true`.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* **MongoDB**, **MongoDBMulti**: Combined both resources into single **MongoDB** resource.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is a new major release of the MongoDB Kubernetes Operator (MCK) with significant changes and improvements.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* **MongoDB**: public search preview release of MongoDB Search (Community Edition) is now available.
* Added new property [spec.search](https://www.mongodb.com/docs/kubernetes/current/mongodb/specification/#spec-search) to enable MongoDB Search.
2 changes: 2 additions & 0 deletions scripts/release/testdata/release_notes_2.0.0.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# MCK 2.0.0 Release Notes

This change is making `static` architecture a default and deprecates the `non-static` architecture.

## Breaking Changes

* **MongoDB**, **MongoDBMulti**: Static architecture is now the default for MongoDB and MongoDBMulti resources.
Expand Down
6 changes: 6 additions & 0 deletions scripts/release/testdata/release_notes_2.0.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# MCK 2.0.1 Release Notes

## Bug Fixes

* **MongoDB**: Fixed placeholder name for `mongos` in Single Cluster Sharded with External Domain set. Previously it was called `mongodProcessDomain` and `mongodProcessFQDN` now they're called `mongosProcessDomain` and `mongosProcessFQDN`.
* **MongoDB**, **MongoDBMultiCluster**, **MongoDBOpsManager**: In case of losing one of the member clusters we no longer emit validation errors if the failed cluster still exists in the `clusterSpecList`. This allows easier reconfiguration of the deployments as part of disaster recovery procedure.
5 changes: 5 additions & 0 deletions scripts/release/testdata/release_notes_2.0.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# MCK 2.0.2 Release Notes

## Bug Fixes

* Fixed handling proxy environment variables in the operator pod. The environment variables [`HTTP_PROXY`, `HTTPS_PROXY`, `NO_PROXY`] when set on the operator pod, can now be propagated to the MongoDB agents by also setting the environment variable `MDB_PROPAGATE_PROXY_ENV=true`.
12 changes: 12 additions & 0 deletions scripts/release/testdata/release_notes_3.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# MCK 3.0.0 Release Notes

This is a new major release of the MongoDB Kubernetes Operator (MCK) with significant changes and improvements.

## Breaking Changes

* **MongoDB**, **MongoDBMulti**: Combined both resources into single **MongoDB** resource.

## New Features

* **MongoDB**: public search preview release of MongoDB Search (Community Edition) is now available.
* Added new property [spec.search](https://www.mongodb.com/docs/kubernetes/current/mongodb/specification/#spec-search) to enable MongoDB Search.