ORES/Prepare deployment
< ORES
Push LFS data to gerrit
There's a known issue with LFS data not being mirrored via phabricator's diffusion to gerrit (Phab:T212818). So we need to manually do that ourselves for the time being.
Using a local version of the repository with a github.com origin, you need to pull down all the LFS content and then push it to gerrit directly.
Add a `gerrit` remote to your github.com clone
For example, for the editquality repo, we have the following lines in ./.git/config.
[remote "origin"] url = https://github.com/wikimedia/editquality fetch = +refs/heads/*:refs/remotes/origin/* [remote "gerrit"] url = https://gerrit.wikimedia.org/r/scoring/ores/editquality fetch = +refs/heads/*:refs/remotes/gerrit/*
Pull and push LFS data
For each repository where changes were made in LFS and the repos main origin is on github, you'll need to pull and push LFS data.
$ git lfs fetch --all $ git lfs push gerrit master
Update the deploy repository
- Update all of the submodules
- In the deploy repo, cd submodules/<submodule> and run git pull origin master
- If necessary, make any updates to requirements.txt in the deploy repo
- If necessary, make any changes to config/00-main.yaml -- e.g. add new models
- Update frozen-requirements.txt
- In the deploy repo, run make -- this will re-generate the complete set of dependencies for running ORES
- Review frozen-requirements.txt with git diff frozen-requirements.txt to see if any strange new packages appeared or any package was downgraded.
- Note that sometimes, strange versions appear when requirements.txt was not updated or the submodules have requirements.txt that disagree on versions. Double-check each of those requirements.txt files if you see anything weird.
Update wheels
- Copy the new wheels to the wheels repo
- From a clone of the `wheels` repo, run cp ../deploy/wheels/*.whl .
- Update the wheels repo
- run `git status`
- for modified files, we're going to just re-check them out git checkout <filename>
- for "untracked" files, we're going to remove the old version of the same package and add the new one
- `git rm <old-file> && git add <new-file>` -- e.g., `git rm revscoring-2.5.2-py2.py3-none-any.whl && git add revscoring-2.6.1-py2.py3-none-any.whl`
- if no old version exists, this is a new dependency so you can just `git add <new-file>`
- run `git status`
- Submit a new patchset with git review -R
After the change to wheels is merged: Submit the deploy repo changes for review
- Update the wheels submodule
- From the clone of the deploy repo, cd submodules/wheels and run git pull origin master
- Then cd ../..
- And git commit
- Submit a new patchset
- From the clone of the deploy repo, run git review -R