Skip to content

Commit 743dfdb

Browse files
authored
Merge branch 'master' into watch_multiple_files
2 parents c533291 + d25d43f commit 743dfdb

141 files changed

Lines changed: 5786 additions & 539 deletions

File tree

Some content is hidden

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

.circleci/config.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,7 @@ jobs:
127127
- setup_remote_docker:
128128
reusable: true # default - false
129129
exclusive: true # default - true
130-
# Temporary workaround for Circle CI issue
131-
# https://discuss.circleci.com/t/setup-remote-docker-connection-failures/26434
132-
version: 18.05.0-ce
130+
version: 19.03.14
133131
- run:
134132
name: Docker version
135133
command: |
@@ -176,7 +174,7 @@ jobs:
176174
docker cp . st2-packages-vol:${ST2_GITDIR}
177175
- run:
178176
name: Pull dependent Docker Images
179-
command: .circle/docker-compose2.sh pull ${DISTRO}
177+
command: .circle/docker-compose2.sh pull ${DISTRO} || .circle/docker-compose2.sh pull ${DISTRO}
180178
working_directory: ~/st2-packages
181179
- run:
182180
name: Build the ${DISTRO} Packages
@@ -186,14 +184,6 @@ jobs:
186184
mkdir -p ~/st2/packages/${DISTRO}/log/
187185
docker cp st2-packages-vol:/root/build/. ~/st2/packages/${DISTRO}
188186
working_directory: ~/st2-packages
189-
# # TODO: It works! (~0.5-1min speed-up) Enable CircleCI2.0 cache for pip and wheelhouse later
190-
# - run:
191-
# name: Build the ${DISTRO} Packages 2nd time (compare with pip/wheelhouse cached)
192-
# command: |
193-
# .circle/docker-compose2.sh build ${DISTRO}
194-
# # Once build container finishes we can copy packages directly from it
195-
# docker cp st2-packages-vol:/root/build /tmp/st2-packages
196-
# working_directory: ~/st2-packages
197187
- run:
198188
name: Test the Packages
199189
command: .circle/docker-compose2.sh test ${DISTRO}

.github/workflows/checks.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Checks
2+
3+
on:
4+
pull_request:
5+
types: [assigned, opened, synchronize, reopened, labeled, unlabeled]
6+
branches:
7+
- master
8+
- v[0-9]+.[0-9]+
9+
10+
jobs:
11+
# Changelog checker will verify if CHANGELOG.rst was updated for every PR
12+
# See: https://keepachangelog.com/en/1.0.0/
13+
changelog-checker:
14+
name: Add CHANGELOG.rst
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v1
18+
- name: Changelog check
19+
# https://github.com/marketplace/actions/changelog-checker
20+
uses: Zomzog/changelog-checker@v1.2.0
21+
with:
22+
fileName: CHANGELOG.rst
23+
checkNotification: Simple
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yaml

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ on:
2121
- cron: '0 0 * * *'
2222

2323
jobs:
24+
# TODO: Fix the required checks!
25+
# When the pre_job triggers and skips builds, it prevents merging the PR because
26+
# the required checks are reported as skipped instead of passed.
2427
# Special job which automatically cancels old runs for the same branch, prevents runs for the
2528
# same file set which has already passed, etc.
2629
pre_job:
@@ -40,7 +43,7 @@ jobs:
4043
needs: pre_job
4144
# NOTE: We always want to run job on master since we run some additional checks there (code
4245
# coverage, etc)
43-
if: ${{ needs.pre_job.outputs.should_skip != 'true' || github.ref == 'refs/heads/master' }}
46+
# if: ${{ needs.pre_job.outputs.should_skip != 'true' || github.ref == 'refs/heads/master' }}
4447
name: '${{ matrix.name }} - Python ${{ matrix.python-version-short }}'
4548
runs-on: ubuntu-latest
4649
strategy:
@@ -92,9 +95,11 @@ jobs:
9295
# TODO: maybe make the virtualenv a partial cache to exclude st2*?
9396
# !virtualenv/lib/python*/site-packages/st2*
9497
# !virtualenv/bin/st2*
95-
key: ${{ runner.os }}-v3-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
96-
restore-keys: |
97-
${{ runner.os }}-v2-python-${{ matrix.python }}-
98+
key: ${{ runner.os }}-v4-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
99+
# Don't use alternative key as if requirements.txt has altered we
100+
# don't want to retrieve previous cache
101+
#restore-keys: |
102+
# ${{ runner.os }}-v4-python-${{ matrix.python }}-
98103
- name: Cache APT Dependencies
99104
id: cache-apt-deps
100105
uses: actions/cache@v2
@@ -135,7 +140,8 @@ jobs:
135140
needs: pre_job
136141
# NOTE: We always want to run job on master since we run some additional checks there (code
137142
# coverage, etc)
138-
if: ${{ needs.pre_job.outputs.should_skip != 'true' || github.ref == 'refs/heads/master' }}
143+
# NB: disabled. See TODO above pre_job
144+
# if: ${{ needs.pre_job.outputs.should_skip != 'true' || github.ref == 'refs/heads/master' }}
139145
name: '${{ matrix.name }} - Python ${{ matrix.python-version-short }}'
140146
runs-on: ubuntu-latest
141147
strategy:
@@ -233,9 +239,11 @@ jobs:
233239
# TODO: maybe make the virtualenv a partial cache to exclude st2*?
234240
# !virtualenv/lib/python*/site-packages/st2*
235241
# !virtualenv/bin/st2*
236-
key: ${{ runner.os }}-v3-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
237-
restore-keys: |
238-
${{ runner.os }}-python-${{ matrix.python }}-
242+
key: ${{ runner.os }}-v4-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
243+
# Don't use alternative key as if requirements.txt has altered we
244+
# don't want to retrieve previous cache
245+
#restore-keys: |
246+
# ${{ runner.os }}-v4-python-${{ matrix.python }}-
239247
- name: Cache APT Dependencies
240248
id: cache-apt-deps
241249
uses: actions/cache@v2
@@ -304,7 +312,7 @@ jobs:
304312
needs: pre_job
305313
# NOTE: We always want to run job on master since we run some additional checks there (code
306314
# coverage, etc)
307-
if: ${{ needs.pre_job.outputs.should_skip != 'true' || github.ref == 'refs/heads/master' }}
315+
# if: ${{ needs.pre_job.outputs.should_skip != 'true' || github.ref == 'refs/heads/master' }}
308316
name: '${{ matrix.name }} - Python ${{ matrix.python-version-short }}'
309317
runs-on: ubuntu-latest
310318
strategy:
@@ -428,6 +436,7 @@ jobs:
428436

429437
# GitHub is juggling how to set vars for multiple shells. Protect our PATH assumptions.
430438
PATH: /home/runner/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
439+
431440
steps:
432441
- name: Checkout repository
433442
uses: actions/checkout@v2
@@ -448,9 +457,11 @@ jobs:
448457
# TODO: maybe make the virtualenv a partial cache to exclude st2*?
449458
# !virtualenv/lib/python*/site-packages/st2*
450459
# !virtualenv/bin/st2*
451-
key: ${{ runner.os }}-v3-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
452-
restore-keys: |
453-
${{ runner.os }}-python-${{ matrix.python }}-
460+
key: ${{ runner.os }}-v4-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
461+
# Don't use alternative key as if requirements.txt has altered we
462+
# don't want to retrieve previous cache
463+
#restore-keys: |
464+
# ${{ runner.os }}-v4-python-${{ matrix.python }}-
454465
- name: Cache APT Dependencies
455466
id: cache-apt-deps
456467
uses: actions/cache@v2

.github/workflows/microbenchmarks.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ jobs:
8686
~/.cache/pip
8787
virtualenv
8888
~/virtualenv
89-
key: ${{ runner.os }}-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
89+
key: ${{ runner.os }}-v4-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
9090
restore-keys: |
91-
${{ runner.os }}-python-${{ matrix.python }}-
91+
${{ runner.os }}-v4-python-${{ matrix.python }}-
9292
- name: Cache APT Dependencies
9393
id: cache-apt-deps
9494
uses: actions/cache@v2

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ on:
2525
- cron: '0 0 * * *'
2626

2727
jobs:
28+
# TODO: Fix the required checks!
29+
# When the pre_job triggers and skips builds, it prevents merging the PR because
30+
# the required checks are reported as skipped instead of passed.
2831
# Special job which automatically cancels old runs for the same branch, prevents runs for the
2932
# same file set which has already passed, etc.
3033
pre_job:
@@ -43,7 +46,7 @@ jobs:
4346
needs: pre_job
4447
# NOTE: We always want to run job on master since we run some additional checks there (code
4548
# coverage, etc)
46-
if: ${{ needs.pre_job.outputs.should_skip != 'true' || github.ref == 'refs/heads/master' }}
49+
# if: ${{ needs.pre_job.outputs.should_skip != 'true' || github.ref == 'refs/heads/master' }}
4750
name: '${{ matrix.name }} - Python ${{ matrix.python-version-short }}'
4851
runs-on: ubuntu-latest
4952
strategy:
@@ -139,9 +142,9 @@ jobs:
139142
# TODO: maybe make the virtualenv a partial cache to exclude st2*?
140143
# !virtualenv/lib/python*/site-packages/st2*
141144
# !virtualenv/bin/st2*
142-
key: ${{ runner.os }}-v3-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
145+
key: ${{ runner.os }}-v4-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
143146
restore-keys: |
144-
${{ runner.os }}-python-${{ matrix.python }}-
147+
${{ runner.os }}-v4-python-${{ matrix.python }}-
145148
- name: Cache APT Dependencies
146149
id: cache-apt-deps
147150
uses: actions/cache@v2

CHANGELOG.rst

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,174 @@ in development
77
Fixed
88
~~~~~
99

10+
* Fix deserialization bug in st2 API for url encoded payloads. #5536
11+
12+
Contributed by @sravs-dev
13+
14+
* Fix issue of WinRM parameter passing fails for larger scripts.#5538
15+
16+
Contributed by @ashwini-orchestral
17+
18+
* Fix Type error for ``time_diff`` critera comparison. convert the timediff value as float to match
19+
``timedelta.total_seconds()`` return. #5462
20+
21+
Contributed by @blackstrip
22+
23+
* Fix issue with pack option not working when running policy list cli #5534
24+
25+
Contributed by @momokuri-3
26+
27+
* Fix exception thrown if action parameter contains {{ or {% and no closing jinja characters. #5556
28+
29+
contributed by @guzzijones12
30+
31+
* Link shutdown routine and sigterm handler to main thread #5555
32+
33+
Contributed by @khushboobhatia01
34+
35+
* Change compound index for ActionExecutionDB to improve query performance #5568
36+
37+
Contributed by @khushboobhatia01
38+
39+
* Fix build issue due to MarkUpSafe 2.1.0 removing soft_unicode
40+
41+
Contributed by Amanda McGuinness (@amanda11 intive) #5581
42+
43+
Added
44+
~~~~~
45+
46+
* Minor updates for RockyLinux. #5552
47+
Contributed by Amanda McGuinness (@amanda11 intive)
48+
49+
* Added st2 API get action parameters by ref. #5509
50+
51+
API endpoint ``/api/v1/actions/views/parameters/{action_id}`` accepts ``ref_or_id``.
52+
53+
Contributed by @DavidMeu
54+
55+
* Enable setting ttl for MockDatastoreService. #5468
56+
57+
Contributed by @ytjohn
58+
59+
* Added st2 API and CLI command for actions clone operation.
60+
61+
API endpoint ``/api/v1/actions/{ref_or_id}/clone`` takes ``ref_or_id`` of source action.
62+
Request method body takes destination pack and action name. Request method body also takes
63+
optional paramater ``overwrite``. ``overwrite = true`` in case of destination action already exists and to be
64+
overwritten.
65+
66+
CLI command ``st2 action clone <ref_or_id> <dest_pack> <dest_action>`` takes source ``ref_or_id``, destination
67+
pack name and destination action name as mandatory arguments.
68+
In case destionation already exists then command takes optional arugument ``-f`` or ``--force`` to overwrite
69+
destination action. #5345
70+
71+
Contributed by @mahesh-orch.
72+
73+
* Implemented RBAC functionality for existing ``KEY_VALUE_VIEW, KEY_VALUE_SET, KEY_VALUE_DELETE`` and new permission types ``KEY_VALUE_LIST, KEY_VALUE_ALL``.
74+
RBAC is enabled in the ``st2.conf`` file. Access to a key value pair is checked in the KeyValuePair API controller. #5354
75+
76+
Contributed by @m4dcoder and @ashwini-orchestral
77+
78+
* Added service degerestration on shutdown of a service. #5396
79+
80+
Contributed by @khushboobhatia01
81+
82+
* Added pysocks python package for SOCKS proxy support. #5460
83+
84+
Contributed by @kingsleyadam
85+
86+
* Added support for multiple LDAP hosts to st2-auth-ldap. #5535, https://github.com/StackStorm/st2-auth-ldap/pull/100
87+
88+
Contributed by @ktyogurt
89+
90+
* Implemented graceful shutdown for action runner. Enabled ``graceful_shutdown`` in ``st2.conf`` file. #5428
91+
92+
Contributed by @khushboobhatia01
93+
94+
* Enhanced 'search' operator to allow complex criteria matching on payload items. #5482
95+
96+
Contributed by @erceth
97+
98+
* Added cancel/pause/resume requester information to execution context. #5554
99+
100+
Contributed by @khushboobhatia01
101+
102+
* Added `trigger.headers_lower` to webhook trigger payload. This allows rules to match webhook triggers
103+
without dealing with the case-sensitive nature of `trigger.headers`, as `triggers.headers_lower` providers
104+
the same headers, but with the header name lower cased. #5038
105+
106+
Contributed by @Rand01ph
107+
108+
* Added support to override enabled parameter of resources. #5506
109+
110+
Contributed by Amanda McGuinness (@amanda11 Intive)
111+
112+
* Add new ``api.auth_cookie_secure`` and ``api.auth_cookie_same_site`` config options which
113+
specify values which are set for ``secure`` and ``SameSite`` attribute for the auth cookie
114+
we set when authenticating via token / api key in query parameter value (e.g. via st2web).
115+
116+
For security reasons, ``api.auth_cookie_secure`` defaults to ``True``. This should only be
117+
changed to ``False`` if you have a valid reason to not run StackStorm behind HTTPs proxy.
118+
119+
Default value for ``api.auth_cookie_same_site`` is ``lax``. If you want to disable this
120+
functionality so it behaves the same as in the previous releases, you can set that option
121+
to ``None``.
122+
123+
#5248
124+
125+
Contributed by @Kami.
126+
127+
* Add new ``st2 action-alias test <message string>`` CLI command which allows users to easily
128+
test action alias matching and result formatting.
129+
130+
This command will first try to find a matching alias (same as ``st2 action-alias match``
131+
command) and if a match is found, trigger an execution (same as ``st2 action-alias execute``
132+
command) and format the execution result.
133+
134+
This means it uses exactly the same flow as commands on chat, but the interaction avoids
135+
chat and hubot which should make testing and developing aliases easier and faster. #5143
136+
137+
#5143
138+
139+
Contributed by @Kami.
140+
141+
* Add new ``credentials.basic_auth = username:password`` CLI configuration option.
142+
143+
This argument allows client to use additional set of basic auth credentials when talking to the
144+
StackStorm API endpoints (api, auth, stream) - that is, in addition to the token / api key
145+
native StackStorm auth.
146+
147+
This allows for simple basic auth based multi factor authentication implementation for
148+
installations which don't utilize SSO.
149+
150+
#5152
151+
152+
Contributed by @Kami.
153+
154+
* Added garbage collection for rule_enforcement and trace models #5596/5602
155+
Contributed by Amanda McGuinness (@amanda11 intive)
156+
157+
* Added garbage collection for workflow execution and task execution objects #4924
158+
Contributed by @srimandaleeka01 and @amanda11
159+
160+
161+
Fixed
162+
~~~~~
163+
164+
* Fixed regression caused by #5358. Use string lock name instead of object ID. #5484
165+
166+
Contributed by @khushboobhatia01
167+
168+
* Fix ``st2-self-check`` script reporting falsey success when the nested workflows runs failed. #5487
169+
170+
* Use byte type lock name which is supported by all tooz drivers. #5529
171+
172+
Contributed by @khushboobhatia01
173+
174+
* Fixed issue where pack index searches are ignoring no_proxy #5497
175+
176+
Contributed by @minsis
177+
10178
* Fixed trigger references emitted by ``linux.file_watch.line``. #5467
11179

12180
Prior to this patch multiple files could be watched but the rule reference of last registered file

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ check-python-packages-nightly:
269269
@echo ""
270270

271271
test -f $(VIRTUALENV_COMPONENTS_DIR)/bin/activate || $(PYTHON_VERSION) -m venv $(VIRTUALENV_COMPONENTS_DIR) --system-site-packages
272+
$(VIRTUALENV_COMPONENTS_DIR)/bin/pip install wheel
272273
@for component in $(COMPONENTS_WITHOUT_ST2TESTS); do \
273274
echo "==========================================================="; \
274275
echo "Checking component:" $$component; \

OWNERS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ They're not part of the TSC voting process, but appreciated for their contributi
5555
* Harsh Nanchahal ([@hnanchahal](https://github.com/hnanchahal)), _Starbucks_ - Core, Docker, Kubernetes.
5656
* Hiroyasu Ohyama ([@userlocalhost](https://github.com/userlocalhost)) - Orquesta, Workflows, st2 Japan Community. [Case Study](https://stackstorm.com/case-study-dmm/).
5757
* Khushboo Bhatia ([@khushboobhatia01](https://github.com/khushboobhatia01)), _VMware_ - Core, Orquesta.
58+
* Rick Kauffman ([@xod442](https://github.com/xod442)), _HPE_ - Community, HOWTOs, Blogs, Publications, Docker.
5859
* Sheshagiri Rao Mallipedhi ([@sheshagiri](https://github.com/sheshagiri)) - Docker, Core, StackStorm Exchange.
5960
* Shital Raut ([@shital-orchestral](https://github.com/shital-orchestral)), _Orchestral.ai_ - Web UI.
6061
* Tristan Struthers ([@trstruth](https://github.com/trstruth)) - Docker, K8s, Orquesta, Community.

0 commit comments

Comments
 (0)