-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to Trac 1.6 and Python 3.8 #157
Conversation
685a68d
to
06021a7
Compare
@felixxm I'm running into some problems here trying to update the According to my initial plan (#148) I want Python 3.7 but because that version is not supported anymore I'm struggling to find a base image I can use. Even Ubuntu 20.04 (focal) ships with Python 3.8 I think (1). Do you think I should revise my upgrade plan (maybe hop over a Django version at the same time as the Trac upgrade)? Or do you know a base docker image I could use? Thanks! EDIT: Another possible solution would be to use Python 3.8 with Django 1.11. Even though they're not officially compatible it seems to work (the new test suite from #171 passes and the site seems to run correctly locally). Maybe that's the best (or least bad) solution? |
06021a7
to
8182463
Compare
oauthlib==2.1.0 | ||
requests==2.20.1 | ||
requests-oauthlib==1.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these 3 packages required even without bumping to the Trac 1.6?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're required for the "log in with github" functionality provided by trac-github
.I was able to remove the lines from the requirements here because I'm using the [oauth]
extra of trac-github[oauth]
which install them automatically.
We could make this change to our requirements file already without updating Trac, yes, but it doesn't (shouldn't?) have any effect in practice because the dependencies are installed anyway. It only serves to reduce the size of the requirements file.
Since these are mostly Docker-related changes I need a second pair of eyes 🦅 @tobiasmcnulty Can you take a look? |
8182463
to
d067b94
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 The image builds and runs, and the changes look reasonable to me! Thanks or getting us off 2️⃣.7️⃣
A couple questions:
- Do you anticipate any deployment changes being needed? I didn't see any, just double checking.
- If there is an issue during the deploy, we could in theory roll back to the previous docker image, yes?
@@ -10,12 +10,12 @@ set -e | |||
# database = postgres://... | |||
|
|||
for var in "${!TRAC_INI_@}"; do | |||
sed -i "s;^${var:9} = .*;${var:9} = ${!var};" trac-env/conf/trac.ini | |||
sed -i "s;^${var:9} = .*;${var:9} = ${!var};" /code/trac-env/conf/trac.ini | |||
done | |||
|
|||
if [ "x$TRAC_COLLECT_STATIC" = 'xon' ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the future -- perhaps we could use a similar trick to allow upgrade to be run more easily, when it is needed? (Not now.)
dae6262
to
de92b4a
Compare
I've updated the PR after Tobias's comments.
I tried to keep the changes to a minimum and in particular when it comes to volumes, ports, ... As far as I can tell, it should "just" be a matter of deploying the new image and everything should keep working.
I believe so, yes. The 1.4 -> 1.6 Trac update doesn't require and db upgrade, so I believe it should be easy to roll it back by deploying the previous image. |
a2967f6
to
8424107
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This builds and runs for me. Nice work! 🚀
Full disclosure: I don't have a functional database locally, but I got as far as I did on main
and the running site looks the same to me.
Still running Django 1.11 which is technically not compatible with Python 3.8 but our test suite seems to pass.
8424107
to
d9356b4
Compare
I think this PR is finally ready:
trac-github
in the requirements while we wait for a new release (my PR is still pending: Add support for Trac 1.6 and Python3 trac-hacks/trac-github#141)noshadows
script didn't detect new CSS that might need fixingShall we move into the future of Python3? 🐍 🐍 🐍
Refs #148