Skip to content

CLOUDP-295785 - GitHub Actions workflow that checks for changelogs #263

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

Open
wants to merge 19 commits into
base: maciejk/ar-versioning
Choose a base branch
from

Conversation

MaciejKaras
Copy link
Collaborator

@MaciejKaras MaciejKaras commented Jul 15, 2025

Summary

This pull request introduces workflows to automate the validation and generation of release notes. It includes new script scripts/release/check_changelog.py for validating changelog file in PRs, created GitHub Actions workflow that calls validation script and another one to create release notes preview.

GitHub Actions Workflows

  • Added .github/workflows/preview_release_notes.yml to generate and preview release notes for pull requests and pushes to master and release-* branches.
  • Added .github/workflows/require_changelog.yml to validate the inclusion of changelog entries in pull requests. The requirement can be skipped by labelling PR with skip-changelog. Underneath the workflow uses scripts/release/check_changelog.py script.
  • Introduced .github/actions/setup-ubuntu-host/action.yml to set up an Ubuntu runner with Python and necessary dependencies for workflows.
  • Updated Pull Request template
  • Updated CONTRIBUTING.md

Proof of Work

Changelog requirement validation

When changelog exists -> https://github.com/mongodb/mongodb-kubernetes/actions/runs/16319921866/attempts/1#summary-46094783625

Changelog entries found and validated

When changelog does not exist -> https://github.com/mongodb/mongodb-kubernetes/actions/runs/16322098714/attempts/1#summary-46102343972

No changelog entries found.
Exiting with error due to no changelog entries found.

When changelog does not exist and the skip-changelog label was added -> https://github.com/mongodb/mongodb-kubernetes/actions/runs/16322136466/attempts/1#summary-46102478174

No changelog entries found.

Release notes generation

Comment with Release Notes preview -> #263 (comment). GHA job summary -> https://github.com/mongodb/mongodb-kubernetes/actions/runs/16322098704/attempts/1#summary-46102343937

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 checked for release_note changes?

Reminder (Please remove this when merging)

  • Please try to Approve or Reject Changes the PR, keep PRs in review as short as possible
  • Our Short Guide for PRs: Link
  • Remember the following Communication Standards - use comment prefixes for clarity:
    • blocking: Must be addressed before approval.
    • follow-up: Can be addressed in a later PR or ticket.
    • q: Clarifying question.
    • nit: Non-blocking suggestions.
    • note: Side-note, non-actionable. Example: Praise
    • --> no prefix is considered a question

@MaciejKaras MaciejKaras force-pushed the maciejk/ar-gha-integration branch 3 times, most recently from 818f617 to a81ee10 Compare July 15, 2025 12:16
@MaciejKaras MaciejKaras changed the base branch from master to maciejk/ar-versioning July 15, 2025 13:17
@MaciejKaras MaciejKaras force-pushed the maciejk/ar-gha-integration branch from 8eed26e to 63dd721 Compare July 15, 2025 13:18
@MaciejKaras MaciejKaras changed the base branch from maciejk/ar-versioning to master July 15, 2025 13:20
@MaciejKaras MaciejKaras force-pushed the maciejk/ar-gha-integration branch 6 times, most recently from 222a674 to f35fa90 Compare July 16, 2025 11:02
@MaciejKaras MaciejKaras added the skip-changelog Use this label in Pull Request to not require new changelog entry file label Jul 16, 2025
@MaciejKaras MaciejKaras force-pushed the maciejk/ar-gha-integration branch from f35fa90 to a8cedd0 Compare July 16, 2025 12:35
@MaciejKaras MaciejKaras removed the skip-changelog Use this label in Pull Request to not require new changelog entry file label Jul 16, 2025
@MaciejKaras MaciejKaras force-pushed the maciejk/ar-gha-integration branch from c4067fb to d746a98 Compare July 16, 2025 14:12
@MaciejKaras MaciejKaras added the skip-changelog Use this label in Pull Request to not require new changelog entry file label Jul 16, 2025
@MaciejKaras MaciejKaras force-pushed the maciejk/ar-gha-integration branch from 3866bc9 to d6e789d Compare July 16, 2025 15:03
@MaciejKaras MaciejKaras changed the base branch from master to maciejk/ar-versioning July 16, 2025 15:04
@MaciejKaras MaciejKaras marked this pull request as ready for review July 16, 2025 15:05
@MaciejKaras MaciejKaras requested a review from a team as a code owner July 16, 2025 15:05
@MaciejKaras MaciejKaras requested review from anandsyncs and viveksinghggits and removed request for a team July 16, 2025 15:05
Copy link
Contributor

@m1kola m1kola left a comment

Choose a reason for hiding this comment

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

LGTM in general. Blocking just so that we double check that we do not expose secrets to malicious PRs.

@MaciejKaras MaciejKaras changed the base branch from maciejk/ar-versioning to master July 17, 2025 11:18
@MaciejKaras MaciejKaras force-pushed the maciejk/ar-gha-integration branch from 6389b26 to d956a13 Compare July 17, 2025 11:20
@MaciejKaras MaciejKaras changed the base branch from master to maciejk/ar-versioning July 17, 2025 11:22
@mongodb mongodb deleted a comment from github-actions bot Jul 17, 2025
@MaciejKaras MaciejKaras changed the base branch from maciejk/ar-versioning to master July 17, 2025 11:36
@MaciejKaras MaciejKaras force-pushed the maciejk/ar-gha-integration branch from 5c5789d to 0c494e0 Compare July 17, 2025 11:37
Copy link

github-actions bot commented Jul 17, 2025

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

MCK 1.3.0 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 force-pushed the maciejk/ar-gha-integration branch from 0c494e0 to 0286ddf Compare July 17, 2025 11:44
@MaciejKaras MaciejKaras changed the base branch from master to maciejk/ar-versioning July 17, 2025 11:45
Comment on lines +18 to +19
Changelog files are placed in the `changelog/` directory and used to generate the Release Notes for the
upcoming release. Preview of the Release Notes is automatically added as comment to each Pull Request.
Copy link
Contributor

Choose a reason for hiding this comment

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

How do we generate release notes after looking at the change log? I am sorry if it's already documented somewhere and I don't remember.
Or in other words, do we polish/rephrase the changelog to make it release note or just use the change log as release note?

Comment on lines +13 to +17
- [ ] Have you added changelog file?
- use `skip-changelog` label if not needed
- refer
to [Changelog files and Release Notes](https://github.com/mongodb/mongodb-kubernetes/blob/master/CONTRIBUTING.md#changelog-files-and-release-notes)
section in CONTRIBUTING.md for more details
Copy link
Contributor

Choose a reason for hiding this comment

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

Raising a PR and then for every PR adding skip-changelog seems counter intuitive to me. Do we generally require all PRs to have change logs?
I think I am a little unsure about our definition of changelog and release note. If you can clarify that, maybe my question would be answered.

Comment on lines +40 to +46
- name: Update PR comment
# If the PR is from a fork, we cannot update the comment using read only permissions
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
run: gh issue comment $ISSUE --edit-last --create-if-none --body-file release_notes_preview.md
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE: ${{ github.event.pull_request.html_url }}
Copy link
Contributor

Choose a reason for hiding this comment

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

I was just thinking how useful this comment is going to be. The rich preview of the .md files can easily be seen using github UI right?
That release note comment would just notify the reviewers I think.

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