Skip to content
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 All The Things October 2024 #477

Merged
merged 16 commits into from
Oct 30, 2024
Merged

Update All The Things October 2024 #477

merged 16 commits into from
Oct 30, 2024

Conversation

vossisboss
Copy link
Contributor

Started a branch with @cnk to bump to Wagtail 6.2

@Stormheg
Copy link
Member

@vossisboss let me know if you need reviews or help 😄

@vossisboss vossisboss temporarily deployed to wagtail-org-staging October 23, 2024 21:08 Inactive
@vossisboss vossisboss temporarily deployed to wagtail-org-staging October 24, 2024 14:26 Inactive
@vossisboss vossisboss temporarily deployed to wagtail-org-staging October 24, 2024 15:37 Inactive
@vossisboss
Copy link
Contributor Author

vossisboss commented Oct 24, 2024

Hey @Stormheg and/or @cnk, you mind having a look at the linter error that is popping up? I'm not sure why flake8 is flagging needs_sponsorship in the models.py file of the roadmap app. Seems odd to me.

@laymonage
Copy link
Member

Huh, looks like I made a mistake in 2ecbe81 where I should've also removed the field definition from the model:

needs_sponsorship = models.BooleanField(default=False, editable=False)

It should be OK to remove it, its functionality has been replaced by the needs_sponsorship cached property that looks at the labels from GitHub rather than it being a model field:

@cached_property
def needs_sponsorship(self):
return self.NEEDS_SPONSORSHIP_LABEL in self.labels_set

That property overwrites the model field in the same namespace, hence flake8 tripped. I guess since you updated the linter versions in a commit in this PR, that means it's a new rule added by flake8 in newer versions. Could you try removing that BooleanField and see if it works @vossisboss? Thank you for working on this!

@vossisboss vossisboss temporarily deployed to wagtail-org-staging October 25, 2024 23:09 Inactive
@vossisboss vossisboss changed the title Bump to Wagtail 6.2.2 Update All The Things October 2024 Oct 25, 2024
@vossisboss vossisboss marked this pull request as ready for review October 25, 2024 23:22
@vossisboss
Copy link
Contributor Author

The final bits still needs to deploy to staging, but overall this is ready for a review. Could I interest either @Stormheg or @cnk or @zerolab in reviewing this upgrade before we go live.

Also FYI @RealOrangeOne I added the Postgres upgrade here before I saw your PR.

Dockerfile Outdated Show resolved Hide resolved
Comment on lines 19 to 22
uses: actions/setup-python@v3
with:
python-version: '3.11'
python-version: '3.12'
- uses: actions/setup-node@v3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be an excellent opportunity to upgrade the versions of the actions we use ;)

Copy link
Member

@Stormheg Stormheg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gave this a go locally. I don't have a representative database backup so I cannot test every aspect, assuming someone will test this on staging (staging site appears to be in maintenance mode?)

It looks like none of the upgrade considerations in the 6.2 release notes affect us, so should be straightforward to upgrade.

We should be sure the production database is also on Postgres 16 or better before we release, as noted by Dan

@vossisboss
Copy link
Contributor Author

@Stormheg, our production database was force upgraded about a week or so ago, so we're definitely on the correct version.

I will give this one more look later today or tomorrow then merge this.

Co-authored-by: Dan Braghiș <[email protected]>
@vossisboss
Copy link
Contributor Author

@zerolab The bookworm build failed on staging. Here is the key error. You can poke at the full log on Heroku if you want. Have we used bookworm elsewhere with no issues? Just wondering if it's worth pushing this or if we should stick to bullseye for this iteration of the site.

E: Unable to locate package postgresql-client-13
The command '/bin/sh -c apt-get update --yes --quiet &&     apt-get install -y apt-transport-https rsync libmagickwand-dev unzip postgresql-client-13     jpegoptim pngquant gifsicle libjpeg-progs webp &&     rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100

@cnk
Copy link
Member

cnk commented Oct 29, 2024

I find this page a little confusing but I suspect what we want is postgres-client-15 to go with the newer base image

@vossisboss vossisboss temporarily deployed to wagtail-org-staging October 29, 2024 20:00 Inactive
@vossisboss
Copy link
Contributor Author

I'm not sure where and how we would set that @cnk? The Dockerfile? Looks like the bullseye deployment is working fine, so I'm not sure I'm really inclined to dig into this unless there are some amazing reasons to use bookworm.

@Stormheg
Copy link
Member

Stormheg commented Oct 29, 2024

@vossisboss I pushed a commit that should fix the dockerfile.

'bullseye' and 'bookworm' are - Toy Story inspired - codenames for Debian, the operating system the Docker containers use. Bullseye (Debian 11) is not receiving security updates anymore: https://endoflife.date/debian

@cnk
Copy link
Member

cnk commented Oct 29, 2024

@vossisboss I tried @Stormheg's update from an hour ago and it works great. I had to export and reimport my database to upgrade the postgres server version but that was the only extra step to run this upgrade vs current main branch. I think this is ready to go to the Heroku staging server when you have a chance.

@vossisboss vossisboss temporarily deployed to wagtail-org-staging October 30, 2024 14:34 Inactive
@vossisboss
Copy link
Contributor Author

Yeah, a lack of security updates is DEFINITELY a good reason to switch then. Testing this on staging. Then hopefully we can get this up on production. BTW, I think @cnk has staging access. @Stormheg if you want staging access, I can get that set up for you.

@vossisboss vossisboss merged commit b2e65c2 into main Oct 30, 2024
3 checks passed
@zerolab zerolab deleted the chore/wagtail62 branch October 30, 2024 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants