-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #995 from Aiven-Open/nosahama/fastapi-sr-module-wi…
…th-DI-e2e-tests feat: fastapi `schema-registry` module with DI and E2E tests
- Loading branch information
Showing
94 changed files
with
2,062 additions
and
1,270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
[run] | ||
branch = true | ||
relative_files = true | ||
source = src/karapace | ||
source = src | ||
disable_warnings = module-not-measured, no-data-collected | ||
|
||
[report] | ||
skip_empty = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Current versions of avro and zstandard don't yet have wheels for 3.11. | ||
FROM python:3.10.11-bullseye AS builder | ||
|
||
ARG KARAPACE_VERSION | ||
ARG RUNNER_UID | ||
ARG RUNNER_GID | ||
|
||
# Setup files and directories. | ||
RUN mkdir /opt/karapace /opt/karapace/runtime /var/log/karapace /opt/karapace/coverage \ | ||
&& touch /opt/karapace/coverage/.coverage.3.9 /opt/karapace/coverage/.coverage.3.10 /opt/karapace/coverage/.coverage.3.11 /opt/karapace/coverage/.coverage.3.12 \ | ||
&& chown --recursive "$RUNNER_UID:$RUNNER_GID" /opt/karapace /opt/karapace/coverage /var/log/karapace | ||
|
||
# Create, activate, and enforce usage of virtualenv. | ||
RUN python3 -m venv /opt/karapace/venv | ||
ENV PATH="/opt/karapace/venv/bin:$PATH" | ||
ENV PIP_REQUIRE_VIRTUALENV=true | ||
|
||
# Install golang needed by extensions | ||
ENV GO_VERSION=1.21.0 | ||
ENV PATH="/usr/local/go/bin:${PATH}" | ||
RUN wget --progress=dot:giga "https://go.dev/dl/go${GO_VERSION}.linux-$(dpkg --print-architecture).tar.gz" \ | ||
&& tar -C /usr/local -xzf "go${GO_VERSION}.linux-$(dpkg --print-architecture).tar.gz" \ | ||
&& rm "go${GO_VERSION}.linux-$(dpkg --print-architecture).tar.gz" | ||
|
||
# Install protobuf compiler. | ||
ARG PROTOBUF_COMPILER_VERSION="3.12.4-1+deb11u1" | ||
RUN apt-get update \ | ||
&& apt-get install --assume-yes --no-install-recommends \ | ||
protobuf-compiler=$PROTOBUF_COMPILER_VERSION \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Java via openjdk-11 | ||
COPY --from=openjdk:11 /usr/local/openjdk-11 /usr/local/openjdk-11 | ||
ENV JAVA_HOME /usr/local/openjdk-11 | ||
RUN update-alternatives --install /usr/bin/java java /usr/local/openjdk-11/bin/java 1 | ||
|
||
WORKDIR /opt/karapace | ||
|
||
COPY ./requirements /opt/karapace/requirements | ||
RUN python3 -m pip install -r /opt/karapace/requirements/requirements.txt -r /opt/karapace/requirements/requirements-dev.txt -r /opt/karapace/requirements/requirements-typing.txt | ||
|
||
COPY . . | ||
RUN SETUPTOOLS_SCM_PRETEND_VERSION=$KARAPACE_VERSION python3 -m pip install . | ||
|
||
ENV PYTHONPATH="/opt/karapace/src:$PYTHONPATH" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.