awslabs / aws-service-catalog-puppet

This is a framework where you list your AWS accounts with tags and your AWS Service Catalog products with tags or target accounts. The framework works through your lists, dedupes and spots collisions and then provisions the products into your AWS accounts for you. It handles the Portfolio sharing, its acceptance and can provision products cross account and cross region.
Apache License 2.0
76 stars 42 forks source link

use_2to3 is invalid error #443

Closed puddleglum1904 closed 2 years ago

puddleglum1904 commented 2 years ago

Hello there,

I'm running into the following error on my service-catalog-puppet pipeline:

2021-10-20 20:43:40 : Collecting troposphere==2.6.3
2021-10-20 20:43:40 :   Downloading troposphere-2.6.3.tar.gz (188 kB)
2021-10-20 20:43:40 :     ERROR: Command errored out with exit status 1:
2021-10-20 20:43:40 :      command: /root/.pyenv/versions/3.8.**/bin/python3.8 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3ds7l_rz/troposphere_9a4d7f29ca9c49d9920660b26c36fb46/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3ds7l_rz/troposphere_9a4d7f29ca9c49d9920660b26c36fb46/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ocrvf40h
2021-10-20 20:43:40 :          cwd: /tmp/pip-install-3ds7l_rz/troposphere_9a4d7f29ca9c49d9920660b26c36fb46/
2021-10-20 20:43:40 :     Complete output (1 lines):
2021-10-20 20:43:40 :     error in troposphere setup command: use_2to3 is invalid.
2021-10-20 20:43:40 :     ----------------------------------------
2021-10-20 20:43:40 : WARNING: Discarding https://files.pythonhosted.org/packages/9f/c9/82d600677ad4a3ce288342485dc8ad05a09b4de51c0d21d21a40db403722/troposphere-2.6.3.tar.gz#sha256=0f16079**ea545906131c820ef629a82a57f087cb99ac573bf9dfcdc1e64e11a (from https://pypi.org/simple/troposphere/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
2021-10-20 20:43:40 : ERROR: Could not find a version that satisfies the requirement troposphere==2.6.3 (from ***-service-catalog-puppet) (from versions: 0.1.2, 0.2.0, 0.3.0, 0.3.2, 0.3.3, 0.3.4, 0.4.0, 0.5.0, 0.6.0, 0.6.1, 0.6.2, 0.7.0, 0.7.1, 0.7.2, 1.0.0, 1.1.0, 1.1.1, 1.1.2, 1.2.0, 1.2.1, 1.2.2, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.9.5, 1.9.6, 2.0.0, 2.0.1, 2.0.2, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.8, 2.4.9, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.7.0, 2.7.1, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.1.0)
2021-10-20 20:43:40 : ERROR: No matching distribution found for troposphere==2.6.3

I was originally on Puppet version 0.107.0, but ran an upgrade to 0.128.0 after initially receiving this error, but ran the pipeline again and still getting the error. Full execution log attached.

log-servicecatalog-puppet-deploy.log

mtrampic commented 2 years ago

@puddleglum1904 , Quick fix is to change buildspec of puppet pipeline. Where ever you have pip install you should add line above pip install setuptools==57.5.0 --upgrade.

eg

artifacts:
  files:
  - manifest-expanded.yaml
  - results/*/*
  - output/*/*
  - exploded_results/*/*
  - tasks.log
  name: DeployProject
phases:
  build:
    commands:
    - servicecatalog-puppet --info deploy --num-workers ${NUM_WORKERS} manifest-expanded.yaml
  install:
    commands:
    - pip install setuptools==57.5.0 --upgrade # ADD
    - pip install aws-service-catalog-puppet==0.127.0
    runtime-versions:
      python: '3.7'
  pre_build:
    commands:
    - servicecatalog-puppet --info expand --parameter-override-file $CODEBUILD_SRC_DIR_ParameterisedSource/parameters.yaml
      manifest.yaml
version: 0.2
puddleglum1904 commented 2 years ago

Hi @Mladen-Trampic-SRB-1989 I just ran that fix a few minutes before you posted :) Thank you for the response! I'll leave this open for tracking

eamonnfaherty commented 2 years ago

resolved in https://github.com/awslabs/aws-service-catalog-puppet/releases/tag/0.129.0