This project includes common logic for testing Confluent's Docker images.
For more information, see: https://docs.confluent.io/platform/current/installation/docker/development.html#docker-utility-belt-dub
Common Python utils for testing Confluent's Docker images
License: Apache License 2.0
This project includes common logic for testing Confluent's Docker images.
For more information, see: https://docs.confluent.io/platform/current/installation/docker/development.html#docker-utility-belt-dub
curl -fLO https://github.com/confluentinc/confluent-docker-utils/archive/refs/tags/v0.0.78.tar.gz
tar xzf v0.0.78.tar.gz
cd confluent-docker-utils-0.0.78/
python3 setup.py sdist
pip3 install dist/confluent-docker-utils-0.0.78.tar.gz
All requirements are downloaded, and the package installs
Processing ./dist/confluent-docker-utils-0.0.78.tar.gz
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3.9 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-wul03re5/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-wul03re5/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-05dl5x3l
cwd: /tmp/pip-req-build-wul03re5/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-wul03re5/setup.py", line 15, in <module>
install_requires=open('requirements.txt').read(),
FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
python3 setup.py install
DOES claim to work, but running cub
and dub
afterward yields:
Traceback (most recent call last):
File "/usr/local/bin/cub", line 33, in <module>
sys.exit(load_entry_point('confluent-docker-utils==0.0.78', 'console_scripts', 'cub')())
File "/usr/local/bin/cub", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib64/python3.9/importlib/metadata.py", line 86, in load
module = import_module(match.group('module'))
File "/usr/lib64/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'confluent.docker_utils'
need cryptography>=39.0.1
I'v got 404 error in my local docker environment when execute command
bash -c 'cub connect-ready {host} {port} 60 && echo PASS || echo FAIL'
Becouse wrong kafka ready state detection.
check_connect_ready
command must wait for 20x status in loop several times with time.sleep(1) while 404 status code received from rest api during bootstrap initialisation.
I think Christoph Schubert from professional services has already done this, but I don’t see a PR for it. It would be preferable to remove the Python dependency and opt for static Go binaries instead. This reduces the size and attack surface area of the docker images. Reach out to Christoph for more information.
We're not actually using (for example) docker-compose
at runtime, and is only used for testing purposes in the other *images
repos. Moving this to a test dependency reduces "security surface area" as well as any other benefits (like not accidentally pulling in less desirable licenses into our docker containers)
https://github.com/confluentinc/confluent-docker-utils/blob/master/requirements.txt#L4
This line has: requests!=2.11.0,<2.12,>=2.6.1
We usually have request 2.18 running and this requirement breaks our scripts out of the box. Things used to work in 3.3.1 with this.
Is there any reason to enforce stricter requirements on requests package? And not use the latest 2.18.4?
Hi. I've overriden and added some code to my configure script. I also copied additional files (connectors directory) to template them. The templating command is failing with an error I cannot make much sense of :
connect | for file in /etc/confluent/docker/connectors/*
connect | do
connect | FILENAME=$(basename "$file" .properties.template)
connect | dub template "/etc/confluent/docker/connectors/${FILENAME}.properties.template" "/etc/${COMPONENT}/connectors/${FILENAME}.properties"
connect | done
connect | + for file in '/etc/confluent/docker/connectors/*'
connect | basename "$file" .properties.template
connect | ++ basename /etc/confluent/docker/connectors/HttpSinkOauth2Stock.properties.template .properties.template
connect | + FILENAME=HttpSinkOauth2Stock
connect | + dub template /etc/confluent/docker/connectors/HttpSinkOauth2Stock.properties.template /etc/kafka-connect/connectors/HttpSinkOauth2Stock.properties
connect | [Errno 2] No such file or directory: '/etc/kafka-connect/connectors/HttpSinkOauth2Stock.properties'
connect | Command [/usr/local/bin/dub template /etc/confluent/docker/connectors/HttpSinkOauth2Stock.properties.template /etc/kafka-connect/connectors/HttpSinkOauth2Stock.properties] FAILED !
connect exited with code 1
As you can see it's inferring properly the command but the execution is failing with [Errno 2] No such file or directory: '/etc/kafka-connect/connectors/HttpSinkOauth2Stock.properties'
. Shouldn't the templating create that file ?
Here's the additional configure script code for clarity :
for file in /etc/confluent/docker/connectors/*
do
FILENAME=$(basename "$file" .properties.template)
dub template "/etc/confluent/docker/connectors/${FILENAME}.properties.template" "/etc/${COMPONENT}/connectors/${FILENAME}.properties"
done
Out of curiosity I was exploring the build system of kafka and stumbled upon a little bug in some python logic. #20
I don’t know how crucial it is to the project but I figure I should point it out. The jenkins build failed for some logistical reason.
I ran pytest for new test that was added and it passed. The Jenkins failure appear to be due to some administrative task. Im not sure. Can someone take a look?
Passing a relative path as a source to dub template
breaks, since the path is not made absolute before passing it to the Jinja template loader, which is only configured with the root (/
) in it's search path. The path should be made absolute before use, or the current directory should be added to the search path.
This vulnerability(CVE-2022-1471) is reported as 'Critical' in Anchore and Twistlock scans. Can 'snakeyaml' package be updated to 2.0 version?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.