-
Notifications
You must be signed in to change notification settings - Fork 0
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
DM-45676: Update repo infrastructure #160
Commits on Aug 8, 2024
-
This takes care of installing nox and caching.
Configuration menu - View commit details
-
Copy full SHA for b9bfc05 - Browse repository at this point
Copy the full SHA b9bfc05View commit details -
Drop dependencies GitHub Actions workflow
We now recompute dependencies whenever we update the app, rather than on an automatic schedule. periodic-ci.yaml ensures that the dependencies can be updated without breaking tests.
Configuration menu - View commit details
-
Copy full SHA for 0ec1644 - Browse repository at this point
Copy the full SHA 0ec1644View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3fabd16 - Browse repository at this point
Copy the full SHA 3fabd16View commit details
Commits on Aug 13, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 79424cb - Browse repository at this point
Copy the full SHA 79424cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8407a96 - Browse repository at this point
Copy the full SHA 8407a96View commit details -
This toml configuration comes from the FastAPI template at https://github.com/lsst/templates
Configuration menu - View commit details
-
Copy full SHA for 03c9da1 - Browse repository at this point
Copy the full SHA 03c9da1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0229fb7 - Browse repository at this point
Copy the full SHA 0229fb7View commit details -
This updates the Pydantic dependency to version 2, but likely isn't working yet. The issue is that Kafkit is still using Pydantic 2. But since we're moving to faststream and using Pydantic models directly without the Confluent Schema Registry we may just switch to that now too.
Configuration menu - View commit details
-
Copy full SHA for b6787de - Browse repository at this point
Copy the full SHA b6787deView commit details -
This switches Ook to using faststream and directly using Pydantic models rather than using Kafkit's Pydantic adapter for the Confluent Schema Registry. This faststream is approach is also how we're now building squarebot.
Configuration menu - View commit details
-
Copy full SHA for 8a4e277 - Browse repository at this point
Copy the full SHA 8a4e277View commit details -
Configuration menu - View commit details
-
Copy full SHA for b50e356 - Browse repository at this point
Copy the full SHA b50e356View commit details -
Adopt testcontainers for kafka testing
To get testcontainers to work - Change the app so that its creation is deferred to a create_app function - Don't import the kafka_router into the main namespace so that the app fixture in conftest.py can reset the kafka_router with the new configuration.
Configuration menu - View commit details
-
Copy full SHA for e44e828 - Browse repository at this point
Copy the full SHA e44e828View commit details -
Run Testcontainers Kafka via nox
This changes the approach previously taken where I ran testcontainers in the pytest conftest.py module. Here I'm running the testcontainers in the nox sessions, which is more similar to how tox-docker runs. The advantage of this approach is that it doesn't require any code modifications and patching because the environment variables for the Kafka configuration can be made *before* starting up the app tests / development run or documentation building sessions. Running testcontainers via pytest could still be a useful technique if different tests need full isolation of their testcontainers, but of course this is a slow and resource-intensive approach.
Configuration menu - View commit details
-
Copy full SHA for ac52c83 - Browse repository at this point
Copy the full SHA ac52c83View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b19350 - Browse repository at this point
Copy the full SHA 4b19350View commit details -
Update GitHub Actions to install testcontainers
We need to make sure testcontainers[kafka] is in the environment that nox is running in. Locally this is handled by having nox set up the local virtual environmemnt with nox -s init or nox -s venv-init.
Configuration menu - View commit details
-
Copy full SHA for dc779bc - Browse repository at this point
Copy the full SHA dc779bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 66c6a85 - Browse repository at this point
Copy the full SHA 66c6a85View commit details -
Configuration menu - View commit details
-
Copy full SHA for e1fcc4a - Browse repository at this point
Copy the full SHA e1fcc4aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 07ce51f - Browse repository at this point
Copy the full SHA 07ce51fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9a2eb13 - Browse repository at this point
Copy the full SHA 9a2eb13View commit details -
Configuration menu - View commit details
-
Copy full SHA for d934b3e - Browse repository at this point
Copy the full SHA d934b3eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 941ba82 - Browse repository at this point
Copy the full SHA 941ba82View commit details
Commits on Aug 14, 2024
-
This is needed to ensure the standalone Factory in the CLI context works.
Configuration menu - View commit details
-
Copy full SHA for bb1c2b5 - Browse repository at this point
Copy the full SHA bb1c2b5View commit details -
Import kafka_router from handlers module
This ensures that the handler function is imported and therefore registered to the kafka router. Note need to avoid circ deps with kafkarouter
Configuration menu - View commit details
-
Copy full SHA for 8641d70 - Browse repository at this point
Copy the full SHA 8641d70View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d6116f - Browse repository at this point
Copy the full SHA 5d6116fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1bac26f - Browse repository at this point
Copy the full SHA 1bac26fView commit details