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
Please use "<package>: bump to <version>" for version changes #14537
Comments
Why would you not just look for commits that changed the PKG_VERSION instead of this string matching? Especially if you have to opt in via AUTORELEASE anyway? |
Some packages don't use PKG_VERSION, e.g. |
@aparcar If source code is checked in here (like net/owipcalc), I can also use this feature, or? But there will never be a bump or update commit. There is a problem that owipcalc was moved from openwrt to packages repro. Now the counter does not work since it is resetted? :/ |
Package version is automatically increased as described here: openwrt#14537 Signed-off-by: Nick Hainke <vincent@systemli.org>
Package version is automatically increased as described here: openwrt#14537 Signed-off-by: Nick Hainke <vincent@systemli.org>
Package version is automatically increased as described here: openwrt#14537 Signed-off-by: Nick Hainke <vincent@systemli.org>
Package version is automatically increased as described here: openwrt#14537 Signed-off-by: Nick Hainke <vincent@systemli.org>
Package version is automatically increased as described here: openwrt#14537 Signed-off-by: Nick Hainke <vincent@systemli.org>
I changed all the packages that I maintain officially, but the corresponding packages do not have the release identifier in their name? Maybe I did a mistake. |
I tried it locally and the release is attached:
|
I only looked at the output of github builds. Is there a difference? |
Maybe the SDKs did not yet pickup that change. |
@openwrt/package-maintainers I'd bin this issue if nobody objects. |
OK with pinning this. Additionally, we could perhaps add this information to the PR template text, where it is even more visible. |
Package version is automatically increased as described here: openwrt#14537 Signed-off-by: Nick Hainke <vincent@systemli.org>
Package version is automatically increased as described here: openwrt/packages#14537 Signed-off-by: Nick Hainke <vincent@systemli.org> Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
Package version is automatically increased as described here: openwrt#14537 Signed-off-by: Nick Hainke <vincent@systemli.org>
Package version is automatically increased as described here: openwrt#14537 Signed-off-by: Nick Hainke <vincent@systemli.org>
Package version is automatically increased as described here: openwrt#14537 Signed-off-by: Nick Hainke <vincent@systemli.org>
Package version is automatically increased as described here: openwrt#14537 Signed-off-by: Nick Hainke <vincent@systemli.org>
Package version is automatically increased as described here: openwrt/packages#14537 Signed-off-by: Nick Hainke <vincent@systemli.org> Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
I have only briefly skimmed through the main repo commit, but it seems to me that:
Is my understanding correct? If so, I would prefer to continue manually managing I don't want to discourage other people from using |
I agree that this shouldn't be an "automatic" function. |
In my opinion spelling fixups are not worth a commit, rather wait until the next release and fixup spelling or cosmetics within that commit. Skimming through
In that case I'd consider the single commits as incomplete. Each commit should represent a consistent state of the repository. Bumping the release only in some commits results in functional (and checksum) varying packages with the same version-release combination.
You surely can do so. It's opt-in by setting PKG_RELEASE to $(AUTORELEASE), your package your choice. The motivation was to lower the number of review loops like here.
It's automatic if you enable it. If not, not. |
Changes waiting to be committed in the future are changes that will be forgotten.
I didn't say the commits do not represent consistent states. It is entirely possible for a large change to be broken into separate commits while also being consistent at every step. If commits are meant to be read by people, then it is a requirement to break down a large change into discrete steps that can be read and understood.
If commits are part of one PR, when the PR is merged, all of the commits are merged at the same time. Assuming The only way someone can get a package with an old release number and extra commits is if they purposefully checked out a commit from the middle of the PR and built the package from there.
Having this issue pinned, the PR template text possibly being amended,
Part of on-boarding new contributors is teaching them what needs to be done and when. |
That's why I have local staging branches with minor changes.
If your PR contains 5 commits and only one of them touches anything in the specific package folder, the release is bumped by one. If you have multiple logical changes to the package, it makes sense to me treating them as separate releases. Imagine on of the logical changes breaks something.
Which is a terrible unlikely corner cases which makes it the more annoying to debug if it ever happens.
It's meant as a convenience function for maintainers. There were requests to add a PKG_RELEASE bump check in the CI, adding AUTORELEASE seemed like al cleaner solution to me. There are no plans to make this a requirement, although the idea exists to use it per default IFF no PKG_RELEASE is defined. In any case, maintainers can ignore all that by simply keeping the PKG_RELEASE in place.
More coding less chore :) |
Package version is automatically increased as described here: openwrt/packages#14537 Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Package version is automatically increased as described here: openwrt#14537 Signed-off-by: Nick Hainke <vincent@systemli.org>
Package version is automatically increased as described here: openwrt#14537 Signed-off-by: Nick Hainke <vincent@systemli.org>
Package version is automatically increased as described here: openwrt#14537 Signed-off-by: Nick Hainke <vincent@systemli.org>
Package version is automatically increased as described here: openwrt#14537 Signed-off-by: Nick Hainke <vincent@systemli.org>
Package version is automatically increased as described here: openwrt#14537 Signed-off-by: Nick Hainke <vincent@systemli.org>
IMHO AUTORELEASE is not defined correctly for feeds, because they are cloned with |
Yes, if a feed is clone by |
Ironically, the use of |
Yeah, unfortunately |
Im sorry for that, should we extend the CI to check for release bumps and fade out AUTORELEASE again? |
No, autorelease is mostly good. |
I think it is too late to remove AUTORELEASE, but we have traded one thing package changes must do (bump I don't think anyone wants me to go into detail on why one is better than the other, but let's just say that "mistakes" still happen, e.g. #18483. I don't want to be so negative on this feature and I think AUTORELEASE can be good eventually, but I think there still a lot of work to do before it gets there. |
I'll try to find the time to check for AUTORELEASE Via CI and if a number is used and not bumped, an error is reported. That should improve the workflow for reviews |
Would it be possible to skip the whole PKG_RELEASE variable, and always calculate and set a corresponding automatic counter (identical to the AUTORELEASE formula) to the package version? That would avoid both bump, and the check for AUTORELEASE. |
I know you don't agree, but not every change requires a bump to I think your time would be better spent improving the AUTORELEASE detection so that it doesn't require "update to" or "bump to" in the commit title. They lead to false negatives (contributors forgetting to use the magic strings when they should) and false positives (contributors using the magic strings when they shouldn't, e.g. "pinball: bump to bottom edge should not cause ball to levitate")
Please don't, at least not until the AUTORELEASE code is better. |
I'm happy to look into that but that involves more Git juggling which eventually slows down things. I'll try to run a benchmark and see how much things get worse. |
@jefferyto could you please try the following? diff --git a/rules.mk b/rules.mk
index 8d4f619211..27b8079d40 100644
--- a/rules.mk
+++ b/rules.mk
@@ -417,9 +417,10 @@ define commitcount
$(shell \
if git log -1 >/dev/null 2>/dev/null; then \
if [ -n "$(1)" ]; then \
- last_bump="$$(git log --pretty=format:'%h %s' . | \
- grep --max-count=1 -e ': [uU]pdate to ' -e ': [bB]ump to ' | \
- cut -f 1 -d ' ')"; \
+ last_bump=""; \
+ for last_bump in $$(git log --pretty=format:'%h' .); do \
+ git show "$$last_bump" -- Makefile | grep -q -e "+PKG_VERSION" -e "+PKG_SOURCE_DATE" && break; \
+ done; \
fi; \
if [ -n "$$last_bump" ]; then \
echo -n $$(($$(git rev-list --count "$$last_bump..HEAD" .) + 1)); \ |
Related openwrt/openwrt#9893 |
Also related openwrt/openwrt#4218 |
Package version is automatically increased as described here: openwrt/packages#14537 Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
With the recent commit openwrt/openwrt@9ae3c6f a new variable
$(AUTORELEASE)
is added to search the commit subject log of a package for the ": [bB]ump to " and ": [uU]pdate to ". The variable contains the number of commits since the latest bump, making manual changes ofPKG_RELEASE
obsolete.Please use
<package>: bump to <version>
as commit message subject and setPKG_RELEASE
to$(AUTORELEASE)
to use this feature.The text was updated successfully, but these errors were encountered: