- Issue created by @dpi
- π¬π§United Kingdom jonathan1055
Hi dpi,
When exactly did you notice this problem? I thought that it would have been fixed in the changes that were done for #3414505: Allow all sub-modules to be compatible with next_major β and this commit (6th August) was made default for all contrib on 26th August
See https://git.drupalcode.org/project/gitlab_templates/-/commits/default-re...Are you running with the default ref and repo, or have you pinned your gitlab templates to an earlier version?
- π¬π§United Kingdom jonathan1055
My error, this will not be fixed with that issue. It is a problem if the existing constraint does not contain
11
https://git.drupalcode.org/project/gitlab_templates/-/blob/main/includes...
- π¬π§United Kingdom jonathan1055
This addition is really only a temporary extra to help the majority of modules test against Drupal 11 before commiting. There may be a more intelligent way to write it, but the effort to do that would have to be weighed up against how commonly it is needed.
I wonder how often
">=10.2 <12"
is used? Wouldn't the more normal constraint be">=10.2 || ^11"
? - π¦πΊAustralia dpi Perth, Australia
Noticed it in this pipeline for an MR of Key
https://git.drupalcode.org/issue/key-3470903/-/jobs/2586157
Itβs my MR, but not my project.
- π¬π§United Kingdom jonathan1055
Thanks for the link. Your .info.yml file has quotes
core_version_requirement: ">=10.2 <12"
and that is what is causing this problem. If you remove the quotes around the string it should work.
I have just tested it here and this does run
-core_version_requirement: >=10.2 <12 +core_version_requirement: >=10.2 <12 || ^11
- π¦πΊAustralia dpi Perth, Australia
Iβm pretty sure quotes are allowed here. Itβs a YAML string.
And to be clear, this isnβt my code: https://git.drupalcode.org/project/key/-/blob/8.x-1.x/key.info.yml?ref_t...
Itβs a perfectly valid constraint, which gets clobbered by naive code.
- π¬π§United Kingdom jonathan1055
I didn't mean to sound like I was critcising, sorry. I was just showing a simple way that you could get the test running in the short term.
I will work on a fix to the template code.
- π¬π§United Kingdom jonathan1055
jonathan1055 β changed the visibility of the branch 3463894-make-d11-current to hidden.
- πͺπΈSpain fjgarlin
> Make the rewriter more intelligent, in some way
Maybe we can do it less intelligent. Just a rewrite of the whole line into whatβs expected for the job. This was suggested by @cmlara in the previous issue (i think) and it might be the way to go.
So just rewrite to:
core_version_requirement: ^12
I donβt think we should overcomplicate the logic too much.
- π¬π§United Kingdom jonathan1055
Yes you are right, the modified condition does not need to be the perfect actual condition that the module would use, it only needs to allow the testing at Next Major. I will work on a change so that it is "If the condition does not contain ^11 then replace the entire condition with ^11". The diff might look slightly strange in the log when we show what was altered, but that does not matter if it caters for more scenarios correctly.
- Status changed to Needs review
4 months ago 8:18am 30 August 2024 - π¬π§United Kingdom jonathan1055
Ready for review.
Tested here, using
core_version_requirement: ">=10.2 <12"</ code> https://git.drupalcode.org/project/scheduler/-/jobs/2598519#L49 You can test this MR by putting the following in the top of .gitlab-ci.yml <code> include: # MR 252 Improve Next Major constraint - project: issue/gitlab_templates-3470918 ref: 3470918-next-major-requirement
- Status changed to RTBC
4 months ago 9:14am 2 September 2024 - πͺπΈSpain fjgarlin
Thanks for the changes and the tests.
Downstream pipelines are running here too https://git.drupalcode.org/issue/gitlab_templates-3470918/-/pipelines/26...Everything looks good. I'll merge shortly, release 1.5.7 and make it the default ref.
Thanks. -
fjgarlin β
committed 6b99a6f0 on main authored by
jonathan1055 β
Issue #3470918 by jonathan1055, dpi, fjgarlin: Core requirement rewriter...
-
fjgarlin β
committed 6b99a6f0 on main authored by
jonathan1055 β
- Status changed to Fixed
4 months ago 11:18am 2 September 2024 -
fjgarlin β
committed fa5f130c on main
Issue #3470918: Changelog.
-
fjgarlin β
committed fa5f130c on main
- π¬π§United Kingdom jonathan1055
I have updated the summary with the actual solution implemented.
Thanks for committing, and for releasing 1.5.7 and making it 'default-ref' - π¦πΊAustralia dpi Perth, Australia
Thanks, wholesale replacement also seems viable and sensible π
Automatically closed - issue fixed for 2 weeks with no activity.