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

v3.3.0 #989

Merged
merged 445 commits into from
Jul 19, 2024
Merged

v3.3.0 #989

merged 445 commits into from
Jul 19, 2024

Conversation

zurdi15
Copy link
Member

@zurdi15 zurdi15 commented Jul 9, 2024

What's Changed

New Contributors

gantoine and others added 30 commits June 21, 2024 13:03
Install redis instead of building in Dockerfile
This change moves the virtualenv creation in the `Dockerfile` to a
separate stage, to simplify isolating the process and reduce the need
for uninstalling build dependencies.

The approach is similar to the one explained in [1]. It relies on
building a virtualenv folder, and copying it in the final stage.
Changing the `PATH` environment variable makes the virtualenv usable by
default, without affecting the default Python installation.

Also, added Dockerfile arguments for Alpine, nginx, and Python versions,
as some of them are reused, and also simplifies testing new versions.

An extra side effect is that the image size for the final stage is
reduced from 315MB to 262MB.

[1] https://scribe.rip/@albertazzir/blazing-fast-python-docker-builds-with-poetry-a78a66f5aed0
Avoid any changes in the `frontend/` folder to trigger `npm install`.
Instead, split the copies to have separate steps for install and build.
Improve efficiency on reusable regular expressions, by compiling them.
`fakeredis` is only needed when running tests, so we can move it to the
`test` dependency group.
misc: Simplify backend environment configuration in Docker image
misc: Compile constant regular expressions
…ependency

misc: Move fakeredis to test dependencies
…ing-on-frontend-changes

fix: Improve Docker layer caching on frontend changes
`aioredis` is abandoned, and has been replaced by `redis.asyncio`.

Currently, the project doesn't use `aioredis` directly, but depends on
it for `socketio.AsyncRedisManager`. This change is safe, as `socketio`
has been prioritizing `redis.asyncio` over `aioredis` since `v5.6.0` [1].

[1] miguelgrinberg/python-socketio@0e7691b
Changes automatically made by
[`pyupgrade`](https://github.com/asottile/pyupgrade), using the
`--py311-plus` flag, to be compatible with Python 3.11.
Poetry 1.8.0 already includes support for `package-mode = false`, so
there's no need to install a Poetry fork anymore.
fix: Remove abandoned dependency aioredis
misc: Apply changes generated by pyupgrade
…y-fork

misc: Remove mentions to unneeded Poetry fork
Copy link

github-actions bot commented Jul 9, 2024

Test Results

72 tests   72 ✅  20s ⏱️
 1 suites   0 💤
 1 files     0 ❌

Results for commit dd4f9e4.

♻️ This comment has been updated with latest results.

zurdi15 and others added 27 commits July 9, 2024 15:01
Co-authored-by: Georges-Antoine Assi <3247106+gantoine@users.noreply.github.com>
This change avoids blocking requests when retrieving covers from
SteamGridDB, which is the main bottleneck as the current implementation
iterates over paginated results for multiple games.

Using an asynchronous client like `httpx` provides a good performance
improvement, and reduces the latency when calling this endpoint.
Also, the inclusion of FastAPI `lifespan` allows instantiating a single
client on startup.

When testing with "Final Fantasy V Advance", the endpoint goes from ~9s
to ~1.5s to retrieve all covers.
feat: Use async requests to retrieve SteamGridDB covers
Avoid orphan collections table on migration fail
Have navigation guards return true or explicitly call next
`os.walk` is a generator that can iteratively navigate from the
specified path, top-bottom. However, most of the calls to `os.walk` in
the project cast the call to `list()`, which makes it traverse the path
and recursively find all nested directories.

This is commonly not needed, as we end up just using a `[0]` index to
only access the root path.

This change adds a few utils that simplifies listing files/directories,
and by default does it non-recursively. Performance gains shouldn't be
noticeable in systems with high-speed storage, but we can avoid the edge
cases of users having too many nested directories, by avoiding unneeded
I/O.
With the introduction of non-paginated responses for ROMs, JSON
responses for big collection could easily be at >1MiB.

This change adds a FastAPI-provided middleware to enable GZip
compression for responses greater than 1KiB.
…os-walk

fix: Avoid recursive os.walk calls
misc: Enable GZip compression for backend responses
Fix covers deleted when uploading extension other then PNG
[ROMM-1003] Fix aborting mid-scan
The existing code was failing after changes on the upstream JSON file
that included entries with `null` ID.
…pty-product-id

fix: Filter Switch titledb entries with empty id
Catch and ignore json decode errors in 0022 migration
@zurdi15 zurdi15 marked this pull request as ready for review July 19, 2024 21:19
@zurdi15 zurdi15 merged commit 0eac452 into release Jul 19, 2024
6 of 9 checks passed
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.

3 participants