Conversation
Signed-off-by: Abhinav Gyawali <22275402+abhizer@users.noreply.github.com>
Signed-off-by: Abhinav Gyawali <22275402+abhizer@users.noreply.github.com>
Signed-off-by: Abhinav Gyawali <22275402+abhizer@users.noreply.github.com>
Signed-off-by: Abhinav Gyawali <22275402+abhizer@users.noreply.github.com>
Signed-off-by: Abhinav Gyawali <22275402+abhizer@users.noreply.github.com>
snkas
left a comment
There was a problem hiding this comment.
Looks good!
Only note I have is that there is only one environment variable which gets used for both internal variables. There could be two used, with the pipeline one falling back to the script one if it is not defined.
| "requests", | ||
| "pandas", | ||
| "typing-extensions", | ||
| "numpy<2", |
There was a problem hiding this comment.
Curiosity: which features of NumPy 2+ are non-compatible? As I see it has been recently released.
There was a problem hiding this comment.
Yeah, we get an error with numpy 2+.
Seems to be a common thing:
https://stackoverflow.com/questions/78650222/valueerror-numpy-dtype-size-changed-may-indicate-binary-incompatibility-expec
python/tests/test_wireframes.py
Outdated
|
|
||
| if KAFKA_URL: | ||
| KAFKA_SERVER = KAFKA_URL | ||
| KAFKA_URL_FROM_PIPELINE = KAFKA_URL |
There was a problem hiding this comment.
Consistent naming of PIPELINE_TO_KAFKA_SERVER
python/tests/test_wireframes.py
Outdated
|
|
||
| # if the Kafka URL is set in the environment, use it | ||
| # useful for running tests in CI | ||
| KAFKA_URL = os.environ.get("KAFKA_URL") |
There was a problem hiding this comment.
I would say KAFKA_SERVER is more accurate as there is no scheme.
Earthfile
Outdated
| sleep 10 && \ | ||
| (./pipeline-manager --bind-address=0.0.0.0 --api-server-working-directory=/working-dir --compiler-working-directory=/working-dir --runner-working-directory=/working-dir --sql-compiler-home=/dbsp/sql-to-dbsp-compiler --dbsp-override-path=/dbsp --db-connection-string=postgresql://postgres:postgres@localhost:5432 --compilation-profile=unoptimized &) && \ | ||
| sleep 5 && \ | ||
| docker run --name redpanda -p 9092:9092 --rm -itd docker.redpanda.com/vectorized/redpanda:v23.2.3 redpanda start --smp 2 && \ |
There was a problem hiding this comment.
@gz , is there a downside to running the container this way as opposed to how we do it elsewhere in Earthfile, using docker compose, e.g.:
test-debezium-jdbc-sink:
FROM earthly/dind:alpine
COPY deploy/docker-compose.yml .
COPY deploy/docker-compose-jdbc.yml .
ENV FELDERA_VERSION=latest
WITH DOCKER --pull docker.redpanda.com/vectorized/redpanda:v23.2.3 \
--pull debezium/example-postgres:2.3 \
--load ghcr.io/feldera/pipeline-manager:latest=+build-pipeline-manager-container \
--load ghcr.io/feldera/demo-container:latest=+build-demo-container \
--load ghcr.io/feldera/kafka-connect:latest=+build-kafka-connect-container
RUN COMPOSE_HTTP_TIMEOUT=120 RUST_LOG=debug,tokio_postgres=info docker-compose -f docker-compose.yml -f docker-compose-jdbc.yml --profile debezium up --force-recreate --exit-code-from debezium-jdbc-demo
END
There was a problem hiding this comment.
hm not too familiar with earthly+docjer.. maybe @lalithsuresh knows why it was done that way in the file
There was a problem hiding this comment.
I never dealt with Debezium, so I don't know. This does look odd. Worth rewriting it to be consistent with the other forms if it's quick to do.
gz
left a comment
There was a problem hiding this comment.
I guess my only question is why we need to test the python API with kafka in the loop
Earthfile
Outdated
| COPY +install-python-deps/wheels wheels | ||
| COPY demo/demo_notebooks/requirements.txt requirements.txt | ||
| COPY --dir python ./ | ||
| RUN pip install --upgrade pip |
There was a problem hiding this comment.
Any reason you need this? IMO this upgrades pip non-deterministically?
There was a problem hiding this comment.
I think it's related to pyproject.toml not being (well) supported with out-of-the-box Ubuntu 22.04 (issue)
An alternative would be to either switch to legacy setup.py temporarily or to have both (will have to how that resolves though).
There was a problem hiding this comment.
hm I thought we're already on 24.04 I swear I did the earthly upgrade at some point but it's not in main :( .. that's probably the right move for it
Earthfile
Outdated
| sleep 10 && \ | ||
| (./pipeline-manager --bind-address=0.0.0.0 --api-server-working-directory=/working-dir --compiler-working-directory=/working-dir --runner-working-directory=/working-dir --sql-compiler-home=/dbsp/sql-to-dbsp-compiler --dbsp-override-path=/dbsp --db-connection-string=postgresql://postgres:postgres@localhost:5432 --compilation-profile=unoptimized &) && \ | ||
| sleep 5 && \ | ||
| docker run --name redpanda -p 9092:9092 --rm -itd docker.redpanda.com/vectorized/redpanda:v23.2.3 redpanda start --smp 2 && \ |
There was a problem hiding this comment.
hm not too familiar with earthly+docjer.. maybe @lalithsuresh knows why it was done that way in the file
There's a couple tests that require Kafka: feldera/python/tests/test_wireframes.py Line 183 in 8118183 And, feldera/python/tests/test_wireframes.py Line 281 in 8118183 |
| COPY --dir python ./ | ||
| RUN pip install --upgrade pip | ||
| RUN pip wheel -r requirements.txt --wheel-dir=wheels | ||
| RUN pip wheel -r python/tests/requirements.txt --wheel-dir=wheels |
There was a problem hiding this comment.
I might be reading this wrong, but aren't we installing the same requirements again in the next action below?
There was a problem hiding this comment.
We install it to the wheel directory here, and then next, install it via the wheel directory.
Just followed the pattern we use for requirements in demo_notebooks.
Signed-off-by: Abhinav Gyawali <22275402+abhizer@users.noreply.github.com>
Is this a user-visible change (yes/no): no