WikiWatershed / model-my-watershed

The web application front end for Model My Watershed.
https://modelmywatershed.org
Apache License 2.0
57 stars 31 forks source link

Upgrade to Ubuntu 22.04, Python 3.10 #3631

Closed rajadain closed 2 months ago

rajadain commented 2 months ago

Overview

Upgrades the development and runtime VMs to Ubuntu 22.04, and the environment to Python 3.10. This is done in preparation for #3628 which needs Python 3.10 for pystac-client.

The big consequences of this change are:

Closes #3629

Demo

Here's this branch deployed to staging: https://staging.modelmywatershed.org/

image
$ xh staging.modelmywatershed.org/version.txt

HTTP/1.1 200 OK
Connection: keep-alive
Content-Encoding: gzip
Content-Length: 100
Content-Type: text/plain
Date: Wed, 03 Jul 2024 18:55:05 GMT
Etag: W/"66858e35-59"
Last-Modified: Wed, 03 Jul 2024 17:45:25 GMT
Server: nginx
Vary: Accept-Encoding

origin/tt/3629/upgrade-ubuntu-python 1.35.0-26-g16a4920ca31cd2a000cac1e7970ec8de4896c706

Notes

This required the updating of GWLF-E to work with Python 3.10 https://github.com/WikiWatershed/gwlf-e/pull/95 and subsequent release to PyPI https://pypi.org/project/gwlf-e/3.2.0/

This also required significant changes / upgrades to the CivicCI01 Jenkins server. Model My Watershed is the only active project on that server, which made making changes a little safer. All the CI jobs are now passing: http://civicci01.phl.corp.element84.com/view/mmw/

Testing Instructions

[!NOTE] Delineating watersheds will not work on staging right now. This is a known issue https://github.com/WikiWatershed/rapid-watershed-delineation/issues/83

[!WARNING] These instructions will take multiple hours to run and will fully engage your computer. Reviewers are advised to trigger the commands during off hours and check back later to see progress.

rajadain commented 2 months ago

The geoprocessing service should be fixed in 45e4f4d. I haven't seen the other error before, running that command now to see if I encounter it.

rajadain commented 2 months ago

Destroy and recreated the app VM, now seeing that error too. Likely an issue with gwlf-e packaging. Will look into it.

rajadain commented 2 months ago

The numpy issues should be fixed in 4c1fe4f and be5b2c0, as already reviewed in https://github.com/WikiWatershed/gwlf-e/pull/101#pullrequestreview-2164557941.

Since you've already provisioned the VM for the review above, try running the failing command above again:

vagrant ssh app -c 'cd /vagrant && ./scripts/aws/setupdb.sh -dmpq'

If it succeeds, then we can probably approve this PR for now, especially because this version is also deployed to staging and is testing well there: https://staging.modelmywatershed.org/.

You'll have to do reinstall the other datasets for the future, but that is a time taking operation and can be deferred till after this review:

vagrant ssh app -c 'cd /vagrant && ./scripts/aws/setupdb.sh -bc' &&
vagrant ssh app -c 'cd /vagrant && ./scripts/aws/setupdb.sh -sS'
rajadain commented 2 months ago

Thanks for reviewing! Squashed fixups, will merge once green.