Skip to content

Commit

Permalink
Merge branch 'master' into samesite_cookie_support
Browse files Browse the repository at this point in the history
  • Loading branch information
Kami authored Mar 27, 2022
2 parents 7233c7b + a80fa2b commit f5c0c0f
Show file tree
Hide file tree
Showing 121 changed files with 3,657 additions and 499 deletions.
14 changes: 2 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@ jobs:
- setup_remote_docker:
reusable: true # default - false
exclusive: true # default - true
# Temporary workaround for Circle CI issue
# https://discuss.circleci.com/t/setup-remote-docker-connection-failures/26434
version: 18.05.0-ce
version: 19.03.14
- run:
name: Docker version
command: |
Expand Down Expand Up @@ -176,7 +174,7 @@ jobs:
docker cp . st2-packages-vol:${ST2_GITDIR}
- run:
name: Pull dependent Docker Images
command: .circle/docker-compose2.sh pull ${DISTRO}
command: .circle/docker-compose2.sh pull ${DISTRO} || .circle/docker-compose2.sh pull ${DISTRO}
working_directory: ~/st2-packages
- run:
name: Build the ${DISTRO} Packages
Expand All @@ -186,14 +184,6 @@ jobs:
mkdir -p ~/st2/packages/${DISTRO}/log/
docker cp st2-packages-vol:/root/build/. ~/st2/packages/${DISTRO}
working_directory: ~/st2-packages
# # TODO: It works! (~0.5-1min speed-up) Enable CircleCI2.0 cache for pip and wheelhouse later
# - run:
# name: Build the ${DISTRO} Packages 2nd time (compare with pip/wheelhouse cached)
# command: |
# .circle/docker-compose2.sh build ${DISTRO}
# # Once build container finishes we can copy packages directly from it
# docker cp st2-packages-vol:/root/build /tmp/st2-packages
# working_directory: ~/st2-packages
- run:
name: Test the Packages
command: .circle/docker-compose2.sh test ${DISTRO}
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Checks

on:
pull_request:
types: [assigned, opened, synchronize, reopened, labeled, unlabeled]
branches:
- master
- v[0-9]+.[0-9]+

jobs:
# Changelog checker will verify if CHANGELOG.rst was updated for every PR
# See: https://keepachangelog.com/en/1.0.0/
changelog-checker:
name: Add CHANGELOG.rst
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Changelog check
# https://github.com/marketplace/actions/changelog-checker
uses: Zomzog/changelog-checker@v1.2.0
with:
fileName: CHANGELOG.rst
checkNotification: Simple
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35 changes: 23 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ on:
- cron: '0 0 * * *'

jobs:
# TODO: Fix the required checks!
# When the pre_job triggers and skips builds, it prevents merging the PR because
# the required checks are reported as skipped instead of passed.
# Special job which automatically cancels old runs for the same branch, prevents runs for the
# same file set which has already passed, etc.
pre_job:
Expand All @@ -40,7 +43,7 @@ jobs:
needs: pre_job
# NOTE: We always want to run job on master since we run some additional checks there (code
# coverage, etc)
if: ${{ needs.pre_job.outputs.should_skip != 'true' || github.ref == 'refs/heads/master' }}
# if: ${{ needs.pre_job.outputs.should_skip != 'true' || github.ref == 'refs/heads/master' }}
name: '${{ matrix.name }} - Python ${{ matrix.python-version-short }}'
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -92,9 +95,11 @@ jobs:
# TODO: maybe make the virtualenv a partial cache to exclude st2*?
# !virtualenv/lib/python*/site-packages/st2*
# !virtualenv/bin/st2*
key: ${{ runner.os }}-v3-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
restore-keys: |
${{ runner.os }}-v2-python-${{ matrix.python }}-
key: ${{ runner.os }}-v4-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
# Don't use alternative key as if requirements.txt has altered we
# don't want to retrieve previous cache
#restore-keys: |
# ${{ runner.os }}-v4-python-${{ matrix.python }}-
- name: Cache APT Dependencies
id: cache-apt-deps
uses: actions/cache@v2
Expand Down Expand Up @@ -135,7 +140,8 @@ jobs:
needs: pre_job
# NOTE: We always want to run job on master since we run some additional checks there (code
# coverage, etc)
if: ${{ needs.pre_job.outputs.should_skip != 'true' || github.ref == 'refs/heads/master' }}
# NB: disabled. See TODO above pre_job
# if: ${{ needs.pre_job.outputs.should_skip != 'true' || github.ref == 'refs/heads/master' }}
name: '${{ matrix.name }} - Python ${{ matrix.python-version-short }}'
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -233,9 +239,11 @@ jobs:
# TODO: maybe make the virtualenv a partial cache to exclude st2*?
# !virtualenv/lib/python*/site-packages/st2*
# !virtualenv/bin/st2*
key: ${{ runner.os }}-v3-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
restore-keys: |
${{ runner.os }}-python-${{ matrix.python }}-
key: ${{ runner.os }}-v4-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
# Don't use alternative key as if requirements.txt has altered we
# don't want to retrieve previous cache
#restore-keys: |
# ${{ runner.os }}-v4-python-${{ matrix.python }}-
- name: Cache APT Dependencies
id: cache-apt-deps
uses: actions/cache@v2
Expand Down Expand Up @@ -304,7 +312,7 @@ jobs:
needs: pre_job
# NOTE: We always want to run job on master since we run some additional checks there (code
# coverage, etc)
if: ${{ needs.pre_job.outputs.should_skip != 'true' || github.ref == 'refs/heads/master' }}
# if: ${{ needs.pre_job.outputs.should_skip != 'true' || github.ref == 'refs/heads/master' }}
name: '${{ matrix.name }} - Python ${{ matrix.python-version-short }}'
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -428,6 +436,7 @@ jobs:

# GitHub is juggling how to set vars for multiple shells. Protect our PATH assumptions.
PATH: /home/runner/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand All @@ -448,9 +457,11 @@ jobs:
# TODO: maybe make the virtualenv a partial cache to exclude st2*?
# !virtualenv/lib/python*/site-packages/st2*
# !virtualenv/bin/st2*
key: ${{ runner.os }}-v3-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
restore-keys: |
${{ runner.os }}-python-${{ matrix.python }}-
key: ${{ runner.os }}-v4-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
# Don't use alternative key as if requirements.txt has altered we
# don't want to retrieve previous cache
#restore-keys: |
# ${{ runner.os }}-v4-python-${{ matrix.python }}-
- name: Cache APT Dependencies
id: cache-apt-deps
uses: actions/cache@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/microbenchmarks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ jobs:
~/.cache/pip
virtualenv
~/virtualenv
key: ${{ runner.os }}-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
key: ${{ runner.os }}-v4-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
restore-keys: |
${{ runner.os }}-python-${{ matrix.python }}-
${{ runner.os }}-v4-python-${{ matrix.python }}-
- name: Cache APT Dependencies
id: cache-apt-deps
uses: actions/cache@v2
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/orquesta-integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ on:
- cron: '0 0 * * *'

jobs:
# TODO: Fix the required checks!
# When the pre_job triggers and skips builds, it prevents merging the PR because
# the required checks are reported as skipped instead of passed.
# Special job which automatically cancels old runs for the same branch, prevents runs for the
# same file set which has already passed, etc.
pre_job:
Expand All @@ -43,7 +46,7 @@ jobs:
needs: pre_job
# NOTE: We always want to run job on master since we run some additional checks there (code
# coverage, etc)
if: ${{ needs.pre_job.outputs.should_skip != 'true' || github.ref == 'refs/heads/master' }}
# if: ${{ needs.pre_job.outputs.should_skip != 'true' || github.ref == 'refs/heads/master' }}
name: '${{ matrix.name }} - Python ${{ matrix.python-version-short }}'
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -139,9 +142,9 @@ jobs:
# TODO: maybe make the virtualenv a partial cache to exclude st2*?
# !virtualenv/lib/python*/site-packages/st2*
# !virtualenv/bin/st2*
key: ${{ runner.os }}-v3-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
key: ${{ runner.os }}-v4-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
restore-keys: |
${{ runner.os }}-python-${{ matrix.python }}-
${{ runner.os }}-v4-python-${{ matrix.python }}-
- name: Cache APT Dependencies
id: cache-apt-deps
uses: actions/cache@v2
Expand Down
132 changes: 132 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,124 @@ Changelog
in development
--------------

Fixed
~~~~~


* Fix deserialization bug in st2 API for url encoded payloads. #5536

Contributed by @sravs-dev

* Fix issue of WinRM parameter passing fails for larger scripts.#5538

Contributed by @ashwini-orchestral

* Fix Type error for ``time_diff`` critera comparison. convert the timediff value as float to match
``timedelta.total_seconds()`` return. #5462

Contributed by @blackstrip

* Fix issue with pack option not working when running policy list cli #5534

Contributed by @momokuri-3

* Fix exception thrown if action parameter contains {{ or {% and no closing jinja characters. #5556

contributed by @guzzijones12

* Link shutdown routine and sigterm handler to main thread #5555

Contributed by @khushboobhatia01

* Change compound index for ActionExecutionDB to improve query performance #5568

Contributed by @khushboobhatia01

* Fix build issue due to MarkUpSafe 2.1.0 removing soft_unicode

Contributed by Amanda McGuinness (@amanda11 intive) #5581

Added
~~~~~

* Minor updates for RockyLinux. #5552
Contributed by Amanda McGuinness (@amanda11 intive)

* Added st2 API get action parameters by ref. #5509

API endpoint ``/api/v1/actions/views/parameters/{action_id}`` accepts ``ref_or_id``.

Contributed by @DavidMeu

* Enable setting ttl for MockDatastoreService. #5468

Contributed by @ytjohn

* Added st2 API and CLI command for actions clone operation.

API endpoint ``/api/v1/actions/{ref_or_id}/clone`` takes ``ref_or_id`` of source action.
Request method body takes destination pack and action name. Request method body also takes
optional paramater ``overwrite``. ``overwrite = true`` in case of destination action already exists and to be
overwritten.

CLI command ``st2 action clone <ref_or_id> <dest_pack> <dest_action>`` takes source ``ref_or_id``, destination
pack name and destination action name as mandatory arguments.
In case destionation already exists then command takes optional arugument ``-f`` or ``--force`` to overwrite
destination action. #5345

Contributed by @mahesh-orch.

* Implemented RBAC functionality for existing ``KEY_VALUE_VIEW, KEY_VALUE_SET, KEY_VALUE_DELETE`` and new permission types ``KEY_VALUE_LIST, KEY_VALUE_ALL``.
RBAC is enabled in the ``st2.conf`` file. Access to a key value pair is checked in the KeyValuePair API controller. #5354

Contributed by @m4dcoder and @ashwini-orchestral

* Added service degerestration on shutdown of a service. #5396

Contributed by @khushboobhatia01

* Added pysocks python package for SOCKS proxy support. #5460

Contributed by @kingsleyadam

* Added support for multiple LDAP hosts to st2-auth-ldap. #5535, https://github.com/StackStorm/st2-auth-ldap/pull/100

Contributed by @ktyogurt

* Implemented graceful shutdown for action runner. Enabled ``graceful_shutdown`` in ``st2.conf`` file. #5428

Contributed by @khushboobhatia01

* Enhanced 'search' operator to allow complex criteria matching on payload items. #5482

Contributed by @erceth

* Added cancel/pause/resume requester information to execution context. #5554

Contributed by @khushboobhatia01

* Added `trigger.headers_lower` to webhook trigger payload. This allows rules to match webhook triggers
without dealing with the case-sensitive nature of `trigger.headers`, as `triggers.headers_lower` providers
the same headers, but with the header name lower cased. #5038

Contributed by @Rand01ph

* Added support to override enabled parameter of resources. #5506

Contributed by Amanda McGuinness (@amanda11 Intive)

Fixed
~~~~~

* Fixed regression caused by #5358. Use string lock name instead of object ID. #5484

Contributed by @khushboobhatia01

* Fix ``st2-self-check`` script reporting falsey success when the nested workflows runs failed. #5487

* Use byte type lock name which is supported by all tooz drivers. #5529

Contributed by @khushboobhatia01

3.6.0 - October 29, 2021
------------------------
Expand All @@ -13,6 +131,14 @@ Added

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

* ``st2.conf`` is now the only place to configure ports for ``st2api``, ``st2auth``, and ``st2stream``.

We replaced the static ``.socket`` sytemd units in deb and rpm packages with a python-based generator for the
``st2api``, ``st2auth``, and ``st2stream`` services. The generators will get ``<ip>:<port>`` from ``st2.conf``
to create the ``.socket`` files dynamically. #5286 and st2-packages#706

Contributed by @nzlosh

Changed
~~~~~~~

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

* Fixed version of cffi as changes in 1.15.0 meant that it attempted to load libffi.so.8. #5390

Contributed by @amanda11, Ammeon Solutions

* Updated Bash installer to install latest RabbitMQ version rather than out-dated version available
in OS distributions.

Contributed by @amanda11, Ammeon Solutions

Fixed
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ check-python-packages-nightly:
@echo ""

test -f $(VIRTUALENV_COMPONENTS_DIR)/bin/activate || $(PYTHON_VERSION) -m venv $(VIRTUALENV_COMPONENTS_DIR) --system-site-packages
$(VIRTUALENV_COMPONENTS_DIR)/bin/pip install wheel
@for component in $(COMPONENTS_WITHOUT_ST2TESTS); do \
echo "==========================================================="; \
echo "Checking component:" $$component; \
Expand Down
3 changes: 3 additions & 0 deletions OWNERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@ Contributors are using and occasionally contributing back to the project, might
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)
[@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.
* Anand Patel ([@arms11](https://github.com/arms11)), _VMware_ - Docker, Kubernetes.
* Ankur Singh ([@rush-skills](https://github.com/rush-skills)), _CERN_ - Puppet, Core, Docker, K8s.
* Harsh Nanchahal ([@hnanchahal](https://github.com/hnanchahal)), _Starbucks_ - Core, Docker, Kubernetes.
* Hiroyasu Ohyama ([@userlocalhost](https://github.com/userlocalhost)) - Orquesta, Workflows, st2 Japan Community. [Case Study](https://stackstorm.com/case-study-dmm/).
* Khushboo Bhatia ([@khushboobhatia01](https://github.com/khushboobhatia01)), _VMware_ - Core, Orquesta.
* Rick Kauffman ([@xod442](https://github.com/xod442)), _HPE_ - Community, HOWTOs, Blogs, Publications, Docker.
* Sheshagiri Rao Mallipedhi ([@sheshagiri](https://github.com/sheshagiri)) - Docker, Core, StackStorm Exchange.
* Shital Raut ([@shital-orchestral](https://github.com/shital-orchestral)), _Orchestral.ai_ - Web UI.
* Tristan Struthers ([@trstruth](https://github.com/trstruth)) - Docker, K8s, Orquesta, Community.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[![Join our community Slack](https://img.shields.io/badge/slack-stackstorm-success.svg?logo=slack)](https://stackstorm.com/community-signup)
[![deb/rpm packages](https://img.shields.io/badge/deb/rpm-Packagecloud-%236366f1)](https://packagecloud.io/StackStorm/)
[![Code Search](https://img.shields.io/badge/code%20search-Sourcegraph-%2300B4F2?logo=sourcegraph)](https://sourcegraph.com/stackstorm)
[![Forum](https://img.shields.io/discourse/https/forum.stackstorm.com/posts.svg)](https://forum.stackstorm.com/)
[![GitHub Discussions](https://img.shields.io/github/discussions/stackstorm/st2)](https://github.com/StackStorm/st2/discussions)
[![Twitter Follow](https://img.shields.io/twitter/follow/StackStorm?style=social)](https://twitter.com/StackStorm/)

---
Expand Down
6 changes: 6 additions & 0 deletions conf/st2.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ enable = True
[actionrunner]
# Internal pool size for dispatcher used by regular actions.
actions_pool_size = 60
# How long to wait for process (in seconds) to exit after receiving shutdown signal.
exit_still_active_check = 300
# This will enable the graceful shutdown and wait for ongoing requests to complete until exit_timeout.
graceful_shutdown = True
# location of the logging.conf file
logging = /etc/st2/logging.actionrunner.conf
# List of pip options to be passed to "pip install" command when installing pack dependencies into pack virtual environment.
Expand All @@ -18,6 +22,8 @@ pip_opts = # comma separated list allowed here.
python_binary = /usr/bin/python
# Default log level to use for Python runner actions. Can be overriden on invocation basis using "log_level" runner parameter.
python_runner_log_level = DEBUG
# Time interval between subsequent queries to check running executions.
still_active_check_interval = 2
# True to store and stream action output (stdout and stderr) in real-time.
stream_output = True
# 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
Expand Down
Loading

0 comments on commit f5c0c0f

Please sign in to comment.