Skip to content

Commit f744a26

Browse files
authored
#6118: Bump minimum python version to 3.8 and Upgrade pantsbuild to 2.17
2 parents de8948b + 1df2823 commit f744a26

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2803
-4578
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,6 @@ jobs:
5454
# NOTE: We need to use full Python version as part of Python deps cache key otherwise
5555
# setup virtualenv step will fail.
5656
include:
57-
- name: 'Lint Checks (black, flake8, etc.)'
58-
task: 'ci-checks'
59-
python-version-short: '3.6'
60-
python-version: '3.6.13'
61-
- name: 'Compile (pip deps, pylint, etc.)'
62-
task: 'ci-compile'
63-
python-version-short: '3.6'
64-
python-version: '3.6.13'
6557
- name: 'Lint Checks (black, flake8, etc.)'
6658
task: 'ci-checks'
6759
python-version-short: '3.8'
@@ -152,10 +144,6 @@ jobs:
152144
fail-fast: false
153145
matrix:
154146
include:
155-
# TODO: Check if we want to fix the errors on Py 3.6 to have it tested as well
156-
#- name: 'Self-check on Python 3.6'
157-
# python-version-short: '3.6'
158-
# python-version: '3.6.13'
159147
- name: 'Self-check on Python 3.8'
160148
python-version-short: '3.8'
161149
python-version: '3.8.14'
@@ -312,18 +300,6 @@ jobs:
312300
# NOTE: To speed the CI run, we split unit and integration tests into multiple jobs where
313301
# each job runs subset of tests.
314302
include:
315-
- name: 'Unit Tests (chunk 1)'
316-
task: 'ci-unit'
317-
nosetests_node_total: 2
318-
nosetests_node_index: 0
319-
python-version-short: '3.6'
320-
python-version: '3.6.13'
321-
- name: 'Unit Tests (chunk 2)'
322-
task: 'ci-unit'
323-
nosetests_node_total: 2
324-
nosetests_node_index: 1
325-
python-version-short: '3.6'
326-
python-version: '3.6.13'
327303
- name: 'Unit Tests (chunk 1)'
328304
task: 'ci-unit'
329305
nosetests_node_total: 2
@@ -499,24 +475,6 @@ jobs:
499475
include:
500476
# We run pack tests here since they rely on some integration tests set
501477
# up (aka stanley user being present, etc.)
502-
- name: 'Pack Tests'
503-
task: 'ci-packs-tests'
504-
nosetests_node_total: 1
505-
nosetests_node_index: 0
506-
python-version-short: '3.6'
507-
python-version: '3.6.13'
508-
- name: 'Integration Tests (chunk 1)'
509-
task: 'ci-integration'
510-
nosetests_node_total: 2
511-
nosetests_node_index: 0
512-
python-version-short: '3.6'
513-
python-version: '3.6.13'
514-
- name: 'Integration Tests (chunk 2)'
515-
task: 'ci-integration'
516-
nosetests_node_total: 2
517-
nosetests_node_index: 1
518-
python-version-short: '3.6'
519-
python-version: '3.6.13'
520478
- name: 'Pack Tests'
521479
task: 'ci-packs-tests'
522480
nosetests_node_total: 1

.github/workflows/lint.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
./scripts/github/install-apt-packages-use-cache.sh
5858
5959
- name: Initialize Pants and its GHA caches
60-
uses: pantsbuild/actions/init-pants@v2
60+
uses: pantsbuild/actions/init-pants@v6-scie-pants
6161
# This action adds an env var to make pants use both pants.ci.toml & pants.toml.
6262
# This action also creates 3 GHA caches (1 is optional).
6363
# - `pants-setup` has the bootsrapped pants install
@@ -75,10 +75,12 @@ jobs:
7575
named-caches-hash: ${{ hashFiles('requirements.txt') }}
7676
# enable the optional lmdb_store cache since we're not using remote caching.
7777
cache-lmdb-store: 'true'
78+
# install whatever version of python we need for our in-repo pants-plugins
79+
setup-python-for-plugins: 'true'
7880

7981
- name: Lint
8082
run: |
81-
./pants lint ::
83+
pants lint ::
8284
8385
- name: Upload pants log
8486
uses: actions/upload-artifact@v2

.github/workflows/microbenchmarks.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,6 @@ jobs:
3434
# NOTE: We need to use full Python version as part of Python deps cache key otherwise
3535
# setup virtualenv step will fail.
3636
include:
37-
- name: 'Microbenchmarks'
38-
task: 'micro-benchmarks'
39-
nosetests_node_total: 1
40-
nosetests_node_index: 0
41-
python-version-short: '3.6'
42-
python-version: '3.6.13'
4337
- name: 'Microbenchmarks'
4438
task: 'micro-benchmarks'
4539
nosetests_node_total: 1

.github/workflows/orquesta-integration-tests.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,6 @@ jobs:
5555
# NOTE: We need to use full Python version as part of Python deps cache key otherwise
5656
# setup virtualenv step will fail.
5757
include:
58-
- name: 'Integration Tests (Orquesta)'
59-
task: 'ci-orquesta'
60-
nosetests_node_total: 1
61-
nosetests_node_index: 0
62-
python-version: '3.6.13'
63-
python-version-short: '3.6'
6458
- name: 'Integration Tests (Orquesta)'
6559
task: 'ci-orquesta'
6660
nosetests_node_total: 1

.github/workflows/pants.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
submodules: 'true'
3131

3232
- name: Initialize Pants and its GHA caches
33-
uses: pantsbuild/actions/init-pants@v2
33+
uses: pantsbuild/actions/init-pants@v6-scie-pants
3434
# This action adds an env var to make pants use both pants.ci.toml & pants.toml.
3535
# This action also creates 3 GHA caches (1 is optional).
3636
# - `pants-setup` has the bootsrapped pants install
@@ -48,10 +48,12 @@ jobs:
4848
named-caches-hash: ${{ hashFiles('requirements.txt') }}
4949
# enable the optional lmdb_store cache since we're not using remote caching.
5050
cache-lmdb-store: 'true'
51+
# install whatever version of python we need for our in-repo pants-plugins
52+
setup-python-for-plugins: 'true'
5153

5254
- name: Check BUILD files
5355
run: |
54-
./pants tailor --check update-build-files --check ::
56+
pants tailor --check update-build-files --check ::
5557
5658
- name: Upload pants log
5759
uses: actions/upload-artifact@v2

.github/workflows/test.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ jobs:
3232
# NOTE: We need to use full Python version as part of Python deps cache key otherwise
3333
# setup virtualenv step will fail.
3434
include:
35-
- name: 'Test (pants runs: pytest)'
36-
python-version-short: '3.6'
37-
python-version: '3.6.13'
3835
- name: 'Test (pants runs: pytest)'
3936
python-version-short: '3.8'
4037
python-version: '3.8.10'
@@ -105,7 +102,7 @@ jobs:
105102
./scripts/github/install-apt-packages-use-cache.sh
106103
107104
- name: Initialize Pants and its GHA caches
108-
uses: pantsbuild/actions/init-pants@v2
105+
uses: pantsbuild/actions/init-pants@v6-scie-pants
109106
# This action adds an env var to make pants use both pants.ci.toml & pants.toml.
110107
# This action also creates 3 GHA caches (1 is optional).
111108
# - `pants-setup` has the bootsrapped pants install
@@ -123,13 +120,15 @@ jobs:
123120
named-caches-hash: ${{ hashFiles('requirements.txt') }}
124121
# enable the optional lmdb_store cache since we're not using remote caching.
125122
cache-lmdb-store: 'true'
123+
# install whatever version of python we need for our in-repo pants-plugins
124+
setup-python-for-plugins: 'true'
126125

127126
- name: Test
128127
# We do not support running pytest everywhere yet. When we do it will be simply:
129-
# ./pants test ::
128+
# pants test ::
130129
# Until then, we need to manually adjust this command line to test what we can.
131130
run: |
132-
./pants test pylint_plugins/:: pants-plugins/::
131+
pants test pylint_plugins/:: pants-plugins/::
133132
134133
- name: Upload pants log
135134
uses: actions/upload-artifact@v2

BUILD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,7 @@ file(
4747
name="license",
4848
source="LICENSE",
4949
)
50+
51+
shell_sources(
52+
name="root",
53+
)

BUILD.tools

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ python_requirement(
77
"bandit==1.7.0",
88
"setuptools",
99
"GitPython==3.1.18",
10-
# bandit needs stevedore which needs importlib-metadata<5
11-
# see: https://github.com/PyCQA/bandit/pull/952
12-
"importlib-metadata<5;python_version<'3.8'",
1310
],
1411
)
1512

@@ -40,14 +37,18 @@ python_requirement(
4037
resolve="pytest",
4138
requirements=[
4239
"pytest==7.0.1", # copied from https://www.pantsbuild.org/v2.14/docs/reference-pytest#version
43-
"pytest-benchmark[histogram]==3.4.1",
44-
# "pytest-timer[colorama]",
45-
"pytest-icdiff",
46-
"pygments",
47-
# "pytest-timeout",
48-
# "pytest-mock",
49-
"pytest-cov>=2.12,!=2.12.1,<3.1",
50-
"pytest-xdist>=2.5,<3",
40+
"pytest-benchmark[histogram]==3.4.1", # used for st2common/benchmarks
41+
# "pytest-timer[colorama]", # report test timing (--with-timer ala nose-timer)
42+
"pytest-icdiff", # make diff output easier to read
43+
"pygments", # highlight code in tracebacks
44+
#
45+
# other possible plugins
46+
# "pytest-timeout", # time limit on tests
47+
# "pytest-mock", # more convenient mocking
48+
#
49+
# needed by pants
50+
"pytest-cov>=2.12,!=2.12.1,<3.1", # coverage
51+
"pytest-xdist>=2.5,<3", # parallel test runs (pants uses this if [pytest].xdist_enabled)
5152
],
5253
)
5354

CHANGELOG.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,24 @@ Changelog
33

44
in development
55
--------------
6+
7+
Python 3.6 is no longer supported; Stackstorm requires at least Python 3.8.
8+
69
Fixed
710
~~~~~
811

12+
Changed
13+
~~~~~~~
14+
* Bumped `jsonschema` 2.6.0 -> 3.2.0 now that python3.6 is not supported. #6118
15+
16+
Added
17+
~~~~~
18+
* Continue introducing `pants <https://www.pantsbuild.org/docs>`_ to improve DX (Developer Experience)
19+
working on StackStorm, improve our security posture, and improve CI reliability thanks in part
20+
to pants' use of PEX lockfiles. This is not a user-facing addition.
21+
#6118
22+
Contributed by @cognifloyd
23+
924
3.8.1 - December 13, 2023
1025
-------------------------
1126
Fixed

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,11 @@ COMPONENTS_TEST_DIRS := $(wildcard st2*/tests) $(wildcard contrib/runners/*/test
3737
COMPONENT_SPECIFIC_TESTS := st2tests st2client.egg-info
3838

3939
# nasty hack to get a space into a variable
40+
space_char := $(subst ,, )
4041
colon := :
4142
comma := ,
4243
dot := .
4344
slash := /
44-
space_char :=
45-
space_char +=
4645
COMPONENT_PYTHONPATH = $(subst $(space_char),:,$(realpath $(COMPONENTS_WITH_RUNNERS)))
4746
COMPONENTS_TEST := $(foreach component,$(filter-out $(COMPONENT_SPECIFIC_TESTS),$(COMPONENTS_WITH_RUNNERS)),$(component))
4847
COMPONENTS_TEST_COMMA := $(subst $(slash),$(dot),$(subst $(space_char),$(comma),$(COMPONENTS_TEST)))

0 commit comments

Comments
 (0)