bahchis / airflow-cookbook

Airflow workflow management platform chef cookbook.
Apache License 2.0
68 stars 49 forks source link

Package version pinning #8

Closed lukem-ow closed 7 years ago

lukem-ow commented 7 years ago

Added the ability to specify package version numbers. Also replaced the python cookbook with the poise-python cookbook due to deprecation for the former.

lukem-ow commented 7 years ago

Hi @bahchis - as discussed, this PR allows for the specifying of package versions.

bahchis commented 7 years ago

Hi @lukem-ow Thanks, it looks good.

Although I have encountered an issue when trying to run the kitchen suites. In centos 7.2, I have got the error below. Could you please try running the airflow-centos-72 instance and make sure all other instances work as well?

running build_ext
         Traceback (most recent call last):
           File "<string>", line 1, in <module>
           File "/tmp/pip-build-Qpn47I/Pillow/setup.py", line 753, in <module>
             zip_safe=not debug_build(), )
           File "/opt/rh/python27/root/usr/lib64/python2.7/distutils/core.py", line 151, in setup
             dist.run_commands()
           File "/opt/rh/python27/root/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
             self.run_command(cmd)
           File "/opt/rh/python27/root/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
             cmd_obj.run()
           File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/wheel/bdist_wheel.py", line 175, in run
             self.run_command('build')
           File "/opt/rh/python27/root/usr/lib64/python2.7/distutils/cmd.py", line 326, in run_command
             self.distribution.run_command(command)
           File "/opt/rh/python27/root/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
             cmd_obj.run()
           File "/opt/rh/python27/root/usr/lib64/python2.7/distutils/command/build.py", line 127, in run
             self.run_command(cmd_name)
           File "/opt/rh/python27/root/usr/lib64/python2.7/distutils/cmd.py", line 326, in run_command
             self.distribution.run_command(command)
           File "/opt/rh/python27/root/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
             cmd_obj.run()
           File "/opt/rh/python27/root/usr/lib64/python2.7/distutils/command/build_ext.py", line 337, in run
             self.build_extensions()
           File "/tmp/pip-build-Qpn47I/Pillow/setup.py", line 521, in build_extensions
             ' using --disable-%s, aborting' % (f, f))
         ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting

         ----------------------------------------
         Running setup.py bdist_wheel for webencodings
         Stored in directory: /root/.cache/pip/wheels/0a/73/c2/1dcc99951b6aeac495e7695505d1837616ca194938f07d1d7b
       Successfully built druid tumulus webencodings
       Failed to build Pillow
       Installing collected packages: beautifulsoup4, webencodings, html5lib, tumulus, Pillow, druid
         Running setup.py install for Pillow
           Complete output from command /opt/rh/python27/root/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-Qpn47I/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-nAyFv7-record/install-record.txt --single-version-externally-managed --compile:
           Single threaded build, not installing mp_compile:1 processes
           running install
           running build
           running build_py
           running egg_info
           writing Pillow.egg-info/PKG-INFO
           writing top-level names to Pillow.egg-info/top_level.txt
           writing dependency_links to Pillow.egg-info/dependency_links.txt
           reading manifest file 'Pillow.egg-info/SOURCES.txt'
           reading manifest template 'MANIFEST.in'
           warning: no files found matching '*.sh'
           no previously-included directories found matching 'docs/_static'
           warning: no previously-included files found matching '.coveragerc'
           warning: no previously-included files found matching '.editorconfig'
           warning: no previously-included files found matching '.landscape.yaml'
           warning: no previously-included files found matching 'appveyor.yml'
           warning: no previously-included files found matching 'build_children.sh'
           warning: no previously-included files found matching 'tox.ini'
           warning: no previously-included files matching '.git*' found anywhere in distribution
           warning: no previously-included files matching '*.pyc' found anywhere in distribution
           warning: no previously-included files matching '*.so' found anywhere in distribution
           writing manifest file 'Pillow.egg-info/SOURCES.txt'
           running build_ext
           Traceback (most recent call last):
             File "<string>", line 1, in <module>
             File "/tmp/pip-build-Qpn47I/Pillow/setup.py", line 753, in <module>
        zip_safe=not debug_build(), )
             File "/opt/rh/python27/root/usr/lib64/python2.7/distutils/core.py", line 151, in setup
        dist.run_commands()
             File "/opt/rh/python27/root/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
             File "/opt/rh/python27/root/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
             File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
             File "/opt/rh/python27/root/usr/lib64/python2.7/distutils/command/install.py", line 563, in run
        self.run_command('build')
             File "/opt/rh/python27/root/usr/lib64/python2.7/distutils/cmd.py", line 326, in run_command
        self.distribution.run_command(command)
             File "/opt/rh/python27/root/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
             File "/opt/rh/python27/root/usr/lib64/python2.7/distutils/command/build.py", line 127, in run
        self.run_command(cmd_name)
             File "/opt/rh/python27/root/usr/lib64/python2.7/distutils/cmd.py", line 326, in run_command
        self.distribution.run_command(command)
             File "/opt/rh/python27/root/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
             File "/opt/rh/python27/root/usr/lib64/python2.7/distutils/command/build_ext.py", line 337, in run
        self.build_extensions()
             File "/tmp/pip-build-Qpn47I/Pillow/setup.py", line 521, in build_extensions
        ' using --disable-%s, aborting' % (f, f))
           ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting

           ----------------------------------------
       STDERR: You are using pip version 7.1.0, however version 9.0.1 is available.
       You should consider upgrading via the 'pip install --upgrade pip' command.
         Failed building wheel for Pillow
       Command "/opt/rh/python27/root/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-Qpn47I/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-nAyFv7-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-Qpn47I/Pillow
       ---- End output of ["/opt/rh/python27/root/usr/bin/python", "-m", "pip.__main__", "install", "druid>=0.2.1"] ----
       Ran ["/opt/rh/python27/root/usr/bin/python", "-m", "pip.__main__", "install", "druid>=0.2.1"] returned 1
       [2016-12-14T18:33:59+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Converge failed on instance <airflow-centos-72>.  Please see .kitchen/logs/airflow-centos-72.log for more details
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration
lukem-ow commented 7 years ago

@bahchis - I have fixed the issue you encountered and have made sure all other instances work.

bahchis commented 7 years ago

Thanks @lukem-ow i will try it soon.

bahchis commented 7 years ago

@lukem-ow , libjpeg-devel was missing for centos. It is required by Pillow pip package which is installed when installing Druid. Added this and now it works. I will merge. Thanks!

lukem-ow commented 7 years ago

@bahchis - thank you. Sorry, I had set up the PR from the wrong branch - it should have been from the master branch: https://github.com/owlabs/airflow-cookbook/blob/master/attributes/packages.rb

arnaud036 commented 7 years ago

When can we expect this to be released?

bahchis commented 7 years ago

Hi @arnaud036 , sorry had a little time lately. I will try to make it into the master + release in the next week or so. Thanks.