Problem/Motivation

Follow up to #3245770: Create a service to composer install via package_manager from Automatic Updates

Project Browser will probably filter out modules that have already been installed. But in the case that the browser presents a project that is not installed and before the "Download" button clicked it is possible the project may have installed by another user.

Proposed resolution

Implement a listener to that listens to most of the Pre*Events for package_manager and ensure the project doesn't already exist in the project. Throw an error if the project is present.

Remaining tasks

  • ✅ File an issue about this project
  • ☐ Addition/Change/Update/Fix to this project
  • ☐ Testing to ensure no regression
  • ☐ Automated unit/functional testing coverage
  • ☐ Developer Documentation support on feature change/addition
  • ☐ User Guide Documentation support on feature change/addition
  • ☐ Code review from 1 Drupal core team member
  • ☐ Full testing and approval
  • ☐ Credit contributors
  • ☐ Review with the product owner
  • ☐ Release

User interface changes

API changes

Data model changes

Release notes snippet

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

tedbow created an issue. See original summary.

tedbow’s picture

omkar.podey made their first commit to this issue’s fork.

omkar.podey’s picture

Assigned: Unassigned » omkar.podey

Note - Should not be merged until 3245770 gets merged.

omkar.podey’s picture

Status: Active » Needs review
omkar.podey’s picture

Assigned: omkar.podey » Unassigned
omkar.podey’s picture

Issue summary: View changes
phenaproxima’s picture

Status: Needs review » Needs work

I think this is coming along, but it's a little unfocused and feels like some parts of it were copied-and-pasted from another validator. I've left a few comments in an effort to clarify what we're trying to do, and remove code that is not necessary to the task at hand.

omkar.podey’s picture

Status: Needs work » Needs review
tedbow’s picture

Title: Create package_manager validator to ensure the project to installed is not already in the project » Create package_manager validator to ensure the project to be installed is not already in the know to Composer
tedbow’s picture

Status: Needs review » Needs work

Looking pretty good!

tedbow’s picture

Title: Create package_manager validator to ensure the project to be installed is not already in the know to Composer » Create package_manager validator to ensure the project to be installed is not already installed by Composer

Needs work for merge request comments

omkar.podey’s picture

Status: Needs work » Needs review
tedbow’s picture

Issue summary: View changes
tedbow’s picture

Status: Needs review » Reviewed & tested by the community

Looks good. @omkar.podey thanks for all the work!

narendrar’s picture

tim.plunkett’s picture

Status: Reviewed & tested by the community » Needs work
omkar.podey’s picture

Assigned: Unassigned » omkar.podey
omkar.podey’s picture

omkar.podey’s picture

For this test to pass first #3310000: RequireEventTrait should default unspecified version constraints to * this needs to be merged.

omkar.podey’s picture

Status: Needs work » Needs review
phenaproxima’s picture

Title: Create package_manager validator to ensure the project to be installed is not already installed by Composer » [PP-1] Create package_manager validator to ensure the project to be installed is not already installed by Composer
Status: Needs review » Postponed
tim.plunkett’s picture

Title: [PP-1] Create package_manager validator to ensure the project to be installed is not already installed by Composer » Create package_manager validator to ensure the project to be installed is not already installed by Composer
Status: Postponed » Needs review

That landed!

omkar.podey’s picture

Status: Needs review » Needs work
omkar.podey’s picture

Status: Needs work » Needs review
traviscarden’s picture

Status: Needs review » Needs work
omkar.podey’s picture

Blocked on Upstream Changes, failures are unreleated to the issue.

omkar.podey’s picture

Status: Needs work » Needs review
phenaproxima’s picture

Status: Needs review » Reviewed & tested by the community

This looks straightforward to me.

tim.plunkett’s picture

Assigned: omkar.podey » Unassigned
Status: Reviewed & tested by the community » Fixed

Merged, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.