Page MenuHomePhabricator

Reset fr-tech drush repo, create sub-repo for vendor
Closed, InvalidPublic

Description

For the fundraising Drupal instance, we have been relying on a Debian package of drush, the Drupal command-line tool. That package doesn't exist in Debian Buster.

We do have a repository in Gerrit for drush, but it hasn't been updated in years and is proving difficult to bring up to date with upstream.

Could you please reset wikimedia/fundraising/crm/drush to point to the latest commit in the 7.x branch of https://github.com/drush-ops/drush ? That sha1 is currently 22220827e48f774.

Drush now relies on composer to install dependencies. We need to check in everything to Gerrit since we can't run composer in our install process. Following our pattern with other repos, we would like a vendor submodule with its own repo at wikimedia/fundraising/crm/drush/vendor. Could you please create that for us (empty)?

Event Timeline

Mentioned in SAL (#wikimedia-releng) [2020-04-09T10:07:36Z] <hashar> gerrit: created empty repository wikimedia/fundraising/crm/drush/vendor owned by fundraising. # T249547

I have created the empty repository https://gerrit.wikimedia.org/r/#/admin/projects/wikimedia/fundraising/crm/drush/vendor . It inherits access rights from the parent repository which is owned by https://gerrit.wikimedia.org/r/#/admin/groups/28,members fundraising group. So you should be able to publish stuff to it.


In Gerrit the default branch is the master branch and it seems to be based ahead 6.0.0:

$ git describe origin/master 
6.0.0-197-g986ee66e

With 986ee66e2cffbf8031e85428eb27966117f7b1f5 adding the Console_Table dependency in ./lib. From Gerrit, that is apparently the only change we have made to the repository https://gerrit.wikimedia.org/r/#/q/project:wikimedia/fundraising/crm/drush

So what we can do is:

  • sync all the branches in Gerrit to bring them up to date with Github (and I guess loose the above commit made to master).
    • alternatively, just sync the 7.x branch

For the import from github we can do:

git clone 
git ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/drush
cd drush
git remote add github https://github.com/drush-ops/drush
git fetch github

The master branch will have to be force pushed:

git push -f origin github/master:master

Then push the tags and branches:

git push origin --tags
git push origin github/heads/*:heads/*

Which should sync all the remote branches. Or just update the ones we want:

git push origin github/heads/7.x:7.x

Bonus:

  • if you need to cherry pick commits on top of upstream branch, we could create a wmf specific branch such as wmf/7.x and initialize it to point to the commit which is the head of 7.x.
  • the Gerrit repository can be made to default to that wmf/7.x branch (at https://gerrit.wikimedia.org/r/#/admin/projects/wikimedia/fundraising/crm/drush,branches change HEAD to point to wmf/7.x). This way when one clones the repository, git clone would checkout the wmf/7.x branch.

My working hours are currently shifted to more or less US East coast. I will be happy to pair it with you @Ejegg :]

hashar triaged this task as High priority.
hashar moved this task from Bugs & stuff to Repo Admin on the Gerrit board.
hashar removed a project: Release-Engineering-Team.

@Ejegg let me know if you need any further assistance :)