toxgen: Add variants & move OpenAI under toxgen - #4730
Conversation
|
I was looking through the checks in this PR and noticed that some did not find any targets, e.g., the 3.10 notiktoken variant found here: https://github.com/getsentry/sentry-python/actions/runs/17380359730/job/49336205814?pr=4730#logs. |
This is expected, see Lines 146 to 149 in 7192946 It's this way since it was the easiest to manage/most convenient way to manage all the different test suites across all py versions. The GH actions don't have any way of knowing which Python versions they should run which test suites on, so they just run everything and we manage it on a lower level. |

Adds supports for variants, i.e., the same test suite running with a slightly different setup (for instance, a different set of dependencies, like
openaiandopenai_notiktoken).To add a variant, simply add a new test suite to the config.
The tricky part is naming. I had to rename
openaitoopenai_basesince otherwise theopenai_notiktokenandopenai_agentstest suite would be run withtox -e py<version>-openai/./scripts/runtox.sh py<version>-openaidue to how tox works. They should be treated as three different suites.Closes #4507