Skip to content

Commit e503ca5

Browse files
Merge branch 'master' into fix_gui_limit_issue
2 parents 82297ec + 240315e commit e503ca5

File tree

736 files changed

+19783
-10623
lines changed

Some content is hidden

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

736 files changed

+19783
-10623
lines changed

.circleci/config.yml

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ jobs:
4343
# Run st2 Integration tests
4444
integration:
4545
docker:
46-
- image: circleci/python:3.6
47-
- image: mongo:4.0
48-
- image: rabbitmq:3
46+
- image: circleci/python:3.8
47+
- image: mongo:7.0
48+
- image: rabbitmq:3.13
4949
working_directory: ~/st2
5050
steps:
5151
- checkout
@@ -57,8 +57,9 @@ jobs:
5757
name: Install Mongo Shell
5858
command: |
5959
set -x
60-
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
61-
echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/4.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
60+
sudo apt-get -qq -y install gnupg curl
61+
curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/mongodb-server-7.0.gpg
62+
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
6263
sudo apt-get -qq -y update
6364
sudo apt-get -qq -y install mongodb-org-shell
6465
- run:
@@ -79,9 +80,9 @@ jobs:
7980
# Run st2 Lint Checks
8081
lint:
8182
docker:
82-
- image: circleci/python:3.6
83-
- image: mongo:4.0
84-
- image: rabbitmq:3
83+
- image: circleci/python:3.8
84+
- image: mongo:7.0
85+
- image: rabbitmq:3.13
8586
working_directory: ~/st2
8687
steps:
8788
- checkout
@@ -113,34 +114,51 @@ jobs:
113114
resource_class: large
114115
docker:
115116
# The primary container is an instance of the first list image listed. Your build commands run in this container.
116-
- image: circleci/python:3.6
117+
- image: circleci/python:3.8
117118
working_directory: ~/st2
118119
environment:
119-
- DISTROS: "bionic focal el7 el8"
120+
- DISTROS: "focal jammy el8 el9"
120121
- ST2_PACKAGES_REPO: https://github.com/StackStorm/st2-packages
121122
- ST2_PACKAGES: "st2"
122123
- ST2_CHECKOUT: 0
123124
- ST2_GITDIR: /tmp/st2
124125
- BASH_ENV: ~/.buildenv
125126
steps:
126127
- checkout
128+
- run:
129+
name: Install latest Docker Compose V2
130+
command: |
131+
set -x
132+
export CODENAME=$(source /etc/os-release && echo "$VERSION_CODENAME")
133+
export DISTRO=$(source /etc/os-release && echo "$ID")
134+
export ARCH=$(dpkg --print-architecture)
135+
# get gpg key for download.docker
136+
curl -fsSL https://download.docker.com/linux/${DISTRO}/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/download.docker.gpg
137+
# set source list
138+
sudo tee <<<"deb [arch=${ARCH}] https://download.docker.com/linux/${DISTRO} ${CODENAME} stable" /etc/apt/sources.list.d/download.docker.list
139+
# update package list
140+
sudo apt update
141+
# install docker CLI and Docker Compose v2
142+
sudo apt install docker-ce-cli docker-compose-plugin
127143
- setup_remote_docker:
128144
reusable: true # default - false
129145
exclusive: true # default - true
130-
version: 19.03.14
146+
version: docker24
131147
- run:
132148
name: Docker version
133149
command: |
134150
set -x
135151
docker --version
136-
docker-compose --version
152+
docker compose version
137153
- run:
138154
name: Download st2-packages repository
139155
command: |
140156
set -x
157+
PIP_VERSION=$(grep ^PIP_VERSION Makefile)
141158
git clone ${ST2_PACKAGES_REPO} ~/st2-packages
142159
cd ~/st2-packages
143160
git checkout ${CIRCLE_BRANCH} || true
161+
sed -i -e "s/^PIP_VERSION .*$/${PIP_VERSION}/" packages/st2/debian/rules
144162
- run:
145163
name: Initialize packages Build Environment
146164
command: |
@@ -167,7 +185,7 @@ jobs:
167185
name: Copy st2-packages files to build containers
168186
command: |
169187
# creating dummy container which will hold a volume with data files
170-
docker create -v /root/st2-packages -v ${ST2_GITDIR} -v /root/build -v /var/log/st2 -v /root/.cache/pip -v /tmp/wheelhouse --name st2-packages-vol alpine:3.4 /bin/true
188+
docker create -v /root/st2-packages -v ${ST2_GITDIR} -v /root/build -v /var/log/st2 -v /root/.cache/pip -v /tmp/wheelhouse --name st2-packages-vol alpine:3.12 /bin/true
171189
# copy st2-packages data files into this volume
172190
docker cp ~/st2-packages st2-packages-vol:/root
173191
# copy st2 source files into this volume
@@ -219,10 +237,10 @@ jobs:
219237
deploy:
220238
docker:
221239
# The primary container is an instance of the first list image listed. Your build commands run in this container.
222-
- image: circleci/ruby:2.4
240+
- image: circleci/ruby:2.7
223241
working_directory: /tmp/deploy
224242
environment:
225-
- DISTROS: "bionic focal el7 el8"
243+
- DISTROS: "focal jammy el8 el9"
226244
steps:
227245
- attach_workspace:
228246
at: .

.gitattributes

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# See: https://www.mankier.com/5/gitattributes
2+
3+
# lockfile merge conflicts: do not manually merge.
4+
# The "-merge" makes git leave the current branch's lockfile as-is, like a binary file.
5+
# To resolve the conflict, resolve any conflicts in requirements files,
6+
# and then regenerste the lockfile with (resolve names are 'st2', 'black', etc):
7+
# pants generate-lockfiles --resolve=<resolve name>
8+
/lockfiles/*.lock -merge
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Cache and Install APT Dependencies
3+
description:
4+
Light wrapper around the actions/cache action and our script
5+
to maintain the input vars in only one place for all workflows.
6+
7+
runs:
8+
using: "composite"
9+
steps:
10+
- name: Cache APT Dependencies
11+
id: cache-apt-deps
12+
uses: actions/cache@v4
13+
with:
14+
path: |
15+
~/apt_cache
16+
key: ${{ runner.os }}-v8-apt-${{ hashFiles('scripts/github/apt-packages.txt') }}
17+
restore-keys: |
18+
${{ runner.os }}-v8-apt-
19+
20+
- name: Install APT Depedencies
21+
shell: bash
22+
env:
23+
CACHE_HIT: ${{steps.cache-apt-deps.outputs.cache-hit}}
24+
run: |
25+
# install dev dependencies for Python YAML and LDAP packages
26+
# https://github.com/StackStorm/st2-auth-ldap
27+
./scripts/github/install-apt-packages-use-cache.sh
28+
29+
- name: Install Mongo Shell
30+
shell: bash
31+
run: |
32+
# Required as part of switch to GHA image ubuntu-22.04
33+
./scripts/github/install-mongosh.sh
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Initialize Pants and its GHA caches
3+
description:
4+
Light wrapper around the pantsbuild/actions/init-pants action
5+
to maintain the input vars in only one place for all workflows.
6+
7+
inputs:
8+
gha-cache-key:
9+
description: Qualify all cache keys with this string. Useful for invalidating everything.
10+
required: true
11+
12+
runs:
13+
using: "composite"
14+
steps:
15+
- name: Initialize Pants and its GHA caches
16+
uses: pantsbuild/actions/init-pants@v10
17+
# This action adds an env var to make pants use both pants.ci.toml & pants.toml.
18+
# This action also creates 3 GHA caches (1 is optional).
19+
# - `pants-setup` has the bootsrapped pants install
20+
# - `pants-named-caches` has pip/wheel and PEX caches
21+
# - `pants-lmdb-store` has the fine-grained process cache.
22+
# If we ever use a remote cache, then we can drop this.
23+
# Otherwise, we may need an additional workflow or job to delete old caches
24+
# if they are not expiring fast enough, and we hit the GHA 10GB per repo max.
25+
with:
26+
base-branch: master
27+
# To ignore a bad cache, bump the cache* integer.
28+
gha-cache-key: ${{ inputs.gha-cache-key }}
29+
# This hash should include all of our lockfiles so that the pip/pex caches
30+
# get invalidated on any transitive dependency update.
31+
named-caches-hash: ${{ hashFiles('lockfiles/*.lock') }}
32+
# enable the optional lmdb_store cache since we can't rely on remote caching yet.
33+
cache-lmdb-store: 'true'
34+
# Try the experimental support for using GHA cache as a pants remote cache.
35+
experimental-remote-cache-via-gha: 'true'
36+
# install whatever version of python we need for our in-repo pants-plugins
37+
setup-python-for-plugins: 'true'
38+
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Install Python and Cache Deps
3+
description:
4+
Light wrapper around the actions/setup-python and actions/cache actions
5+
to maintain the input vars in only one place for all workflows.
6+
7+
inputs:
8+
python-version:
9+
description: Which version of python to install.
10+
required: true
11+
12+
runs:
13+
using: "composite"
14+
steps:
15+
- name: 'Set up Python (${{ inputs.python-version }})'
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: '${{ inputs.python-version }}'
19+
20+
- name: Cache Python Dependencies
21+
uses: actions/cache@v4
22+
with:
23+
path: |
24+
~/.cache/pip
25+
virtualenv
26+
~/virtualenv
27+
# TODO: maybe make the virtualenv a partial cache to exclude st2*?
28+
# !virtualenv/lib/python*/site-packages/st2*
29+
# !virtualenv/bin/st2*
30+
key: ${{ runner.os }}-v5-python-${{ inputs.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt', 'lockfiles/*.lock') }}
31+
# Don't use alternative key as if requirements.txt has altered we
32+
# don't want to retrieve previous cache
33+
#restore-keys: |
34+
# ${{ runner.os }}-v5-python-${{ inputs.python }}-

.github/workflows/checks.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
# See: https://keepachangelog.com/en/1.0.0/
1313
changelog-checker:
1414
name: Add CHANGELOG.rst
15-
runs-on: ubuntu-20.04
15+
runs-on: ubuntu-22.04
1616
steps:
17-
- uses: actions/checkout@v1
17+
- uses: actions/checkout@v4
1818
- name: Changelog check
1919
# https://github.com/marketplace/actions/changelog-checker
2020
uses: Zomzog/[email protected]

0 commit comments

Comments
 (0)