Skip to content

chore: Fixes breaking change log with goreleaser #499

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 20 commits into from
Dec 19, 2024

Conversation

maastha
Copy link
Collaborator

@maastha maastha commented Dec 17, 2024

Description

Fixes breaking change log with goreleaser.

Generated test changlog: https://github.com/mongodb/atlas-sdk-go/blob/89fdc186ed4b2c1c1b3c95559bfab03d3f67a291/tools/releaser/breaking_changes/v20241113004.md

Link to any related issue(s): CLOUDP-281143

Type of change:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Required Checklist:

  • I have signed the MongoDB CLA
  • I have added tests that prove my fix is effective or that my feature works
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code

Further comments

@maastha maastha force-pushed the CLOUDP-281143-change-log-2 branch from 5931a2f to 5ec75bd Compare December 17, 2024 17:18
@maastha maastha force-pushed the CLOUDP-281143-change-log-2 branch from 5ec75bd to b929b7c Compare December 17, 2024 17:35
@maastha maastha changed the title chore: depth 2 chore: Test breaking changes changlog generation with goreleaser Dec 18, 2024
@maastha maastha changed the title chore: Test breaking changes changlog generation with goreleaser chore: Fixes breaking change log with goreleaser Dec 18, 2024
@maastha maastha marked this pull request as ready for review December 18, 2024 22:03
@maastha maastha requested a review from a team as a code owner December 18, 2024 22:03
lantoli
lantoli previously approved these changes Dec 19, 2024

echo "Running breaking changes check comparing commits ${API_DIFF_OLD_COMMIT} and ${API_DIFF_NEW_COMMIT}"
echo "Installing gorelease"
go install golang.org/x/exp/cmd/gorelease@latest >/dev/null
Copy link
Member

Choose a reason for hiding this comment

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

:FYI: Latest golang does have tools directive that allows us to define tools direclty in the go.mod.
See: golang/go#48429 (comment)

Comment on lines 4 to -8
# Inputs:
# API_DIFF_OLD_COMMIT: commit before the API changes to compare with. If not provided, script will fail with "unbound variable" error
# API_DIFF_NEW_COMMIT: commit with the new API changes. If not provided, script will fail with "unbound variable" error
# TARGET_BREAKING_CHANGES_FILE - file to save breaking changes
Copy link
Member

Choose a reason for hiding this comment

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

Does script do not have any inputs right now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no. The script now essentially uses the last release version (from extract-version.sh)

@wtrocki
Copy link
Member

wtrocki commented Dec 19, 2024

Script apart from printing breaking changes to file is also responsible in detection of major breaking change.
I asume that we did local tests covering this use case?

wtrocki
wtrocki previously approved these changes Dec 19, 2024
Copy link
Member

@wtrocki wtrocki left a comment

Choose a reason for hiding this comment

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

LGTM

Consider updating documentation to mention what tools we use etc.

@maastha
Copy link
Collaborator Author

maastha commented Dec 19, 2024

Script apart from printing breaking changes to file is also responsible in detection of major breaking change.
I asume that we did local tests covering this use case?

right. Detection of breaking changes is evaluated by whether BREAKING_CHANGES is empty or not, that logic has not been updated and tested for no breaking changes case as well.

@wtrocki
Copy link
Member

wtrocki commented Dec 19, 2024

Super nice work @maastha Good to merge as we going to see potential new SDK releases today!

@maastha maastha dismissed stale reviews from wtrocki and lantoli via cc38fea December 19, 2024 17:36
@maastha maastha merged commit 46e9a7b into main Dec 19, 2024
3 checks passed
@maastha maastha deleted the CLOUDP-281143-change-log-2 branch December 19, 2024 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants