Giter VIP home page Giter VIP logo

confluent-docker-utils's Introduction

confluent-docker-utils's People

Contributors

aayars avatar andrewegel avatar cchristous avatar christianciach avatar codyaray avatar confluentjenkins avatar confluentsemaphore avatar dnozay avatar dragosvictor avatar elismaga avatar fossabot avatar frek818 avatar gracechensd avatar huizheng278 avatar janjwerner-confluent avatar jkao97 avatar lokesh-shekar avatar lyao-77 avatar lyoung-confluent avatar maxzheng avatar mohnishbasha avatar niteshmor avatar patrick-premont avatar sknop avatar viks-kafka avatar xjin-confluent avatar xli1996 avatar xvrl avatar ybyzek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

confluent-docker-utils's Issues

`python3 setup.py sdist` does not create an installable archive

Steps to reproduce

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

Expected result

All requirements are downloaded, and the package installs

Actual behavior

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.

Miscellany

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'

check_connect_ready must wait for start rest service

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.

Suggest replacing Python with Go binary

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.

Refactor dependencies into test dependency and runtime dependencies

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)

dub template failing with 'No such file or directory'

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

Bug report

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?

`dub template` command does not work with relative source paths

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.

CVE-2022-1471

This vulnerability(CVE-2022-1471) is reported as 'Critical' in Anchore and Twistlock scans. Can 'snakeyaml' package be updated to 2.0 version?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.