- πΊπΈUnited States effulgentsia
One necessary next step here is to open issues for each of Composer Stager's dev dependencies that isn't already a core dev dependency, that explains the benefit of that dev dependency, so that we can evaluate whether the benefit is worth whatever the burden of that dependency is.
https://github.com/php-tuf/composer-stager/issues/56 is an example where we've started the discussion for
infection/infection
, and I think the conclusion there so far is to remove that dependency unless @TravisCarden wants to argue for keeping it.Reviewing the code itself can happen in parallel to that, so I agree with "Needs review" as the correct issue status here.
- πΊπΈUnited States effulgentsia
- Composer Stager is currently in the PHP-TUF namespace/organization. Decide if we want to move it into the Drupal namespace/organization.
- Decide if we want to continue maintaining it as a GitHub repo, or whether to move it to drupal.org's GitLab, or even into the Drupal core repository and mirrored to GitHub, like we do for https://github.com/drupal/recommended-project.Removing these from the remaining tasks, because I discussed this with other committers, and we decided to keep it in the PHP-TUF namespace and on GitHub, to make it easier for other projects (e.g., Joomla, Typo3) to co-maintain it with us if they want to.
- Decide if/how we want to empower non-Drupal projects to help contribute to / maintain Composer Stager, if it's under Drupal core's governance.
I replaced that with:
Add needed governance documents (security policy, links to Drupal core governance documents, etc.) to the repo.
- πΊπΈUnited States effulgentsia
Added a remaining task of performing evaluations for Composer Stager's dev dependencies. https://github.com/php-tuf/composer-stager/issues/78 is the issue for that (currently that issue only lists one dev dependency but the others will be added to it soon).
- πΊπΈUnited States effulgentsia
Added link to https://github.com/php-tuf/composer-stager/issues/60.
- πΊπΈUnited States traviscarden
Adding a link to the summary to the Composer Stager issue to define a security policy (https://github.com/php-tuf/composer-stager/issues/79).
- πΊπΈUnited States effulgentsia
I added a "Code overview for reviewers" section to the issue summary to help orient reviewers.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
π That looks excellent, @effulgentsia!
- πΊπΈUnited States pwolanin
Discussing this at DrupalCamp NJ. I think it would be worth shipping a composer.phar with Drupal core so that there is a known and valid version of the composer executable always available.
Advantages:
You can always be using a version of composer against which all the automated/manual tests have run and passed.
There is no dependency on the hosting provider to have installed a usable version of composerThere might be other ways to handle a missing or invalid composer, but this is at least simple. since it's just a phar, it's not going to be the composer/composer package which is causing issues mentioned by Dave in π [policy] Move composer/composer from a dev dependency to a production dependency Closed: won't fix
- πΊπΈUnited States pwolanin
Also, there should be a way to run the autoupdates on the cli so that you can run as a system user that can write the files. Possibly we could update core/scripts/drupal to include some commands that actually bootstrap to do those things in a light-weight way?
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
https://github.com/php-tuf/composer-stager/releases/tag/v2.0.0-alpha1 was tagged.
See https://github.com/php-tuf/composer-stager/milestone/1 for what remains to reach
2.0.0
.This patch adds
php-tuf/composer-stager
2.0.0-alpha1
to Drupal core and was generated usingCOMPOSER_ROOT_VERSION=10.1.x-dev composer require php-tuf/composer-stager 2.0.0-alpha1
- πΊπΈUnited States dww
Thanks for such a comprehensive summary! I hope to have time to review this βsoonβ. π€ meanwhile, I hope adding βand governanceβ to this title is a friendly amendment, because thatβs the full scope here, no?
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
ComposerProjectTemplatesTest
fails because2.0.0-alpha1
does not meet the minimum stability ofstable
.Not sure how we want to proceed here because https://www.drupal.org/about/core/policies/core-change-policies/experime... β does not document either:
- how new dependencies that are necessary only for experimental modules are or aren't removed from packaged releases of Drupal core
- whether such dependencies must meet core's minimum stability guidelines too
β¦ but given that this is an alpha-experimental module, a dependency on an alpha release of a package that as @xjm said in #6 we are actually maintaining β¦ seems reasonable?
The last submitted patch, 20: 3331078-20.patch, failed testing. View results β
The last submitted patch, 22: 3331078-22.patch, failed testing. View results β
- Status changed to Needs work
over 1 year ago 12:32pm 20 March 2023 - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
#20 had 3 failures, #22 has 2. But the 2 failures already fail locally on a fresh Drupal core clone β¦ π€π¬
Fortunately the error message is clearer on DrupalCI than on my local β they fail like this:
Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires drupal/core-recommended ^10.1 -> satisfiable by drupal/core-recommended[10.1.0]. - drupal/core-recommended 10.1.0 requires php-tuf/composer-stager ~v2.0.0-alpha1 -> found php-tuf/composer-stager[v2.0.0-alpha1] but it does not match your minimum-stability.
That's pretty clear. AFAICT that means this is hard-blocked on a
2.0.0
tag ofphp-tuf/composer-stager
? - Status changed to Needs review
over 1 year ago 2:25pm 20 March 2023 - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Attempting a work-around: use a stability flag to bypass core's requirement: https://getcomposer.org/doc/04-schema.md#package-links.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
This blocks β¨ Add Alpha level Experimental Package Manager module Needs review , which in turn blocks Automatic Updates ( β¨ Add Alpha level Experimental Automatic Updates module Needs work ) and Project Browser (no core issue yet β roadmap: π± Roadmap to experimental Project Browser in Drupal Core Active ).
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Looks like #26 will still fail.
Still, it doesn't even really matter: @tedbow pointed out that he actually thinks the very goal is to have an
alpha
release ofphp-tuf/composer-stager
:- at least for now (to avoid the need for BC breaks based on core committer reviews)
- arguably even in core, to allow it to evolve further while Package Manager/Automatic Updates are alpha-experimental anyway
What do core framework managers & release managers think? π
The last submitted patch, 26: 3331078-26.patch, failed testing. View results β
- Status changed to Needs work
over 1 year ago 3:55pm 20 March 2023 - πΊπΈUnited States effulgentsia
I think that the patch for this issue can/should change
ComposerProjectTemplatesTest::MINIMUM_STABILITY
from "stable" to "alpha". I think it's okay to do that, because after we branch 10.2.x, we can remove this dependency from 10.1.x and then raiseComposerProjectTemplatesTest::MINIMUM_STABILITY
back to what we want to prior to tagging any 10.1 pre-releases. - πΊπΈUnited States effulgentsia
@pwolanin, re #18 and #19, that's really good feedback, but I think #18 is a topic for β¨ Add Alpha level Experimental Package Manager module Needs review and #19 is a topic for β¨ Add Alpha level Experimental Automatic Updates module Needs work . Do you agree, or do you see those as something in scope for Composer Stager?
The sequence of issues is:
- Composer Stager: this issue. A PHP library agnostic of anything Drupal-specific, so that other CMSes could use it too if they want to.
- Package Manager: β¨ Add Alpha level Experimental Package Manager module Needs review . Drupal module that depends on Composer Stager but that is independent of whether the use-case is installing (Project Browser) or updating (Automatic Updates).
- Automatic Updates: β¨ Add Alpha level Experimental Automatic Updates module Needs work . Depends on Package Manager.
- πΊπΈUnited States traviscarden
I'll try to post some updates here as I make progress toward a stable
v2.0.0
release of Composer Stager. I knocked two issues off the milestone checklist today. Of the two remaining, one should be pretty simple. Eliminating the dependency on Symfony Filesystem could potentially take some doing (but I can't say until I get started). I do plan to add an issue to the milestone for some refactoring that I want to do while I can still make BC-breaking changes. I don't want that opportunity to get away, but I'm trying not to go crazy. Tell me when you push this dependency onto stable so I can update. Thanks.
- πΊπΈUnited States traviscarden
Update from my end: I'm continuing to work on the
Composer Stager v2.0.0 milestone
, most notably Add support for string translation for names, descriptions, and messages. Things are moving along nicely, but there's a non-trivial amount of work left. - πΊπΈUnited States traviscarden
Update: there's ongoing requirements-and-design discussion on Add support for string translation for names, descriptions, and messages. The scope has increased somewhat as a result, and there's still quite a bit of work left. But it's still moving along at a good pace without any surprises.
- πΊπΈUnited States traviscarden
Update: Add support for string translation for names, descriptions, and messages is finished. There are some follow-ups and of course the other issues assigned to the v2.0.0 milestone.
- Status changed to Needs review
over 1 year ago 7:11pm 28 July 2023 - πΊπΈUnited States effulgentsia
Composer Stager 2.0.0-beta1 has been released. I updated the issue summary to be up to date with that.
I believe Composer Stager now implements everything that is needed for an Automatic Updates in Drupal core MVP and is therefore fully ready for reviews.
- last update
over 1 year ago Patch Failed to Apply - πΊπΈUnited States effulgentsia
Updated patch to pull in the 2.0.0-beta1 version.
- last update
over 1 year ago 29,450 pass, 1 fail - last update
over 1 year ago 29,946 pass - πΊπΈUnited States effulgentsia
Fixed broken links in the issue summary that were due to refactoring of class names from 1.x to 2.x.
- Status changed to RTBC
over 1 year ago 1:28pm 7 August 2023 - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
-
+++ b/composer.lock @@ -2402,6 +2485,69 @@ + { + "name": "symfony/filesystem", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "97b698e1d77d356304def77a8d0cd73090b359ea" @@ -8835,69 +8981,6 @@ - { - "name": "symfony/filesystem", - "version": "v6.3.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "97b698e1d77d356304def77a8d0cd73090b359ea"
So weird that
composer
just moved this exact same dependency around incomposer.lock
! ππ€·ββοΈYou can see that even the hash is identical.
It appears that different
composer
versions just have different sorting logic?EDIT: ah, now I see β it is being moved from the pinned dev dependencies to an indirect non-dev dependency. That explains it π
-
+++ b/core/tests/Drupal/BuildTests/Composer/Template/ComposerProjectTemplatesTest.php @@ -30,7 +30,7 @@ class ComposerProjectTemplatesTest extends ComposerBuildTestBase { - protected const MINIMUM_STABILITY = 'stable'; + protected const MINIMUM_STABILITY = 'beta';
Is this really acceptable? π€
We usually only do this when updating Symfony to the release we know we'll ship the next Drupal core minor with. For example, π Update to Symfony 6.3 Fixed changed this to
'beta'
too, then π Update to Symfony 6.3 RC1 Fixed changed it to'RC'
and π Update to Symfony 6.3 Fixed restored it to'stable'
.I guess we're saying β¦ that it'll be okay to set this temporarily, because we'll pin it to a stable release of
php-tuf/composer-stager
prior to tagging Drupal 10.2? -
+++ b/core/tests/Drupal/BuildTests/Composer/Template/ComposerProjectTemplatesTest.php @@ -30,7 +30,7 @@ class ComposerProjectTemplatesTest extends ComposerBuildTestBase { - protected const MINIMUM_STABILITY = 'stable'; + protected const MINIMUM_STABILITY = 'beta';
π€ Arguably, this is wrong. Or rather, the assertions associated with this are wrong:
$project_stability = VersionParser::parseStability($project['version']); β¦ $this->assertGreaterThanOrEqual($minimum_stability_order_index, $project_stability_order_index, sprintf( "Dependency %s with stability %s does not meet minimum stability %s.", $project['name'], $project_stability, static::MINIMUM_STABILITY, )); } // At least one project should be at the minimum stability. $this->assertContains(static::MINIMUM_STABILITY, $project_stabilities);
This is wrong because it means that this test is testing something that violates Composer's stability flags:
They take the form "constraint@stability flag". These allow you to further restrict or expand the stability of a package beyond the scope of the minimum-stability setting. You can apply them to a constraint, or apply them to an empty constraint if you want to allow unstable packages of a dependency for example.
Whenever a stability flag is encountered, it should be special-cased.
OTOH this comment in the test:
// Ensure that static::MINIMUM_STABILITY is the same as the least stable // dependency. // - We can't set it stricter than our least stable dependency. // - We don't want to set it looser than we need to, because we don't want // to in the future accidentally commit a dependency that regresses our // actual stability requirement without us explicitly changing this // constant.
explains WHY we are doing it this specific way.
So β¦ π
-
- last update
over 1 year ago 29,953 pass - π¬π§United Kingdom catch
Is this really acceptable?
We have test coverage that when we tag an rc (I think) will fail if the minimum stability doesn't match - so it becomes rc-blocking to sort out. As you point out we usually only do it with Symfony because their release timelines are pretty reliable, but I think it's OK to apply the same pattern here.
- last update
over 1 year ago 29,958 pass - last update
over 1 year ago 29,946 pass, 2 fail The last submitted patch, 42: 3331078-42.patch, failed testing. View results β
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Known, unrelated random fail:
1) Drupal\Tests\Component\Utility\RandomTest::testRandomMachineNamesUniqueness RuntimeException: Unable to generate a unique random machine name
- last update
over 1 year ago 29,958 pass - last update
about 1 year ago 29,959 pass - last update
about 1 year ago 30,044 pass - last update
about 1 year ago 30,051 pass - last update
about 1 year ago 30,056 pass - last update
about 1 year ago 30,056 pass, 1 fail The last submitted patch, 42: 3331078-42.patch, failed testing. View results β
- last update
about 1 year ago 30,136 pass - πΊπΈUnited States effulgentsia
#49 looks like a random failure, but this rerolls for composer.lock changes since #42, and also updates the composer-stager requirement to beta3.
Back to RTBC, optimistically assuming it'll pass tests. Note that the RTBC is for the patch itself, but putting composer-stager under core governance still requires framework and release manager review of composer-stager itself, per this issue's tags.
As you point out we usually only do it with Symfony because their release timelines are pretty reliable, but I think it's OK to apply the same pattern here.
Yeah, in this case, part of putting composer-stager into core governance, is then its release timeline is under our control. Also, there are currently no known issues blocking a stable 2.0.0 release of composer-stager. Only thing keeping it at beta right now is that it hasn't been reviewed by any Drupal core committers other than me.
- last update
about 1 year ago 30,136 pass - last update
about 1 year ago 30,146 pass - last update
about 1 year ago 30,148 pass - last update
about 1 year ago 30,150 pass - last update
about 1 year ago 30,153 pass, 1 fail The last submitted patch, 50: 3331078-50.patch, failed testing. View results β
- last update
about 1 year ago 30,161 pass - πΊπΈUnited States effulgentsia
I think #51 is a random failure. Queued a re-test and optimistically re-RTBC'ing.
- last update
about 1 year ago 30,161 pass 18:19 17:10 Running- last update
about 1 year ago 30,168 pass - last update
about 1 year ago 30,205 pass - last update
about 1 year ago 30,363 pass - last update
about 1 year ago 30,362 pass - last update
about 1 year ago 30,348 pass, 2 fail The last submitted patch, 50: 3331078-50.patch, failed testing. View results β
- last update
about 1 year ago 30,360 pass - last update
about 1 year ago 30,362 pass - π¬π§United Kingdom catch
My main concern here is that the committer team routinely struggles to keep the RTBC queue under 150 issues at a time, and this adds a separate queue on a separate system to manage, with a code base that is entirely new to most committers.
So what I would propose is we add core committers to the github repo, but in addition to the existing maintainers, not in addition. We can figure out exactly what responsibilities are as time goes on, but an immediate switch from one set of maintainers to another doesn't seem like a good idea.
- πΊπΈUnited States xjm
Right, and core maintainers will still control which versions are pinned in
core-recommended
at least. I'd suggest this:- Current maintainers are 100% authorized to commit trivial fixes (like dev dependency updates).
- We gradually transition responsibility for substantive fixes onto core release and backend framework managers.
- Release manager signoff is required for tagging a new release of the GitHub-hosted packages.
- πΊπΈUnited States xjm
+++ b/core/tests/Drupal/BuildTests/Composer/Template/ComposerProjectTemplatesTest.php @@ -30,7 +30,7 @@ class ComposerProjectTemplatesTest extends ComposerBuildTestBase { - protected const MINIMUM_STABILITY = 'stable'; + protected const MINIMUM_STABILITY = 'beta';
This is hopefully only a temporary change, like we make between alpha and RC for core for Symfony? If so we need a followup to switch it back before 10.2.0-rc1.
- πΊπΈUnited States xjm
Also possibly we should branch 10.2.x (which we are planning to do ASAP) before we actually commit this, since needing to revert lockfile changes before RC would be messy.
- last update
about 1 year ago 30,379 pass - last update
about 1 year ago 30,377 pass - last update
about 1 year ago 30,382 pass - last update
about 1 year ago 30,392 pass - last update
about 1 year ago 30,397 pass - last update
about 1 year ago 30,397 pass - last update
about 1 year ago 30,413 pass - last update
about 1 year ago 30,417 pass - last update
about 1 year ago Patch Failed to Apply - last update
about 1 year ago Patch Failed to Apply - Status changed to Needs work
about 1 year ago 12:45pm 24 October 2023 - πΊπΈUnited States xjm
@catch and I both would really like to see some of the excess dev dependencies eliminated. If possible, let's please focus on dev deps that core already uses. E.g., seems what grumphp is doing could mostly be accomplished with phpcs and phpstan etc.? I saw https://github.com/php-tuf/composer-stager/issues/78 but in a way this is almost asking release managers to do too much work. Dev dependencies core already has for dev or prod are fine and don't even need their own evaluations, but I'd really like to see fewer additional dependencies proposed, and a strong case made as to why they are essential to the maintenance of the package.
Also, let's get a followup for #57, and an issue in the composer-stager queue to add a
GOVERNANCE.md
where we can start documenting the above stuff? - πΊπΈUnited States traviscarden
@xjm: Evaluate dev dependencies Β· Issue #78 Β· php-tuf/composer-stager has been updated with issues for each dev dependencies, including justifications for each. I've knocked off a half dozen I felt OK about eliminating without debate.
And I have created Create a governance policy Β· Issue #300 Β· php-tuf/composer-stager
- π¬π§United Kingdom catch
I've added:
Existing composer maintainers would maintain commit access to the repository, but should co-ordinate any new releases or major changes with core committers.
to the issue summary since I think that represents the current plan.
- π³πΏNew Zealand quietone
Existing maintainers would maintain commit access to the repository, but should co-ordinate any new releases or major changes with core committers.
This is reasonable place to start. And there will certainly be an evolution of the responsibilities of the roles and the points in #56 indicate a direction on that.
- πΊπΈUnited States effulgentsia
Tagging for issue summary update now that https://github.com/php-tuf/composer-stager/releases/tag/v2.0.0-beta4 was released, which removed the PHP filesyncer per π± [policy] Require rsync for automatic updates in Drupal core and punt other syncers to contrib RTBC .
- πΊπΈUnited States effulgentsia
https://github.com/php-tuf/composer-stager/issues/350 just got completed, making Composer Stager compatible with both Symfony 6 and 7, so that it's compatible with Drupal 10 and 11. So next steps for this issue are:
- Release Composer Stager 2.0.0-beta5, so the above fix is in a tagged release. Note that Composer Stager 2.0 is only in beta status because it hasn't been sufficiently reviewed yet. But as far as we know, it's complete, so we can release RC or stable at any time.
- Open an MR for this issue that adds Composer Stager ^2.0.0-beta5 to Drupal core's dependencies. See #50 for the latest patch that did this with an earlier version, but we don't do patches anymore.
- Update the issue summary of this issue for accuracy (e.g., remove the info about the PHP file syncer and check the rest of the issue summary for whether it accurately reflects the current state of Composer Stager).
- For anyone following this issue, and especially core committers, please review the Composer Stager codebase and open GitHub issues for any problems/concerns that you find.
- First commit to issue fork.
- Assigned to jofitz
- π¬π§United Kingdom jofitz
Assigning to myself as I take a first pass at the merge request
- π¬π§United Kingdom alexpott πͺπΊπ
This went in as part of β¨ Add Alpha level Experimental Package Manager module Needs review
- π¬π§United Kingdom catch
We still need to do the governance steps here. I'm not sure what's left but there's no other issue to track that in.