Skip to content
Draft
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
29 changes: 13 additions & 16 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@ jobs:
# NOTE: We need to use full Python version as part of Python deps cache key otherwise
# setup virtualenv step will fail.
python:
- {version-short: '3.8', version: '3.8.18'}
- {version-short: '3.9', version: '3.9.21'}
- {version-short: '3.10', version: '3.10.16'}
- {version-short: '3.11', version: '3.11.11'}
- {version-short: '3.12', version: '3.12.12'}
make:
- name: 'Lint Checks (black, flake8, etc.)'
task: 'ci-checks'
Expand Down Expand Up @@ -117,15 +116,15 @@ jobs:
fail-fast: false
matrix:
python:
- {version-short: '3.8', version: '3.8.18'}
- {version-short: '3.10', version: '3.10.16'}
services:
mongo:
image: mongo:7.0
image: mongo:8.2
ports:
- 27017:27017

rabbitmq:
image: rabbitmq:3.13-management
image: rabbitmq:4.2-management
options: >-
--name rabbitmq
ports:
Expand All @@ -135,7 +134,7 @@ jobs:

redis:
# Docker Hub image
image: redis:8.0
image: redis:8.6
# Set health checks to wait until redis has started
options: >-
--name "redis"
Expand Down Expand Up @@ -272,10 +271,9 @@ jobs:
# NOTE: To speed the CI run, we split unit and integration tests into multiple jobs where
# each job runs subset of tests.
python:
- {version-short: '3.8', version: '3.8.18'}
- {version-short: '3.9', version: '3.9.21'}
- {version-short: '3.10', version: '3.10.16'}
- {version-short: '3.11', version: '3.11.11'}
- {version-short: '3.12', version: '3.12.12'}
make:
- name: 'Unit Tests (chunk 1)'
task: 'ci-unit'
Expand All @@ -290,12 +288,12 @@ jobs:
# shard: {k: 0, n: 1}
services:
mongo:
image: mongo:7.0
image: mongo:8.2
ports:
- 27017:27017
redis:
# Docker Hub image
image: redis:8.0
image: redis:8.6
# Set health checks to wait until redis has started
options: >-
--name "redis"
Expand All @@ -307,7 +305,7 @@ jobs:
- 6379:6379/tcp

rabbitmq:
image: rabbitmq:3.13-management
image: rabbitmq:4.2-management
options: >-
--name rabbitmq
ports:
Expand Down Expand Up @@ -427,10 +425,9 @@ jobs:
# NOTE: To speed-up the CI run, we split unit and integration tests into multiple jobs where
# each job runs subset of tests.
python:
- {version-short: '3.8', version: '3.8.18'}
- {version-short: '3.9', version: '3.9.21'}
- {version-short: '3.10', version: '3.10.16'}
- {version-short: '3.11', version: '3.11.11'}
- {version-short: '3.12', version: '3.12.12'}
make:
# We run pack tests here since they rely on some integration tests set
# up (aka stanley user being present, etc.)
Expand All @@ -445,7 +442,7 @@ jobs:
shard: {k: 1, n: 2}
services:
mongo:
image: mongo:7.0
image: mongo:8.2
ports:
- 27017:27017

Expand All @@ -456,7 +453,7 @@ jobs:
# or they require config in entrypoint args (which we can't override for GHA services)
# so we use RabbitMQ's conf.d feature to get config files from mounted volumes.
rabbitmq:
image: rabbitmq:3.13
image: rabbitmq:4.2
volumes:
- /home/runner/rabbitmq_conf:/etc/rabbitmq/conf.d # RABBITMQ_MOUNTED_CONF_DIR
env:
Expand All @@ -482,7 +479,7 @@ jobs:

redis:
# Docker Hub image
image: redis:8.0
image: redis:8.6
# Set health checks to wait until redis has started
options: >-
--name "redis"
Expand Down
16 changes: 14 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
Changelog
=========

in development
--------------
in development - unreleased
---------------------------

Python3.8 and Python3.9 support has been removed.
This release adds support for Python3.12, so StackStorm supports Python versions 3.10 - 3.12

Fixed
~~~~~

Changed
~~~~~~~

Added
~~~~~


3.9.0 - October 10, 2025
Expand Down
80 changes: 44 additions & 36 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ ST2TESTS_REDIS_PORT := 6379

# 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 ?= 25.0.1
SETUPTOOLS_VERSION ?= 75.3.2
PIP_VERSION ?= 25.3
SETUPTOOLS_VERSION ?= 80.10.2
PIP_OPTIONS := $(ST2_PIP_OPTIONS)

ifndef PYLINT_CONCURRENCY
Expand Down Expand Up @@ -174,12 +174,12 @@ install-runners:
@echo "================== INSTALL RUNNERS ===================="
@echo ""
# NOTE: We use xargs to speed things up by installing runners in parallel
echo -e "$(COMPONENTS_RUNNERS)" | tr -d "\n" | xargs -P $(XARGS_CONCURRENCY) -d " " -n1 -i sh -c ". $(VIRTUALENV_DIR)/bin/activate; cd $$(pwd)/{} ; python setup.py develop --no-deps"
echo -e "$(COMPONENTS_RUNNERS)" | tr -d "\n" | xargs -P $(XARGS_CONCURRENCY) -d " " -n1 -i sh -c ". $(VIRTUALENV_DIR)/bin/activate; cd $$(pwd)/{} ; python -m pip install --editable . --no-deps"
#@for component in $(COMPONENTS_RUNNERS); do \
# echo "==========================================================="; \
# echo "Installing runner:" $$component; \
# echo "==========================================================="; \
# #(. $(VIRTUALENV_DIR)/bin/activate; cd $$component; python setup.py develop --no-deps); \
# #(. $(VIRTUALENV_DIR)/bin/activate; cd $$component; python -m pip install --editable . --no-deps); \
#done

.PHONY: install-mock-runners
Expand All @@ -188,12 +188,12 @@ install-mock-runners:
@echo "================== INSTALL MOCK RUNNERS ===================="
@echo ""
# NOTE: We use xargs to speed things up by installing runners in parallel
echo -e "$(MOCK_RUNNERS)" | tr -d "\n" | xargs -P $(XARGS_CONCURRENCY) -d " " -n1 -i sh -c ". $(VIRTUALENV_DIR)/bin/activate; cd $$(pwd)/{} ; python setup.py develop --no-deps"
echo -e "$(MOCK_RUNNERS)" | tr -d "\n" | xargs -P $(XARGS_CONCURRENCY) -d " " -n1 -i sh -c ". $(VIRTUALENV_DIR)/bin/activate; cd $$(pwd)/{} ; python -m pip install --editable . --no-deps"
#@for component in $(MOCK_RUNNERS); do \
# echo "==========================================================="; \
# echo "Installing mock runner:" $$component; \
# echo "==========================================================="; \
# (. $(VIRTUALENV_DIR)/bin/activate; cd $$component; python setup.py develop --no-deps); \
# (. $(VIRTUALENV_DIR)/bin/activate; cd $$component; python -m pip install --editable . --no-deps); \
#done

.PHONY: check-requirements
Expand Down Expand Up @@ -276,7 +276,7 @@ check-python-packages-nightly:
echo "==========================================================="; \
(set -e; cd $$component; ../$(VIRTUALENV_COMPONENTS_DIR)/bin/python setup.py --version) || exit 1; \
(set -e; cd $$component; ../$(VIRTUALENV_COMPONENTS_DIR)/bin/python setup.py sdist bdist_wheel) || exit 1; \
(set -e; cd $$component; ../$(VIRTUALENV_COMPONENTS_DIR)/bin/python setup.py develop --no-deps) || exit 1; \
(set -e; cd $$component; ../$(VIRTUALENV_COMPONENTS_DIR)/bin/python -m pip install --editable . --no-deps) || exit 1; \
($(VIRTUALENV_COMPONENTS_DIR)/bin/python -c "import $$component") || exit 1; \
(set -e; cd $$component; rm -rf dist/; rm -rf $$component.egg-info) || exit 1; \
done
Expand Down Expand Up @@ -505,9 +505,9 @@ flake8: requirements .flake8
touch $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/activate
chmod +x $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/activate

$(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/pip install --upgrade "pip==$(PIP_VERSION)"
$(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/pip install --upgrade "readme_renderer"
$(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/pip install --upgrade "restructuredtext-lint"
$(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/python -m pip install --upgrade "pip==$(PIP_VERSION)"
$(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/python -m pip install --upgrade "readme_renderer"
$(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/python -m pip install --upgrade "restructuredtext-lint"

# Check with readme-renderer
. $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/activate; cd st2client ; ../$(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/python -m readme_renderer README.rst
Expand All @@ -534,10 +534,10 @@ flake8: requirements .flake8
touch $(VIRTUALENV_ST2CLIENT_DIR)/bin/activate
chmod +x $(VIRTUALENV_ST2CLIENT_DIR)/bin/activate

$(VIRTUALENV_ST2CLIENT_DIR)/bin/pip install --upgrade "pip==$(PIP_VERSION)"
$(VIRTUALENV_ST2CLIENT_DIR)/bin/pip install --upgrade "setuptools==$(SETUPTOOLS_VERSION)"
$(VIRTUALENV_ST2CLIENT_DIR)/bin/python -m pip install --upgrade "pip==$(PIP_VERSION)"
$(VIRTUALENV_ST2CLIENT_DIR)/bin/python -m pip install --upgrade "setuptools==$(SETUPTOOLS_VERSION)"

$(VIRTUALENV_ST2CLIENT_DIR)/bin/activate; cd st2client ; ../$(VIRTUALENV_ST2CLIENT_DIR)/bin/pip install . ; cd ..
$(VIRTUALENV_ST2CLIENT_DIR)/bin/activate; cd st2client ; ../$(VIRTUALENV_ST2CLIENT_DIR)/bin/python -m pip install . ; cd ..
$(VIRTUALENV_ST2CLIENT_DIR)/bin/st2 --version
$(VIRTUALENV_ST2CLIENT_DIR)/bin/python -c "import st2client"

Expand Down Expand Up @@ -661,7 +661,7 @@ distclean: clean

.PHONY: .requirements
.requirements: virtualenv
$(VIRTUALENV_DIR)/bin/pip install --upgrade "pip==$(PIP_VERSION)"
$(VIRTUALENV_DIR)/bin/python -m pip install --upgrade "pip==$(PIP_VERSION)"
# Print out pip version
$(VIRTUALENV_DIR)/bin/pip --version
# Generate all requirements to support current CI pipeline.
Expand Down Expand Up @@ -694,32 +694,33 @@ requirements: virtualenv .requirements .sdist-requirements install-runners insta

# Note: Use the verison of virtualenv pinned in fixed-requirements.txt so we
# only have to update it one place when we change the version
$(VIRTUALENV_DIR)/bin/pip install --upgrade $(shell grep "^virtualenv" fixed-requirements.txt)
$(VIRTUALENV_DIR)/bin/pip install --upgrade "setuptools==$(SETUPTOOLS_VERSION)" # workaround for pbr issue
# virtualenv is deprecated, use python -m venv
#$(VIRTUALENV_DIR)/bin/python -m pip install --upgrade $(shell grep "^virtualenv" fixed-requirements.txt)
$(VIRTUALENV_DIR)/bin/python -m pip install --upgrade "setuptools==$(SETUPTOOLS_VERSION)" # workaround for pbr issue

# Install requirements
for req in $(REQUIREMENTS); do \
echo "Installing $$req..." ; \
$(VIRTUALENV_DIR)/bin/pip install $(PIP_OPTIONS) -r $$req ; \
$(VIRTUALENV_DIR)/bin/python -m pip install $(PIP_OPTIONS) -r $$req ; \
done

# Install st2common package to load drivers defined in st2common setup.py
# NOTE: We pass --no-deps to the script so we don't install all the
# package dependencies which are already installed as part of "requirements"
# make targets. This speeds up the build
(cd ${ROOT_DIR}/st2common; ${ROOT_DIR}/$(VIRTUALENV_DIR)/bin/python setup.py develop --no-deps)
(cd ${ROOT_DIR}/st2common; ${ROOT_DIR}/$(VIRTUALENV_DIR)/bin/python -m pip install --editable . --no-deps)

# Install st2common to register metrics drivers
# NOTE: We pass --no-deps to the script so we don't install all the
# package dependencies which are already installed as part of "requirements"
# make targets. This speeds up the build
(cd ${ROOT_DIR}/st2common; ${ROOT_DIR}/$(VIRTUALENV_DIR)/bin/python setup.py develop --no-deps)
(cd ${ROOT_DIR}/st2common; ${ROOT_DIR}/$(VIRTUALENV_DIR)/bin/python -m pip install --editable . --no-deps)

# Install st2auth to register SSO drivers
# NOTE: We pass --no-deps to the script so we don't install all the
# package dependencies which are already installed as part of "requirements"
# make targets. This speeds up the build
(cd ${ROOT_DIR}/st2auth; ${ROOT_DIR}/$(VIRTUALENV_DIR)/bin/python setup.py develop --no-deps)
(cd ${ROOT_DIR}/st2auth; ${ROOT_DIR}/$(VIRTUALENV_DIR)/bin/python -m pip install --editable . --no-deps)

# Some of the tests rely on submodule so we need to make sure submodules are check out
git submodule update --init --recursive --remote
Expand Down Expand Up @@ -819,22 +820,29 @@ unit-tests: requirements .unit-tests
@echo
@echo "----- Dropping st2-test db -----"
@mongosh st2-test --eval "db.dropDatabase();"
@failed=0; \
@failed=(); \
for component in $(COMPONENTS_TEST); do\
echo "==========================================================="; \
echo "Running tests in" $$component; \
echo "-----------------------------------------------------------"; \
. $(VIRTUALENV_DIR)/bin/activate; \
ST2TESTS_REDIS_HOST=$(ST2TESTS_REDIS_HOST) \
ST2TESTS_REDIS_PORT=$(ST2TESTS_REDIS_PORT) \
pytest -rx --verbose \
$$component/tests/unit || ((failed+=1)); \
echo "-----------------------------------------------------------"; \
echo "Done running tests in" $$component; \
echo "==========================================================="; \
if ls $$component/tests/unit/test_*.py 2>/dev/null >/dev/null; then \
echo "==========================================================="; \
echo "Running tests in" $$component; \
echo "-----------------------------------------------------------"; \
. $(VIRTUALENV_DIR)/bin/activate; \
ST2TESTS_REDIS_HOST=$(ST2TESTS_REDIS_HOST) \
ST2TESTS_REDIS_PORT=$(ST2TESTS_REDIS_PORT) \
pytest -rx --verbose $$component/tests/unit; \
RET=$$?; \
test $$RET -eq 0 || failed+=($$component); \
echo "-----------------------------------------------------------"; \
echo "Done running tests in $$component ($$RET)"; \
echo "==========================================================="; \
else \
echo "==========================================================="; \
echo "Skip: no test files for $$component"; \
echo "==========================================================="; \
fi; \
done; \
echo pytest runs failed=$$failed; \
if [ $$failed -gt 0 ]; then exit 1; fi
echo "pytest runs failed=$${failed[@]}"; \
if [[ $${#failed[@]} -gt 0 ]]; then exit 1; fi

.PHONY: .run-unit-tests-coverage
ifdef INCLUDE_TESTS_IN_COVERAGE
Expand Down Expand Up @@ -1058,7 +1066,7 @@ packs-tests: requirements .packs-tests
@echo "==================== packs-tests ===================="
@echo
# Install st2common to register metrics drivers
(cd ${ROOT_DIR}/st2common; ${ROOT_DIR}/$(VIRTUALENV_DIR)/bin/python setup.py develop --no-deps)
(cd ${ROOT_DIR}/st2common; ${ROOT_DIR}/$(VIRTUALENV_DIR)/bin/python -m pip install --editable . --no-deps)
. $(VIRTUALENV_DIR)/bin/activate; find ${ROOT_DIR}/contrib/* -maxdepth 0 -type d -print0 | xargs -0 -I FILENAME ./st2common/bin/st2-run-pack-tests -c -t -x -p FILENAME


Expand Down Expand Up @@ -1122,7 +1130,7 @@ cli:
@echo
@echo "=================== Building st2 client ==================="
@echo
pushd $(CURDIR) && cd st2client && ((python setup.py develop || printf "\n\n!!! ERROR: BUILD FAILED !!!\n") || popd)
pushd $(CURDIR) && cd st2client && ((python -m pip install --editable . || printf "\n\n!!! ERROR: BUILD FAILED !!!\n") || popd)

.PHONY: rpms
rpms:
Expand Down
2 changes: 1 addition & 1 deletion contrib/runners/orquesta_runner/in-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
orquesta@ git+https://github.com/StackStorm/orquesta.git@5ba1467614b2ef8b4709b2ca89e68baa671e8975
orquesta@ git+https://github.com/StackStorm/orquesta.git@updates_st2v3.10
setuptools
4 changes: 2 additions & 2 deletions contrib/runners/orquesta_runner/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
# If you want to update depdencies for a single component, modify the
# in-requirements.txt for that component and then run 'make requirements' to
# update the component requirements.txt
orquesta@ git+https://github.com/StackStorm/orquesta.git@5ba1467614b2ef8b4709b2ca89e68baa671e8975
setuptools<78
orquesta@ git+https://github.com/StackStorm/orquesta.git@updates_st2v3.10
setuptools==80.10.2
6 changes: 3 additions & 3 deletions fixed-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ gitdb==4.0.12
greenlet==3.1.1
gunicorn==23.0.0
jsonpath-rw==1.4.0
jsonschema==3.2.0
jsonschema>=4.18.5
kombu==5.5.4
lockfile==0.12.2
mongoengine==0.29.1
Expand Down Expand Up @@ -72,10 +72,10 @@ tooz==6.3.0
# Note: virtualenv embeds wheels for pip, wheel, and setuptools. So pinning virtualenv pins those as well.
# virtualenv==20.30.0 (<21) has pip==25.0.1 wheel==0.45.1 setuptools==75.3.2
# lockfiles/st2.lock has pip==25.0.1 wheel==0.45.1 setuptools==75.3.2
virtualenv==20.34.0
pip==25.3
# This setuptools version number is in the Makefile, but CircleCI builds are pulling a version
# that is incompatible with our logshipper fork.
setuptools<78
setuptools==80.10.2
webob==1.8.9
webtest==3.0.1
zake==0.2.2
Expand Down
Loading
Loading