Skip to content

Commit 76891f3

Browse files
authored
Merge branch 'master' into action_alias_publisher
2 parents 6c81f4f + 8d2304e commit 76891f3

File tree

266 files changed

+8882
-129
lines changed

Some content is hidden

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

266 files changed

+8882
-129
lines changed

.github/workflows/lint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ on:
2525
jobs:
2626
# Lint checks which don't depend on any service containes, etc. to be running.
2727
lint-checks:
28-
name: 'Lint Checks (pants runs: shellcheck, bandit, black, flake8)'
28+
name: 'Lint Checks (pants runs: shellcheck, bandit, black, flake8, pylint)'
2929
runs-on: ubuntu-20.04
3030

3131
env:
@@ -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@e63d2d0e3c339bdffbe5e51e7c39550e3bc527bb
60+
uses: pantsbuild/actions/init-pants@v2
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

.github/workflows/pants.yaml

Lines changed: 1 addition & 1 deletion
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@e63d2d0e3c339bdffbe5e51e7c39550e3bc527bb
33+
uses: pantsbuild/actions/init-pants@v2
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

.github/workflows/test.yaml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
---
2+
# This Test workflow uses pants
3+
name: Test
4+
5+
on:
6+
push:
7+
branches:
8+
# only on merges to master branch
9+
- master
10+
# and version branches, which only include minor versions (eg: v3.4)
11+
- v[0-9]+.[0-9]+
12+
tags:
13+
# also version tags, which include bugfix releases (eg: v3.4.0)
14+
- v[0-9]+.[0-9]+.[0-9]+
15+
pull_request:
16+
type: [opened, reopened, edited]
17+
branches:
18+
# Only for PRs targeting those branches
19+
- master
20+
- v[0-9]+.[0-9]+
21+
#schedule:
22+
# # run every night at midnight
23+
# - cron: '0 0 * * *'
24+
25+
jobs:
26+
test:
27+
name: '${{ matrix.name }} - Python ${{ matrix.python-version-short }}'
28+
runs-on: ubuntu-20.04
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
# NOTE: We need to use full Python version as part of Python deps cache key otherwise
33+
# setup virtualenv step will fail.
34+
include:
35+
- name: 'Test (pants runs: pytest)'
36+
python-version-short: '3.6'
37+
python-version: '3.6.13'
38+
- name: 'Test (pants runs: pytest)'
39+
python-version-short: '3.8'
40+
python-version: '3.8.10'
41+
42+
services:
43+
mongo:
44+
image: mongo:4.4
45+
ports:
46+
- 27017:27017
47+
48+
env:
49+
COLUMNS: '120'
50+
51+
steps:
52+
- name: Checkout repository
53+
uses: actions/checkout@v2
54+
with:
55+
# a test uses a submodule, and pants needs access to it to calculate deps.
56+
submodules: 'true'
57+
58+
- name: 'Set up Python (${{ matrix.python-version }})'
59+
uses: actions/setup-python@v2
60+
with:
61+
python-version: '${{ matrix.python-version }}'
62+
63+
64+
#- name: Cache APT Dependencies
65+
# id: cache-apt-deps
66+
# uses: actions/cache@v2
67+
# with:
68+
# path: |
69+
# ~/apt_cache
70+
# key: ${{ runner.os }}-apt-v7-${{ hashFiles('scripts/github/apt-packages.txt') }}
71+
# restore-keys: |
72+
# ${{ runner.os }}-apt-v7-
73+
- name: Install APT Depedencies
74+
env:
75+
CACHE_HIT: 'false' # cache doesn't work
76+
#CACHE_HIT: ${{steps.cache-apt-deps.outputs.cache-hit}}
77+
run: |
78+
# install dev dependencies for Python YAML and LDAP packages
79+
# https://github.com/StackStorm/st2-auth-ldap
80+
./scripts/github/install-apt-packages-use-cache.sh
81+
82+
- name: Initialize Pants and its GHA caches
83+
uses: pantsbuild/actions/init-pants@v2
84+
# This action adds an env var to make pants use both pants.ci.toml & pants.toml.
85+
# This action also creates 3 GHA caches (1 is optional).
86+
# - `pants-setup` has the bootsrapped pants install
87+
# - `pants-named-caches` has pip/wheel and PEX caches
88+
# - `pants-lmdb-store` has the fine-grained process cache.
89+
# If we ever use a remote cache, then we can drop this.
90+
# Otherwise, we may need an additional workflow or job to delete old caches
91+
# if they are not expiring fast enough, and we hit the GHA 10GB per repo max.
92+
with:
93+
base-branch: master
94+
# To ignore a bad cache, bump the cache* integer.
95+
gha-cache-key: cache0-py${{ matrix.python-version }}
96+
# This hash should include all of our lockfiles so that the pip/pex caches
97+
# get invalidated on any transitive dependency update.
98+
named-caches-hash: ${{ hashFiles('requirements.txt') }}
99+
# enable the optional lmdb_store cache since we're not using remote caching.
100+
cache-lmdb-store: 'true'
101+
102+
- name: Test
103+
# We do not support running pytest everywhere yet. When we do it will be simply:
104+
# ./pants test ::
105+
# Until then, we need to manually adjust this command line to test what we can.
106+
run: |
107+
./pants test pylint_plugins/:: pants-plugins/::
108+
109+
- name: Upload pants log
110+
uses: actions/upload-artifact@v2
111+
with:
112+
name: pants-log-py${{ matrix.python-version }}
113+
path: .pants.d/pants.log
114+
if: always() # We want the log even on failures.

ADOPTERS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ This is an alphabetical list of known [StackStorm](https://stackstorm.com/) adop
55
* [Adobe](https://www.adobe.com/) - Multinational computer software company. After evaluating both SaltStack and Rundeck, Adobe chose StackStorm towards their journey to self-healing infrastructure. As a result, SRE team could resolve thousands of alerts and fix 70% of the outages automatically without human intervention. [[ DevOpsDays Notes ](https://threadreaderapp.com/thread/1098901714567081984.html)] [[ DevOpsCon Talk ](https://devopscon.io/monitoring-traceability-diagnostics/workflow-engines-our-journey-towards-a-self-healing-infrastructure/)]
66
* [Bitovi](https://www.bitovi.com/) - Consulting company, implemented an Automation solution based on StackStorm API with HA capabilities and custom UI for a Fortune top 10 organization. [[ Blog ](https://www.bitovi.com/blog/stackstorm-solves-devops-automation-for-enterprise-client)] [[ Case study ](https://stackstorm.com/case-study-bitovi/)]
77
* [DMM.com](https://dmm-corp.com/en/) - Large content provider in Japan. StackStorm is used in Operations helping to maintain online services and development at scale. [[ Case study ](https://stackstorm.com/case-study-dmm/)]
8+
* [DigitalOcean](https://www.digitalocean.com/about) - DigitalOcean simplifies cloud computing so builders can spend more time creating software that changes the world. Internally, StackStorm is used as a consistent frontend to our numerous operational tools, and it also plays the part of the orchestration and automation engine driving the machine lifecycle of our vast fleet of machines spread across the globe.
89
* [Dimension Data](https://www.dimensiondata.com/en/about-us) - Global systems integrator and IT services provider, using StackStorm for Datacenter Orchestration as well as Infrastructure, Networking, Security Automation for their large clients and government projects. [[ Case study ](https://stackstorm.com/case-study-dimension-data/)]
910
* [Encore](https://www.encore.tech/) - Data Center, Cloud Computing, IT solutions company ​leverages StackStorm in enterprise scale IT infrastructure for VM & server provisioning, automation, network diagnosis, configuration and orchestration​ on customers' public and private clouds. [[ Blog ](https://encoretechnologies.github.io/blog/2018/03/stackstorm-changed-our-lives/)] [[ Case study ](https://stackstorm.com/case-study-encore/)]
1011
* [Fastly](https://www.fastly.com) - Edge Cloud Platform, implemented StackStorm as part of a bigger global network automation architecture aimed at providing an interface to network operations and traffic engineering changes triggered both manually or in response to events on hundreds of devices spread across dozens of sites. [[ Blog ](https://www.fastly.com/blog/network-automation-helps-support-worlds-biggest-live-streaming-moments)]

BUILD

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,24 @@ python_requirements(
3131
"//:reqs#zake",
3232
]
3333
},
34+
# make sure anything that uses st2-auth-ldap gets the st2auth constant
35+
"st2-auth-ldap": {
36+
"dependencies": [
37+
"st2auth/st2auth/backends/constants.py",
38+
]
39+
},
3440
},
3541
)
3642

43+
target(
44+
name="auth_backends",
45+
dependencies=[
46+
"//:reqs#st2-auth-backend-flat-file",
47+
"//:reqs#st2-auth-ldap",
48+
],
49+
)
50+
3751
python_test_utils(
38-
name="test_utils0",
52+
name="test_utils",
53+
skip_pylint=True,
3954
)

CHANGELOG.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,22 @@ in development
66

77
Added
88
~~~~~
9+
* Move `git clone` to `user_home/.st2packs` #5845
10+
11+
* Error on `st2ctl status` when running in Kubernetes. #5851
12+
Contributed by @mamercad
913

1014
* Continue introducing `pants <https://www.pantsbuild.org/docs>`_ to improve DX (Developer Experience)
1115
working on StackStorm, improve our security posture, and improve CI reliability thanks in part
1216
to pants' use of PEX lockfiles. This is not a user-facing addition.
13-
#5778 #5789 #5817 #5795 #5830
17+
#5778 #5789 #5817 #5795 #5830 #5833 #5834 #5841 #5840 #5838 #5842 #5837 #5849 #5850
18+
#5846 #5853 #5848 #5847 #5858 #5857 #5860 #5868 #5871 #5864 #5874
1419
Contributed by @cognifloyd
1520

16-
* Added publisher to ActionAlias to enable streaming ActionAlias create/update/delete events.
17-
Contributed @ubaumann
21+
* Added a joint index to solve the problem of slow mongo queries for scheduled executions. #5805
22+
23+
* Added publisher to ActionAlias to enable streaming ActionAlias create/update/delete events. #5763
24+
Contributed by @ubaumann
1825

1926

2027
3.8.0 - November 18, 2022

Makefile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -460,11 +460,7 @@ generate-api-spec: requirements .generate-api-spec
460460
@echo
461461
@echo "================== Generate openapi.yaml file ===================="
462462
@echo
463-
echo "# NOTE: This file is auto-generated - DO NOT EDIT MANUALLY" > st2common/st2common/openapi.yaml
464-
echo "# Edit st2common/st2common/openapi.yaml.j2 and then run" >> st2common/st2common/openapi.yaml
465-
echo "# make .generate-api-spec" >> st2common/st2common/openapi.yaml
466-
echo "# to generate the final spec file" >> st2common/st2common/openapi.yaml
467-
. $(VIRTUALENV_DIR)/bin/activate; python st2common/bin/st2-generate-api-spec --config-file conf/st2.dev.conf >> st2common/st2common/openapi.yaml
463+
. $(VIRTUALENV_DIR)/bin/activate; python st2common/bin/st2-generate-api-spec --config-file conf/st2.dev.conf > st2common/st2common/openapi.yaml
468464

469465
.PHONY: circle-lint-api-spec
470466
circle-lint-api-spec:
@@ -568,7 +564,7 @@ clean: .cleanpycs
568564
compilepy3:
569565
@echo "======================= compile ========================"
570566
@echo "------- Compile all .py files (syntax check test - Python 3) ------"
571-
python3 -m compileall -f -q -x 'virtualenv|virtualenv-osx|virtualenv-py3|.tox|.git|.venv-st2devbox|./st2tests/st2tests/fixtures/packs/test' .
567+
python3 -m compileall -f -q -x 'virtualenv|virtualenv-osx|virtualenv-py3|.tox|.git|.venv-st2devbox|./st2tests/st2tests/fixtures/packs/test|./pants-plugins' .
572568

573569
.PHONY: .cleanpycs
574570
.cleanpycs:

OWNERS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ Being part of Technical Steering Committee (TSC) [@StackStorm/maintainers](https
3939
- Puppet, StackStorm Exchange.
4040
* Carlos ([@nzlosh](https://github.com/nzlosh)) <<nzlosh@yahoo.com>>
4141
- Packaging, Systems, Chatops, Errbot, Community, Discussions, StackStorm Exchange.
42-
* JP Bourget ([@punkrokk](https://github.com/punkrokk)) <<jp.bourget@gmail.com>>
43-
- Systems, deb/rpm, Deployments, Community, StackStorm Exchange, SecOps, CircleCI.
4442
* Khushboo Bhatia ([@khushboobhatia01](https://github.com/khushboobhatia01)), _VMware_ <<khushb99@gmail.com>>
4543
- StackStorm Core, Workflows.
4644
* Marcel Weinberg ([@winem](https://github.com/winem)), _CoreMedia_ <<mweinberg-os@email.de>>
@@ -57,6 +55,7 @@ They're not part of the TSC voting process, but appreciated for their contributi
5755
* Anand Patel ([@arms11](https://github.com/arms11)), _VMware_ - Docker, Kubernetes.
5856
* Harsh Nanchahal ([@hnanchahal](https://github.com/hnanchahal)), _Starbucks_ - Core, Docker, Kubernetes.
5957
* Hiroyasu Ohyama ([@userlocalhost](https://github.com/userlocalhost)) - Orquesta, Workflows, st2 Japan Community. [Case Study](https://stackstorm.com/case-study-dmm/).
58+
* Mark Mercado ([@mamercad](https://github.com/mamercad)), _DigitalOcean_ - Ansible, Docker, K8s, StackStorm Exchange. [StackStorm Adoption](https://github.com/StackStorm/st2/pull/5836).
6059
* Rick Kauffman ([@xod442](https://github.com/xod442)), _HPE_ - Community, HOWTOs, Blogs, Publications, Docker.
6160
* Sheshagiri Rao Mallipedhi ([@sheshagiri](https://github.com/sheshagiri)) - Docker, Core, StackStorm Exchange.
6261
* Shital Raut ([@shital-orchestral](https://github.com/shital-orchestral)), _Orchestral.ai_ - Web UI.
@@ -84,6 +83,7 @@ Thank you, Friends!
8483
* Jinping Han ([@jinpingh](https://github.com/jinpingh)) - ex Stormer. Community, Core, Tests, Pack Dependencies.
8584
* Johan Dahlberg ([@johandahlberg](https://github.com/johandahlberg)) - Using st2 for Bioinformatics/Science project, providing feedback & contributions in Ansible, Community, Workflows. [Case Study](https://stackstorm.com/case-study-scilifelab/).
8685
* Johan Hermansson ([@johanherman](https://github.com/johanherman)) - Using st2 for Bioinformatics/Science project, feedback & contributions in Ansible, Community, Workflows. [Case Study](https://stackstorm.com/case-study-scilifelab/).
86+
* JP Bourget ([@punkrokk](https://github.com/punkrokk)) - Systems, deb/rpm, Deployments, Community, StackStorm Exchange, SecOps, CircleCI. Used ST2 for Security Orchestration.
8787
* Jon Middleton ([@jjm](https://github.com/jjm)) - StackStorm Exchange, Core, Discussions.
8888
* Lakshmi Kannan ([@lakshmi-kannan](https://github.com/lakshmi-kannan)) - early Stormer. Initial Core platform architecture, scalability, reliability, Team Leadership during the project hard times.
8989
* Lindsay Hill ([@LindsayHill](https://github.com/LindsayHill)) - ex StackStorm product manager that made a significant impact building an ecosystem we see today.

conf/BUILD

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
file(
2+
name="st2client_sample_config",
3+
source="st2rc.sample.ini",
4+
)
5+
6+
sample_conf( # defined in pants-plugins/sample_conf
7+
name="st2.conf.sample",
8+
source="st2.conf.sample",
9+
dependencies=[
10+
"tools/config_gen.py",
11+
],
12+
)
13+
14+
file(
15+
name="logrotate",
16+
source="logrotate.conf",
17+
)
18+
19+
file(
20+
name="nginx_sample_config",
21+
source="nginx/st2.conf",
22+
)
23+
24+
file(
25+
name="st2_kvstore_demo_crypto_key",
26+
source="st2_kvstore_demo.crypto.key.json",
27+
)
28+
29+
files(
30+
name="st2_tests_conf",
31+
sources=[
32+
"st2.tests*.conf",
33+
],
34+
dependencies=[
35+
"st2auth/conf:htpasswd",
36+
"st2actions/conf:logging",
37+
"st2reactor/conf:logging",
38+
"st2tests/conf:other_logging_conf",
39+
],
40+
)
41+
42+
file(
43+
name="st2_dev_conf",
44+
source="st2.dev.conf",
45+
dependencies=[
46+
":st2_kvstore_demo_crypto_key",
47+
"st2auth/conf:htpasswd",
48+
"st2actions/conf:logging",
49+
"st2api/conf:logging",
50+
"st2auth/conf:logging",
51+
"st2reactor/conf:logging",
52+
"st2stream/conf:logging",
53+
],
54+
)
55+
56+
file(
57+
name="st2_package_conf",
58+
source="st2.package.conf",
59+
)

contrib/chatops/BUILD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pack_metadata(
2+
name="metadata",
3+
)

0 commit comments

Comments
 (0)