Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,6 @@ cache:
# are updated so it's disabled
#- .tox/

before_install:
# If you update these versions, make sure you update the versions in the .st2client-install-check
# and the requirements targets in the Makefile to match
- pip install --upgrade "pip==20.0.2"
- sudo pip install --upgrade "virtualenv==16.6.0"

install:
- ./scripts/travis/install-requirements.sh
# prep a travis-specific dev conf file that uses travis instead of stanley
Expand Down
22 changes: 9 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ COVERAGE_GLOBS := .coverage.unit.* .coverage.integration.* .coverage.mistral.*
COVERAGE_GLOBS_QUOTED := $(foreach glob,$(COVERAGE_GLOBS),'$(glob)')

REQUIREMENTS := test-requirements.txt requirements.txt
# Pin common pip version here across all the targets
# Note! Periodic maintenance pip upgrades are required to be up-to-date with the latest pip security fixes and updates
PIP_VERSION ?= 20.0.2
PIP_OPTIONS := $(ST2_PIP_OPTIONS)

ifndef PYLINT_CONCURRENCY
Expand Down Expand Up @@ -309,7 +312,7 @@ lint-api-spec: requirements .lint-api-spec
@echo
@echo "================== Lint API spec ===================="
@echo
. $(VIRTUALENV_DIR)/bin/activate; st2common/bin/st2-validate-api-spec --config-file conf/st2.dev.conf
. $(VIRTUALENV_DIR)/bin/activate; st2common/bin/st2-validate-api-spec --config-file conf/st2.dev.conf

.PHONY: generate-api-spec
generate-api-spec: requirements .generate-api-spec
Expand Down Expand Up @@ -369,10 +372,7 @@ flake8: requirements .flake8
touch $(VIRTUALENV_ST2CLIENT_DIR)/bin/activate
chmod +x $(VIRTUALENV_ST2CLIENT_DIR)/bin/activate

# If you update these versions, make sure you also update the versions in the
# requirements target and .travis.yml to match
# Make sure we use the latest version of pip
$(VIRTUALENV_ST2CLIENT_DIR)/bin/pip install --upgrade "pip==20.0.2"
$(VIRTUALENV_ST2CLIENT_DIR)/bin/pip install --upgrade "pip==$(PIP_VERSION)"
# NOTE We need to upgrade setuptools to avoid bug with dependency resolving in old versions
# Setuptools 42 added support for python_requires, which is used by the configparser package,
# which is required by the importlib-metadata package
Expand Down Expand Up @@ -495,6 +495,9 @@ distclean: clean

.PHONY: .requirements
.requirements: virtualenv
$(VIRTUALENV_DIR)/bin/pip install --upgrade "pip==$(PIP_VERSION)"
# Print out pip version
$(VIRTUALENV_DIR)/bin/pip --version
# Generate all requirements to support current CI pipeline.
$(VIRTUALENV_DIR)/bin/python scripts/fixate-requirements.py --skip=virtualenv,virtualenv-osx -s st2*/in-requirements.txt contrib/runners/*/in-requirements.txt -f fixed-requirements.txt -o requirements.txt

Expand All @@ -515,14 +518,9 @@ requirements: virtualenv .requirements .sdist-requirements install-runners
@echo
@echo "==================== requirements ===================="
@echo
# If you update these versions, make sure you also update the versions in the
# .st2client-install-check target and .travis.yml to match
# Make sure we use latest version of pip
$(VIRTUALENV_DIR)/bin/pip --version
$(VIRTUALENV_DIR)/bin/pip install --upgrade "pip>=19.3.1"
# setuptools >= 41.0.1 is required for packs.install in dev envs
# setuptools >= 42 is required so setup.py install respects dependencies' python_requires
$(VIRTUALENV_DIR)/bin/pip install --upgrade "setuptools>=42"
$(VIRTUALENV_DIR)/bin/pip install --upgrade "setuptools==44.1.0"
$(VIRTUALENV_DIR)/bin/pip install --upgrade "pbr==5.4.3" # workaround for pbr issue

# Fix for Travis CI race
Expand Down Expand Up @@ -574,8 +572,6 @@ virtualenv:
@echo
@echo "==================== virtualenv ===================="
@echo
# Note: We pass --no-download flag to make sure version of pip which we install (9.0.1) is used
# instead of latest version being downloaded from PyPi
test -f $(VIRTUALENV_DIR)/bin/activate || virtualenv --python=$(PYTHON_VERSION) $(VIRTUALENV_DIR) --no-download

# Setup PYTHONPATH in bash activate script...
Expand Down
4 changes: 2 additions & 2 deletions contrib/runners/orquesta_runner/orquesta_functions/st2kv.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def st2kv_(context, key, **kwargs):
try:
user_db = auth_db_access.User.get(username)
except Exception as e:
raise Exception('Failed to retrieve User object for user "%s" % (username)' %
(six.text_type(e)))
raise Exception('Failed to retrieve User object for user "%s", "%s"' %
(username, six.text_type(e)))

has_default = 'default' in kwargs
default_value = kwargs.get('default')
Expand Down
2 changes: 1 addition & 1 deletion st2common/st2common/util/monkey_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def use_select_poll_workaround(nose_only=True):
import eventlet

# Work around to get tests to pass with eventlet >= 0.20.0
if not nose_only or (nose_only and'nose' in sys.modules.keys()):
if not nose_only or (nose_only and 'nose' in sys.modules.keys()):
# Add back blocking poll() to eventlet monkeypatched select
original_poll = eventlet.patcher.original('select').poll
select.poll = original_poll
Expand Down
2 changes: 1 addition & 1 deletion st2common/tests/unit/test_dist_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class DistUtilsTestCase(unittest2.TestCase):
def setUp(self):
super(DistUtilsTestCase, self).setUp()

if 'pip'in sys.modules:
if 'pip' in sys.modules:
del sys.modules['pip']

def tearDown(self):
Expand Down