Prepare wanted-search tests and CI for normalization work - #3383
Conversation
Align requests floor with vendored runtime
Add shared wanted-search fixture layer Cover wanted-search fixtures with focused tests
| requests>=2.33.0 | ||
| PyYAML>=6.0.3 | ||
| whichcraft>=0.6.1 | ||
| dogpile.cache>=1.5.0 |
There was a problem hiding this comment.
all of these were not specified but are used in the code, so I found my first bug directly in the harness I guess
There was a problem hiding this comment.
Those requirements are vendored in libs directory and listed in libs/version.txt
There was a problem hiding this comment.
I'm not super familiar with the current state of python tooling (sqlalchemy was pretty new when I last did high-perf python), but basically everything I tried didn't notice that.
I can back that out if you'd rather.
out of curiosity why is any of it vendored at all? feels like an unusual category of app to care about supply chain resistance that much.
There was a problem hiding this comment.
We are vendoring those to prevent bugs introduced by untested versions. We can control how and when we upgrade those dependencies. We could achieve the same with proper venv if we were dealing with experimented Python users but it's unfortunately not the case most of the time. We deploy using requirements.txt the bare minimum that need to be compiled or include C library compiled for specific platforms.
|
noticing I have more stuff to pull into this branch from my other branches so it's draft for now |
(cherry picked from commit faa01ff) test: add mass-download fixture support test: complete mass-download fixture support test: add shared wanted database binder test: simplify wanted kind inference test: register wanted fixtures at top level test: drop unused transactional tmp fixture test: bind profile lookup to wanted test database test: bind profile list lookup to wanted fixtures
c22ff12 to
4de4f95
Compare
4de4f95 to
a012bd2
Compare
|
perf work is still coming, just haven't had time to get it into shape yet. mjc#1 if you want an early look. |
|
I moved a few more shared test/setup pieces into this PR so the follow-up wanted-search work can keep building on the same fixture layer. This adds:
The wanted-search behavior coverage that depends on this fixture layer now lives in the follow-up wanted/adaptive PR. |
1493a84 to
735e9cf
Compare
|
I will release 1.6.0 next week. This will be part of upcoming 1.6.1-beta.X. |
|
It's a ton of work to review, I get it. Let me know if I can do anything to make this less painful. |
Resolve subsyncer import conflict by keeping lazy ffsubsync loading and TYPE_CHECKING for ProgressInfo.
TYPE_CHECKING-only import caused NameError when the app loaded subsyncer during smoke tests.
|
Why do you use specific tags for GitHub Actions instead of major versions? If you're on Discord, you could join us in the |
Summary
This PR adds the backend test foundation needed to safely change wanted-search behavior in follow-up PRs.
The main goal is to make wanted movie/episode searches, language parsing, profile handling, and database interactions testable with realistic rows instead of broad monkeypatching. Later PRs in this stack use this harness to harden existing paths and then move wanted-search state out of serialized columns.
What changed
Why this is separate
The wanted-search normalization work is easier to review if the reusable fixtures and baseline behavior tests land first. This PR intentionally keeps the storage model unchanged and focuses on testability, shared helpers, and CI reliability.
Follow-up PRs build on this layer for wanted search, mass download, provider/subtitles API paths, manual upload/download paths, sync/profile parsing, upgrade paths, and finally normalized wanted-search storage.
Tests
The added tests cover the shared language helper behavior, malformed wanted-language input, profile flag normalization, missing scene-name handling, transactional rollback isolation, and the wanted-search fixture layer itself. CI changes also exercise the backend test suite, frontend checks, and app smoke startup path from the consolidated workflow.