Conversation
|
Since you're here... what do you think about adding a docs guide page about the process for testing these kinds of updates (as you found in #23 (comment) and #53 (comment)) |
i think its a good idea! i'm on the fence regarding whether to tackle a draft assuming the current state of affairs or do it more aspirationally (given #73). |
|
I think this is a good, immediate solution for the problem we are seeing in #71 👍 An alternative (or follow-up) that would probably take more effort, would be to run the |
|
interesting idea @lalver1! to be honest it didn't even occur to me that we could continue to use a hosted runner and rely on a container to give us the exact runtime we want. 🤯 i think there's value in pinning the major OS version in our containers regardless but i'm definitely on board with exploring your idea in earnest if we end up wanting to lay down |
|
just pushed up another commit to add the Guide @thekaveman requested. f2b4f0b i don't think deploy previews are wired up in this repo, so here's a screenshot.
i'm keen to dogfood these steps and test out a Python 3.14 upgrade, but given that slush is coming to a close the prudent thing to do would probably be to save that as a stretch goal after (or simultaneous to) #73. |
Scotchester
left a comment
There was a problem hiding this comment.
Thanks for the testing guide! Went through it all and everything seemed to work just fine. I've got a few suggestions for the new guide just to add a little clarity / reduce possible oversights.
docs/guides/testing-changes.md
Outdated
| Each time we update the underlying version of Python or the base OS the steps below are a good way to verify compatibility. | ||
|
|
||
| - Make sure the change is compatible with the python dependencies of dependent projects | ||
| - Rebuild the local image - `docker compose build app --no-cache` |
There was a problem hiding this comment.
A content suggestion, and a suggestion to make the command copyable. Doing so also requires adding content.code.copy to the theme.features. list in mkdocs.yml
(Also note that I can't include the closing triple backticks in this suggestion due to GitHub using them for the suggestion syntax itself.)
| - Rebuild the local image - `docker compose build app --no-cache` | |
| - From your `docker-python-web` repository, rebuild the local image: | |
| ```bash | |
| docker compose build app --no-cache |
docs/guides/testing-changes.md
Outdated
|
|
||
| ## Test [Benefits](https://docs.calitp.org/benefits/) with the updated local base image | ||
|
|
||
| 1. Update Benefits Dockerfile to use `docker-python-web:app` |
There was a problem hiding this comment.
| 1. Update Benefits Dockerfile to use `docker-python-web:app` | |
| 1. Update `appcontainer/Dockerfile` to use `docker-python-web:app` (remove the `ghcr.io/cal-itp/` and replace `main` with `app`) |
There was a problem hiding this comment.
i went one step further and made this a block comment because it seemed helpful to show the exact string to search/replace. a6815ba
docs/guides/testing-changes.md
Outdated
|
|
||
| ## Test [eligibility-server](https://docs.calitp.org/eligibility-server/) with the updated local base image | ||
|
|
||
| 1. Update eligibility-server Dockerfile to use `docker-python-web:app` |
There was a problem hiding this comment.
| 1. Update eligibility-server Dockerfile to use `docker-python-web:app` | |
| 1. Update `./Dockerfile` to use `docker-python-web:app` (remove the `ghcr.io/cal-itp/` and replace `main` with `app`) |
| 1. Verify that unit tests pass | ||
|
|
||
| ## Test [eligibility-server](https://docs.calitp.org/eligibility-server/) with the updated local base image | ||
|
|
There was a problem hiding this comment.
| In your `eligibility-server` repository: | |
docs/guides/testing-changes.md
Outdated
| 1. Rebuild eligibility-server image - `docker compose build server --no-cache` | ||
| 1. Open eligibility-server devcontainer with "Rebuild Without Cache and Reopen in Container" | ||
| 1. Verify that unit tests pass | ||
| 1. Point Benefits compose.yml at local `eligibility_server:latest` image |
There was a problem hiding this comment.
Uncertain if the rebuild I'm mentioning below needs to be without cache or not.
| 1. Point Benefits compose.yml at local `eligibility_server:latest` image | |
| And confirm the update works in Benefits: | |
| 1. Point Benefits `./compose.yml`'s `server` service at local `eligibility_server:latest` image | |
| 1. Rebuild the devcontainer |
There was a problem hiding this comment.
i've been seeing rebuilds fetch updated images even without blowing away the cache.
|
thx @Scotchester. i liked all your suggestions and fixed the port forwarding while i was in there. now that i'm writing this i realize i should update the README to make it clear where to look for the docs because i was as confused as you were initially. |
done in b6dbdd5. i snuck in a fix for file watching too 😈 |
thekaveman
left a comment
There was a problem hiding this comment.
Requesting that we come back to this post-Sprint
thekaveman
left a comment
There was a problem hiding this comment.
Sorry. I'm realizing this will probably be annoying for a number of the Sprint tickets we have around new agency group / regions pages that will have copy implications.
docs/requirements.txt
Outdated
| # https://github.com/mkdocs/mkdocs/issues/4032 | ||
| # https://github.com/pallets/click/issues/3084 | ||
| # Remove when a fixed version of Click has been released | ||
| click==8.2.1 |
There was a problem hiding this comment.
note to self: try unpinning click and passing --live-reload here instead
Line 29 in 8e28e38
|
Found another (possible) reason this PR would be useful sooner than later: cal-itp/benefits#3563 (comment) |
all good. i agree there's value in landing this one as-is.
no idea why, but i didn't get notified that @thekaveman approved earlier this morning. sorry about that! i pushed one last commit (08d0334) after realizing there's new guidance to get live reload working without having to pin 'click'. |
compose.yml
Outdated
| image: docker-python-web:dev | ||
| entrypoint: mkdocs | ||
| command: serve --dev-addr "0.0.0.0:8001" | ||
| command: 'serve --livereload --dev-addr "0.0.0.0:8001"' |
There was a problem hiding this comment.
The outer quotes shouldn't be necessary here
| command: 'serve --livereload --dev-addr "0.0.0.0:8001"' | |
| command: serve --livereload --dev-addr "0.0.0.0:8001" |

closes #71
i built the image locally and tested a handful of different benefits flows successfully
main)if we have the appetite for bumping to
python:3.14while we're at it, just say the word. i definitely feel comfortable following the testing and follow-up steps outlined in #23 and #51 now and i'd be happy to verify that all is well in eligibility-server and complete the relevant follow-up steps.