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

gh-205 gh-128 gh-68 Upgrade Python to 3.12, Supertokens to 9.0.2 and all backend dependencies #211

Merged
merged 16 commits into from
Jun 2, 2024
Merged
2 changes: 1 addition & 1 deletion .github/workflows/code-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
run: ./bin/check-code-formatting.sh

- name: check types
run: ./bin/check-types.sh
run: ./bin/check-code-semantics.sh

- name: run tests
run: ./bin/run-tests.sh
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Prepare Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'
cache: 'poetry'

- name: Prepare release
Expand Down
File renamed without changes.
26 changes: 19 additions & 7 deletions bin/prepare-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,20 @@ echo "Bump backend version"

cd ./ffun

export FFUN_VERSION=$(poetry version $BUMP_VERSION --short)
export FFUN_VERSION_TAG="release-$FFUN_VERSION"
export NEXT_VERSION=$(poetry version $BUMP_VERSION --short)
export NEXT_VERSION_TAG="release-$NEXT_VERSION"

echo "Install dependencies"

poetry install

echo "Update change log"

poetry run changy version create $NEXT_VERSION

echo "Generate changelog"

poetry run changy changelog create

echo "Building Python package"

Expand All @@ -23,18 +35,18 @@ cd ../site

npm version --tag-version-prefix "" $BUMP_VERSION

echo "New version is $FFUN_VERSION"
echo "New version tag $FFUN_VERSION_TAG"
echo "New version is $NEXT_VERSION"
echo "New version tag $NEXT_VERSION_TAG"

cd ..

echo "Commit changes"

git add -A
git commit -m "Release ${FFUN_VERSION}"
git commit -m "Release $NEXT_VERSION" -m "$(poetry run changy version show $NEXT_VERSION)"
git push

echo "Create tag"

git tag $FFUN_VERSION_TAG
git push origin $FFUN_VERSION_TAG
git tag $NEXT_VERSION_TAG
git push origin $NEXT_VERSION_TAG
2 changes: 2 additions & 0 deletions changes/changes_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

No changes.
6 changes: 6 additions & 0 deletions changes/header.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

# Changelog

All notable changes to this project will be documented in this file.

Generated by [Changy](https://github.com/Tiendil/changy/tree/main).
10 changes: 10 additions & 0 deletions changes/unreleased.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

Breaking changes:

- [gh-68](https://github.com/Tiendil/feeds.fun/issues/68) Supertokens services upgraded to version 9.0.2. If you are using Supertokens, you should upgrade them manually (from 5.0.0 to 9.0.2) according to the instructions in https://github.com/supertokens/supertokens-core/blob/master/CHANGELOG.md

Changes:

- [gh-128](https://github.com/Tiendil/feeds.fun/issues/128) Code migrated to Python 3.12
- [gh-128](https://github.com/Tiendil/feeds.fun/issues/128) Upgraded backend dependencies to the latest suitable versions
- [gh-205](https://github.com/Tiendil/feeds.fun/issues/205) Changelog added, with help of [Changy](https://github.com/Tiendil/changy)
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
volumes:
ffun_postgresql_data: {} # dump of prod
ffun_postgresql_data_2: {}
ffun_postgresql_data: {}


networks:
Expand All @@ -17,7 +16,7 @@ services:
image: postgres:15-bullseye

volumes:
- ffun_postgresql_data_2:/var/lib/postgresql/data
- ffun_postgresql_data:/var/lib/postgresql/data
- ./docker/postgresql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
- ./docker/postgresql/healthcheck.sh:/healthcheck.sh

Expand All @@ -42,7 +41,7 @@ services:
retries: 10

supertokens:
image: registry.supertokens.io/supertokens/supertokens-postgresql:5.0
image: registry.supertokens.io/supertokens/supertokens-postgresql:9.0.2

depends_on:
postgresql:
Expand Down Expand Up @@ -117,6 +116,7 @@ services:
volumes:
- ${PWD}/ffun:/repository
- ${PWD}/.env:/repository/.env
- ${PWD}/changes:/repository/changes

networks:
ffun_network: {}
Expand Down
2 changes: 1 addition & 1 deletion docker/backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11
FROM python:3.12

RUN pip install poetry

Expand Down
40 changes: 40 additions & 0 deletions docs/migrate_supertokens_from_5_0_0_to_9_0_2.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
* TODO 6.0.0
** TODO ensure supertokens 5.0.0 is running
** TODO stop supertokens
** TODO apply `./docs/supetokens_migrations/5_0_0_to_6_0_0.sql`
** TODO upgrade supertokens to 6.0.0
** TODO start supertokens
* TODO 7.0.0
** TODO stop supertokens
** TODO upgrade supertokens to 6.0.13
** TODO start supertokens
** TODO stop supertokens
** TODO apply `./docs/supetokens_migrations/6_0_13_to_7_0_0.sql`
** TODO upgrade supertokens to 7.0.0
** TODO start supertokens
* TODO 7.0.13
** TODO stop supertokens
** TODO upgrade supertokens to 7.0.12
** TODO start supertokens
** TODO stop supertokens
** TODO apply `./docs/supetokens_migrations/7_0_12_to_7_0_13.sql`
* TODO 8.0.0
** TODO stop supertokens
** TODO upgrade supertokens to 7.0.18
** TODO start supertokens
** TODO stop supertokens
** TODO apply `./docs/supetokens_migrations/7_0_18_to_8_0_0.sql`
** TODO upgrade supertokens to 8.0.0
** TODO start supertokens
* TODO 9.0.0
** TODO stop supertokens
** TODO upgrade supertokens to 8.0.1
** TODO start supertokens
** TODO stop supertokens
** TODO apply `./docs/supetokens_migrations/8_0_1_to_9_0_0.sql`
** TODO upgrade supertokens to 9.0.0
** TODO start supertokens
* TODO 9.0.2
** TODO stop supertokens
** TODO upgrade supertokens to 9.0.2
** TODO start supertokens
Loading
Loading