Skip to content
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

Fix: bump minor, not patch, for features #1111

Merged
merged 1 commit into from
Dec 16, 2024
Merged

Conversation

mem
Copy link
Contributor

@mem mem commented Dec 13, 2024

From the wonderful world of "we have opinions but we don't document them" comes "we provide a sane default configuration but we don't document it."

When 5c21ba3 introduced a configuration file for release please, it replaced a built-in default configuration, which does not consist of the default values but a particular set of hand-picked values, with one where default values suddenly apply. In other words, by having an explicit configuration, all the options for which a value is not supplied use the default value. By not having a configuration, a predefined one is used, which is not composed of all the default values for all the options.

I do not have the time to figure out where this default configuration comes from, but I can see that it does one thing if an empty configuration is provided and a different thing if no configuration is provided. At first glance, it seems to be the CLI flags but I do not know.

Part of that sane default configuration is that when a feature is added, the minor version should be bumped, even if there hasn't been a major release yet. The default value, bump patch unless there's has been a major release already, is indeed a surprising bad default.

From the wonderful world of "we have opinions but we don't document
them" comes "we provide a sane default configuration but we don't
document it."

When 5c21ba3 introduced a configuration
file for release please, it replaced a built-in default configuration,
which does not consist of the default values but a particular set of
hand-picked values, with one where default values suddenly apply. In
other words, by having an explicit configuration, all the options for
which a value is not supplied use the default value. By *not* having a
configuration, a predefined one is used, which is not composed of all
the default values for all the options.

I do not have the time to figure out where this default configuration
comes from, but I can see that it does one thing if an empty
configuration is provided and a different thing if no configuration is
provided. At first glance, it seems to be the CLI flags but I do not
know.

Part of that sane default configuration is that when a feature is added,
the minor version should be bumped, even if there hasn't been a major
release yet. The default value, bump patch unless there's has been a
major release already, is indeed a surprising bad default.

Signed-off-by: Marcelo E. Magallon <[email protected]>
@mem mem requested a review from a team as a code owner December 13, 2024 22:55
@mem mem enabled auto-merge (rebase) December 16, 2024 02:36
@@ -3,6 +3,7 @@
".": {
"release-type": "go",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": false,
Copy link
Contributor

Choose a reason for hiding this comment

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

I reviewed this and, at least based on documentation, this should default to false anyway, but we can set it explicitly just in case. You can see the full config spec here: https://github.com/googleapis/release-please/blob/main/docs/manifest-releaser.md#configfile.

I still don't understand the issue we see in #1094, as the same "behavior" worked correctly in the past with the same configuration. See #954.

@mem mem merged commit 035c146 into main Dec 16, 2024
4 checks passed
@mem mem deleted the mem/fix-release-please-config branch December 16, 2024 06:49
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.

2 participants