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

Make sure release has a disttag #2106

Merged
merged 2 commits into from Oct 31, 2023

Conversation

LecrisUT
Copy link
Contributor

@LecrisUT LecrisUT commented Oct 2, 2023

Not sure if this is the most optimal place to put it

TODO:

  • Write new tests or update the old ones to cover new functionality.
  • Update doc-strings where appropriate.

Fixes #1978

RELEASE NOTES BEGIN

Enforce dist tag %{?dist} when updating release

RELEASE NOTES END

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://softwarefactory-project.io/zuul/t/packit-service/buildset/4e6ddc43a9164a66a9dd71316f074d6a

✔️ pre-commit SUCCESS in 1m 33s
packit-tests-rpm FAILURE in 10m 52s
packit-tests-pip-deps FAILURE in 11m 09s
packit-tests-git-main FAILURE in 11m 33s
✔️ packit-tests-pip-deps-sess-rec SUCCESS in 2m 45s
✔️ packit-tests-git-main-sess-rec SUCCESS in 3m 10s
✔️ reverse-dep-packit-service-tests SUCCESS in 3m 57s

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://softwarefactory-project.io/zuul/t/packit-service/buildset/c5f168964f14457aab046fb3e751db24

✔️ pre-commit SUCCESS in 2m 00s
packit-tests-rpm FAILURE in 11m 02s
packit-tests-pip-deps FAILURE in 11m 12s
packit-tests-git-main FAILURE in 11m 44s
✔️ packit-tests-pip-deps-sess-rec SUCCESS in 3m 06s
✔️ packit-tests-git-main-sess-rec SUCCESS in 3m 31s
✔️ reverse-dep-packit-service-tests SUCCESS in 4m 11s

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://softwarefactory-project.io/zuul/t/packit-service/buildset/d4cdc55bd22442c5b31de7e2f823c691

✔️ pre-commit SUCCESS in 2m 02s
packit-tests-rpm FAILURE in 18m 06s
packit-tests-pip-deps FAILURE in 18m 22s
packit-tests-git-main FAILURE in 18m 00s
✔️ packit-tests-pip-deps-sess-rec SUCCESS in 3m 22s
✔️ packit-tests-git-main-sess-rec SUCCESS in 3m 54s
✔️ reverse-dep-packit-service-tests SUCCESS in 4m 03s

@LecrisUT
Copy link
Contributor Author

LecrisUT commented Oct 2, 2023

One thing to note, if the users sets a manual dist tag like f42 instead of %{?dist}, this one would still append %{?dist}. I am assuming that if the user does that, they wouldn't be using the default fix_spec action or have the dist tag statically defined in release_suffix

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://softwarefactory-project.io/zuul/t/packit-service/buildset/56133a44ab8f41dcb48954230d07b0f7

✔️ pre-commit SUCCESS in 2m 01s
packit-tests-rpm FAILURE in 18m 04s
packit-tests-pip-deps FAILURE in 18m 21s
packit-tests-git-main FAILURE in 18m 18s
✔️ packit-tests-pip-deps-sess-rec SUCCESS in 3m 27s
✔️ packit-tests-git-main-sess-rec SUCCESS in 3m 35s
✔️ reverse-dep-packit-service-tests SUCCESS in 4m 38s

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.
https://softwarefactory-project.io/zuul/t/packit-service/buildset/ddfa229c9ed34731bb79a72384182267

✔️ pre-commit SUCCESS in 1m 36s
✔️ packit-tests-rpm SUCCESS in 17m 38s
✔️ packit-tests-pip-deps SUCCESS in 17m 33s
✔️ packit-tests-git-main SUCCESS in 17m 22s
✔️ packit-tests-pip-deps-sess-rec SUCCESS in 2m 57s
✔️ packit-tests-git-main-sess-rec SUCCESS in 3m 04s
✔️ reverse-dep-packit-service-tests SUCCESS in 3m 43s

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.
https://softwarefactory-project.io/zuul/t/packit-service/buildset/19c79c740a794b08843e3caaacb715cf

✔️ pre-commit SUCCESS in 1m 37s
✔️ packit-tests-rpm SUCCESS in 18m 43s
✔️ packit-tests-pip-deps SUCCESS in 18m 11s
✔️ packit-tests-git-main SUCCESS in 17m 38s
✔️ packit-tests-pip-deps-sess-rec SUCCESS in 3m 08s
✔️ packit-tests-git-main-sess-rec SUCCESS in 3m 07s
✔️ reverse-dep-packit-service-tests SUCCESS in 3m 36s

@lbarcziova
Copy link
Member

hi @LecrisUT ! Do you mean any of #1978 or #2046?

@LecrisUT
Copy link
Contributor Author

LecrisUT commented Oct 3, 2023

Thanks it is #1978. It was closed that's why I didn't find it

Comment on lines +225 to +232
# Make sure the new release has a dist tag if it is not already included explicitly
# (in release) or implicitly (in up.specfile.raw_release)
if (
release
and not release.endswith("%{?dist}")
and not self.up.specfile.raw_release.endswith("%{?dist}")
):
release = f"{release}%{{?dist}}"
Copy link
Member

Choose a reason for hiding this comment

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

looks ok to me, but I am not that familiar with this code, maybe @majamassarini @nforro could you take a look please?

Copy link
Member

Choose a reason for hiding this comment

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

The code looks good to me but if I get it correctly we are changing the package name format and I think some user may depend on the old format (somehow in their script) and we should be prepared to deal with some issue.
I hope I am wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed that's the case. It will append %{?dist} if it sees that the final form of the release does not include it, including if they use specific templates and suffixes, as long as update_release: true. My assumption here is that if they had a non-standard format, they would be using update_release: false and hardcode the release tag rather than have a templatized form.

But I am not sure how common release_suffix is used, so I will deffer the judgement if it should be gated through an option or add it with appropriate change_notes and deal with any issues that pop up.

Copy link
Member

@nforro nforro left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.
https://softwarefactory-project.io/zuul/t/packit-service/buildset/f6e1e21c58f746c8807b312457c84f98

✔️ pre-commit SUCCESS in 1m 46s
✔️ packit-tests-rpm SUCCESS in 17m 43s
✔️ packit-tests-pip-deps SUCCESS in 17m 18s
✔️ packit-tests-git-main SUCCESS in 17m 46s
✔️ packit-tests-pip-deps-sess-rec SUCCESS in 2m 55s
✔️ packit-tests-git-main-sess-rec SUCCESS in 3m 03s
✔️ reverse-dep-packit-service-tests SUCCESS in 3m 38s

@lachmanfrantisek lachmanfrantisek added the mergeit When set, zuul wil gate and merge the PR. label Oct 31, 2023
Copy link
Contributor

Build succeeded (gate pipeline).
https://softwarefactory-project.io/zuul/t/packit-service/buildset/3c83074d712b4959ba169776aba51113

✔️ pre-commit SUCCESS in 1m 51s

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit fd13a16 into packit:main Oct 31, 2023
23 checks passed
@LecrisUT LecrisUT deleted the fix/disttag branch November 21, 2023 13:53
henryiii pushed a commit to scikit-build/scikit-build-core that referenced this pull request Dec 15, 2023
This one depends on a few upstream PRs:
- packit/tmt-plans#8
- packit/packit#2106

---------

Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mergeit When set, zuul wil gate and merge the PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rpminspect fails for packit built srpms with %autorelease and update_release: true
5 participants