-
Notifications
You must be signed in to change notification settings - Fork 71
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
feat: fastapi schema-registry
module with DI and E2E tests
#995
base: jjaakola-aiven-fastapi
Are you sure you want to change the base?
feat: fastapi schema-registry
module with DI and E2E tests
#995
Conversation
- we create a standalone module for SR related components - we use DI to wire together the SR dependencies - we move the routers to own folder - we move the config initialization to DI and app startup
- we add a docker compose service which would act like a CLI - we add a dev Dockerfile - we drop python3.9 from the tests matrix as pydantic-settings has issues with python3.9 - we add .env files for both registry and rest
- we replace use the karapace container to load the default config
74c54af
to
d336032
Compare
@@ -6,6 +6,7 @@ for ((i = 0; i <= retries; i++)); do | |||
response=$( | |||
curl --silent --verbose --fail --request POST \ | |||
--header 'Content-Type: application/vnd.schemaregistry.v1+json' \ | |||
--header 'Authorization: Basic Og==' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This are empty credentials, i.e. username="" | password=""
, this is needed as now on FastAPI we require the credentials to be at least present, even if it's empty, we can revise this later as it'd be now a breaking change, but shouldn't hurt too much.
@@ -0,0 +1,62 @@ | |||
# Current versions of avro and zstandard don't yet have wheels for 3.11. | |||
FROM python:3.10.11-bullseye AS builder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to Dockerfile
, we install dev dependencies and take out the healthcheck
.
- we split out e2e tests into own folder - e2e tests will run against the service in docker compose - we start by splitting out the prometheus and kafka e2e tests which do not need local running services
d336032
to
f52fe6c
Compare
60a8086
to
7b8cd91
Compare
About this change - What it does
Some changes based off the work from the jjaakola-aiven-fastapi branch, majorly:
e2e
foldere2e
tests were introduced, which also run within a docker compose environmentintegration
tests folder slowly into thee2e
tests foldere2e
tests run against the karapace docker compose services: i.e.schema-registry/rest
rather than local processesrapu
.env
file.env
file needed to populate the rest of the config