-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Core] Fix stop iterator bug in jqpy (#1059)
- Loading branch information
1 parent
64f28fd
commit faacf8a
Showing
6 changed files
with
96 additions
and
73 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
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,72 +1,28 @@ | ||
FROM python:3.11-alpine AS base | ||
FROM python:3.11-slim-bookworm | ||
|
||
ARG BUILD_CONTEXT | ||
|
||
ENV LIBRDKAFKA_VERSION=1.9.2 | ||
|
||
# Install system dependencies and libraries | ||
RUN apk add --no-cache \ | ||
gcc \ | ||
musl-dev \ | ||
build-base \ | ||
bash \ | ||
oniguruma-dev \ | ||
make \ | ||
autoconf \ | ||
automake \ | ||
libtool \ | ||
curl \ | ||
# librdkafka-dev \ | ||
libffi-dev \ | ||
# Install community librdkafka-dev since the default in alpine is older | ||
&& echo "@edge http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories \ | ||
&& echo "@edgecommunity http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \ | ||
&& apk add --no-cache alpine-sdk "librdkafka@edgecommunity>=${LIBRDKAFKA_VERSION}" "librdkafka-dev@edgecommunity>=${LIBRDKAFKA_VERSION}" \ | ||
&& curl -sSL https://install.python-poetry.org | python3 - \ | ||
&& /root/.local/bin/poetry config virtualenvs.in-project true | ||
|
||
|
||
WORKDIR /app | ||
|
||
COPY ./${BUILD_CONTEXT}/pyproject.toml ./${BUILD_CONTEXT}/poetry.lock /app/ | ||
|
||
RUN /root/.local/bin/poetry install --without dev --no-root --no-interaction --no-ansi --no-cache && pip cache purge | ||
|
||
FROM python:3.11-alpine AS prod | ||
|
||
ARG INTEGRATION_VERSION | ||
ARG BUILD_CONTEXT | ||
|
||
LABEL INTEGRATION_VERSION=${INTEGRATION_VERSION} | ||
# Used to ensure that new integrations will be public, see https://docs.github.com/en/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility | ||
LABEL org.opencontainers.image.source=https://github.com/port-labs/ocean | ||
LABEL org.opencontainers.image.source https://github.com/port-labs/ocean | ||
|
||
# Install only runtime dependencies | ||
RUN apk add --no-cache \ | ||
librdkafka-dev \ | ||
bash \ | ||
oniguruma-dev \ | ||
# Install community librdkafka-dev since the default in alpine is older | ||
&& echo "@edge http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories \ | ||
&& echo "@edgecommunity http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \ | ||
&& apk add --no-cache alpine-sdk "librdkafka@edgecommunity>=${LIBRDKAFKA_VERSION}" "librdkafka-dev@edgecommunity>=${LIBRDKAFKA_VERSION}" \ | ||
&& test -e /usr/local/share/ca-certificates/cert.crt && update-ca-certificates || true | ||
ENV LIBRDKAFKA_VERSION 1.9.2 | ||
|
||
WORKDIR /app | ||
|
||
# Copy dependencies from the build stage | ||
COPY --from=base /app /app | ||
RUN apt update && \ | ||
apt install -y wget make g++ libssl-dev autoconf automake libtool curl librdkafka-dev && \ | ||
apt-get clean | ||
|
||
COPY ./integrations/_infra/init.sh /app/init.sh | ||
|
||
RUN chmod +x /app/init.sh | ||
|
||
# Copy the application code | ||
COPY ./${BUILD_CONTEXT} /app | ||
|
||
# Ensure that ocean is available for all in path | ||
RUN chmod a+x /app/.venv/bin/ocean \ | ||
&& ln -s /app/.venv/bin/ocean /usr/bin/ocean \ | ||
# # Fix security issues | ||
&& apk upgrade busybox --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main \ | ||
# Clean up old setuptools | ||
&& pip uninstall -y setuptools py3-setuptools | ||
COPY ./integrations/_infra/Makefile /app/Makefile | ||
|
||
RUN export POETRY_VIRTUALENVS_CREATE=false && make install/prod && pip cache purge | ||
|
||
# Run the application | ||
CMD ["ocean", "sail"] | ||
ENTRYPOINT ./init.sh |
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,4 @@ | ||
if test -e /usr/local/share/ca-certificates/cert.crt; then | ||
update-ca-certificates | ||
fi | ||
ocean sail |
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