Page MenuHomePhabricator

Add branch hosting to Query Builder integration pipeline
Closed, ResolvedPublic

Description

While on GitHub, we deployed the branch of every pull request to Netlify. While that was initially intended for Browser testing, we ended up not using it for that purpose because we decided to use Cypress and the dev server for that purpose.
However, it turned out that branch hosting is very useful in order to give UX a chance to review a Pull Request before it is merged.

We should look into making this possible again. Either by creating a new Jenkins job to deploy to Netlify again or by deploying the patches to some internally hosted platform.

Ideally, there would be only one deploy-target for each patch that is then subsequently updated with every patchset.

This could also be (something similar to) https://patchdemo.wmflabs.org/ if we do not want to use Netlify or verecel.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I would see this has happening 1 of 2 ways, either:

  • We create some simple tool on cloud vps etc that can take simple static sites and host them (netlify clone)
  • We create a jenkins job to just use netlify and do the same thing that we were doing in GIthub Actions
Michael triaged this task as Medium priority.Apr 9 2021, 11:25 AM

Similarly to T278705, this also was functionality that we used to have on GitHub and lost when switching to Gerrit. While it won't help us much for the current hike anymore, the learning would be valuable both for the Wikidata/Wikibase team to reuse in other projects and the engineer who implements it.

Michael renamed this task from Add branch hosting to Query Builder integration pipline to Add branch hosting to Query Builder integration pipeline.Apr 12 2021, 8:11 AM

Change 683589 had a related patch set uploaded (by Michael Große; author: Michael Große):

[integration/config@master] [DNM yet] Add and use job to deploy branch in node project

https://gerrit.wikimedia.org/r/683589

Change 683674 had a related patch set uploaded (by Michael Große; author: Michael Große):

[wikidata/query-builder@master] Add npm script for wmf CI to call

https://gerrit.wikimedia.org/r/683674

Addshore lowered the priority of this task from Medium to Low.Jul 14 2021, 11:13 AM

Change 683589 merged by jenkins-bot:

[integration/config@master] Add and use job to deploy branch in node project

https://gerrit.wikimedia.org/r/683589

Change 721581 had a related patch set uploaded (by Addshore; author: Addshore):

[integration/config@master] Promote branchdeploy for query-builder to test

https://gerrit.wikimedia.org/r/721581

Change 683674 merged by jenkins-bot:

[wikidata/query-builder@master] Add npm script for wmf CI to call

https://gerrit.wikimedia.org/r/683674

Change 721581 merged by jenkins-bot:

[integration/config@master] Promote branchdeploy for query-builder to test

https://gerrit.wikimedia.org/r/721581

Successfully tested it in the wild at https://gerrit.wikimedia.org/r/c/wikidata/query-builder/+/683674 🙌

I think this task can be closed as verified! 😊

Ideas for future improvements:

  • have it get a stable deploy URL per Gerrit Change (maybe based on something like repo+Change-Id)
  • have it comment that deploy URL to the Gerrit Change once, so it is easier to access

How does this work? How do I use it? I just submitted a Query Builder change and didn’t notice any Netlify URLs…

How does this work? How do I use it? I just submitted a Query Builder change and didn’t notice any Netlify URLs…

The branch hosting job is now part of the standard Query Builder "test" pipeline. That's the reason I commented "recheck" there to try it out after it was added in the integration-config: https://gerrit.wikimedia.org/r/c/wikidata/query-builder/+/721504

You get to the Netlify URL by clicking into the job's console logs:

image.png (667×1 px, 142 KB)