Skip to content

Commit f5c0c0f

Browse files
authored
Merge branch 'master' into samesite_cookie_support
2 parents 7233c7b + a80fa2b commit f5c0c0f

File tree

121 files changed

+3657
-499
lines changed

Some content is hidden

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

121 files changed

+3657
-499
lines changed

.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/[email protected]
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: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,124 @@ Changelog
44
in development
55
--------------
66

7+
Fixed
8+
~~~~~
9+
10+
11+
* Fix deserialization bug in st2 API for url encoded payloads. #5536
12+
13+
Contributed by @sravs-dev
14+
15+
* Fix issue of WinRM parameter passing fails for larger scripts.#5538
16+
17+
Contributed by @ashwini-orchestral
18+
19+
* Fix Type error for ``time_diff`` critera comparison. convert the timediff value as float to match
20+
``timedelta.total_seconds()`` return. #5462
21+
22+
Contributed by @blackstrip
23+
24+
* Fix issue with pack option not working when running policy list cli #5534
25+
26+
Contributed by @momokuri-3
27+
28+
* Fix exception thrown if action parameter contains {{ or {% and no closing jinja characters. #5556
29+
30+
contributed by @guzzijones12
31+
32+
* Link shutdown routine and sigterm handler to main thread #5555
33+
34+
Contributed by @khushboobhatia01
35+
36+
* Change compound index for ActionExecutionDB to improve query performance #5568
37+
38+
Contributed by @khushboobhatia01
39+
40+
* Fix build issue due to MarkUpSafe 2.1.0 removing soft_unicode
41+
42+
Contributed by Amanda McGuinness (@amanda11 intive) #5581
43+
44+
Added
45+
~~~~~
46+
47+
* Minor updates for RockyLinux. #5552
48+
Contributed by Amanda McGuinness (@amanda11 intive)
49+
50+
* Added st2 API get action parameters by ref. #5509
51+
52+
API endpoint ``/api/v1/actions/views/parameters/{action_id}`` accepts ``ref_or_id``.
53+
54+
Contributed by @DavidMeu
55+
56+
* Enable setting ttl for MockDatastoreService. #5468
57+
58+
Contributed by @ytjohn
59+
60+
* Added st2 API and CLI command for actions clone operation.
61+
62+
API endpoint ``/api/v1/actions/{ref_or_id}/clone`` takes ``ref_or_id`` of source action.
63+
Request method body takes destination pack and action name. Request method body also takes
64+
optional paramater ``overwrite``. ``overwrite = true`` in case of destination action already exists and to be
65+
overwritten.
66+
67+
CLI command ``st2 action clone <ref_or_id> <dest_pack> <dest_action>`` takes source ``ref_or_id``, destination
68+
pack name and destination action name as mandatory arguments.
69+
In case destionation already exists then command takes optional arugument ``-f`` or ``--force`` to overwrite
70+
destination action. #5345
71+
72+
Contributed by @mahesh-orch.
73+
74+
* Implemented RBAC functionality for existing ``KEY_VALUE_VIEW, KEY_VALUE_SET, KEY_VALUE_DELETE`` and new permission types ``KEY_VALUE_LIST, KEY_VALUE_ALL``.
75+
RBAC is enabled in the ``st2.conf`` file. Access to a key value pair is checked in the KeyValuePair API controller. #5354
76+
77+
Contributed by @m4dcoder and @ashwini-orchestral
78+
79+
* Added service degerestration on shutdown of a service. #5396
80+
81+
Contributed by @khushboobhatia01
82+
83+
* Added pysocks python package for SOCKS proxy support. #5460
84+
85+
Contributed by @kingsleyadam
86+
87+
* Added support for multiple LDAP hosts to st2-auth-ldap. #5535, https://github.com/StackStorm/st2-auth-ldap/pull/100
88+
89+
Contributed by @ktyogurt
90+
91+
* Implemented graceful shutdown for action runner. Enabled ``graceful_shutdown`` in ``st2.conf`` file. #5428
92+
93+
Contributed by @khushboobhatia01
94+
95+
* Enhanced 'search' operator to allow complex criteria matching on payload items. #5482
96+
97+
Contributed by @erceth
98+
99+
* Added cancel/pause/resume requester information to execution context. #5554
100+
101+
Contributed by @khushboobhatia01
102+
103+
* Added `trigger.headers_lower` to webhook trigger payload. This allows rules to match webhook triggers
104+
without dealing with the case-sensitive nature of `trigger.headers`, as `triggers.headers_lower` providers
105+
the same headers, but with the header name lower cased. #5038
106+
107+
Contributed by @Rand01ph
108+
109+
* Added support to override enabled parameter of resources. #5506
110+
111+
Contributed by Amanda McGuinness (@amanda11 Intive)
112+
113+
Fixed
114+
~~~~~
115+
116+
* Fixed regression caused by #5358. Use string lock name instead of object ID. #5484
117+
118+
Contributed by @khushboobhatia01
119+
120+
* Fix ``st2-self-check`` script reporting falsey success when the nested workflows runs failed. #5487
121+
122+
* Use byte type lock name which is supported by all tooz drivers. #5529
123+
124+
Contributed by @khushboobhatia01
7125

8126
3.6.0 - October 29, 2021
9127
------------------------
@@ -13,6 +131,14 @@ Added
13131

14132
* Added possibility to add new values to the KV store via CLI without leaking them to the shell history. #5164
15133

134+
* ``st2.conf`` is now the only place to configure ports for ``st2api``, ``st2auth``, and ``st2stream``.
135+
136+
We replaced the static ``.socket`` sytemd units in deb and rpm packages with a python-based generator for the
137+
``st2api``, ``st2auth``, and ``st2stream`` services. The generators will get ``<ip>:<port>`` from ``st2.conf``
138+
to create the ``.socket`` files dynamically. #5286 and st2-packages#706
139+
140+
Contributed by @nzlosh
141+
16142
Changed
17143
~~~~~~~
18144

@@ -79,6 +205,12 @@ Changed
79205
doesn't support what it does. If anyone uses that utility, they have to install pika manually. #5380
80206

81207
* Fixed version of cffi as changes in 1.15.0 meant that it attempted to load libffi.so.8. #5390
208+
209+
Contributed by @amanda11, Ammeon Solutions
210+
211+
* Updated Bash installer to install latest RabbitMQ version rather than out-dated version available
212+
in OS distributions.
213+
82214
Contributed by @amanda11, Ammeon Solutions
83215

84216
Fixed

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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,11 @@ Contributors are using and occasionally contributing back to the project, might
5151
They're not part of the TSC voting process, but appreciated for their contribution, involvement and may become Maintainers in the future depending on their effort and involvement. See [How to become a Maintainer?](https://github.com/StackStorm/st2/blob/master/GOVERNANCE.md#how-to-become-a-maintainer)
5252
[@StackStorm/contributors](https://github.com/orgs/StackStorm/teams/contributors) are invited to StackStorm Github organization and have permissions to help triage the Issues and review PRs.
5353
* Anand Patel ([@arms11](https://github.com/arms11)), _VMware_ - Docker, Kubernetes.
54+
* Ankur Singh ([@rush-skills](https://github.com/rush-skills)), _CERN_ - Puppet, Core, Docker, K8s.
5455
* Harsh Nanchahal ([@hnanchahal](https://github.com/hnanchahal)), _Starbucks_ - Core, Docker, Kubernetes.
5556
* Hiroyasu Ohyama ([@userlocalhost](https://github.com/userlocalhost)) - Orquesta, Workflows, st2 Japan Community. [Case Study](https://stackstorm.com/case-study-dmm/).
57+
* Khushboo Bhatia ([@khushboobhatia01](https://github.com/khushboobhatia01)), _VMware_ - Core, Orquesta.
58+
* Rick Kauffman ([@xod442](https://github.com/xod442)), _HPE_ - Community, HOWTOs, Blogs, Publications, Docker.
5659
* Sheshagiri Rao Mallipedhi ([@sheshagiri](https://github.com/sheshagiri)) - Docker, Core, StackStorm Exchange.
5760
* Shital Raut ([@shital-orchestral](https://github.com/shital-orchestral)), _Orchestral.ai_ - Web UI.
5861
* Tristan Struthers ([@trstruth](https://github.com/trstruth)) - Docker, K8s, Orquesta, Community.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
[![Join our community Slack](https://img.shields.io/badge/slack-stackstorm-success.svg?logo=slack)](https://stackstorm.com/community-signup)
1212
[![deb/rpm packages](https://img.shields.io/badge/deb/rpm-Packagecloud-%236366f1)](https://packagecloud.io/StackStorm/)
1313
[![Code Search](https://img.shields.io/badge/code%20search-Sourcegraph-%2300B4F2?logo=sourcegraph)](https://sourcegraph.com/stackstorm)
14-
[![Forum](https://img.shields.io/discourse/https/forum.stackstorm.com/posts.svg)](https://forum.stackstorm.com/)
14+
[![GitHub Discussions](https://img.shields.io/github/discussions/stackstorm/st2)](https://github.com/StackStorm/st2/discussions)
1515
[![Twitter Follow](https://img.shields.io/twitter/follow/StackStorm?style=social)](https://twitter.com/StackStorm/)
1616

1717
---

conf/st2.conf.sample

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ enable = True
1010
[actionrunner]
1111
# Internal pool size for dispatcher used by regular actions.
1212
actions_pool_size = 60
13+
# How long to wait for process (in seconds) to exit after receiving shutdown signal.
14+
exit_still_active_check = 300
15+
# This will enable the graceful shutdown and wait for ongoing requests to complete until exit_timeout.
16+
graceful_shutdown = True
1317
# location of the logging.conf file
1418
logging = /etc/st2/logging.actionrunner.conf
1519
# List of pip options to be passed to "pip install" command when installing pack dependencies into pack virtual environment.
@@ -18,6 +22,8 @@ pip_opts = # comma separated list allowed here.
1822
python_binary = /usr/bin/python
1923
# Default log level to use for Python runner actions. Can be overriden on invocation basis using "log_level" runner parameter.
2024
python_runner_log_level = DEBUG
25+
# Time interval between subsequent queries to check running executions.
26+
still_active_check_interval = 2
2127
# True to store and stream action output (stdout and stderr) in real-time.
2228
stream_output = True
2329
# Buffer size to use for real time action output streaming. 0 means unbuffered 1 means line buffered, -1 means system default, which usually means fully buffered and any other positive value means use a buffer of (approximately) that size

0 commit comments

Comments
 (0)