Skip to content

Commit 96ce1d7

Browse files
authored
Merge pull request #6186: Refactor tools/launchdev.sh to use tmux
2 parents a56f527 + 63a12b6 commit 96ce1d7

16 files changed

+189
-232
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,13 @@ jobs:
282282
- name: Compress Service Logs Before upload
283283
if: ${{ failure() }}
284284
run: |
285+
./tools/launchdev.sh stop # stop st2 before collecting logs
285286
tar cvzpf logs.tar.gz logs/*
286287
- name: Upload StackStorm services Logs
287288
if: ${{ failure() }}
288289
uses: actions/upload-artifact@v2
289290
with:
290-
name: logs
291+
name: logs-py${{ matrix.python-version }}
291292
path: logs.tar.gz
292293
retention-days: 7
293294
- name: Stop Redis Service Container
@@ -690,12 +691,13 @@ jobs:
690691
- name: Compress Service Logs Before upload
691692
if: ${{ failure() && env.TASK == 'ci-integration' }}
692693
run: |
694+
./tools/launchdev.sh stop # stop st2 before collecting logs
693695
tar cvzpf logs.tar.gz logs/*
694696
- name: Upload StackStorm services Logs
695697
if: ${{ failure() && env.TASK == 'ci-integration' }}
696698
uses: actions/upload-artifact@v2
697699
with:
698-
name: logs
700+
name: logs-py${{ matrix.python-version }}-nose-${{ matrix.nosetests_node_index }}
699701
path: logs.tar.gz
700702
retention-days: 7
701703
- name: Stop Redis Service Container

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Changed
1818
* Switch to python3's standard lib unittest from unittest2, a backport of python3 unittest features for python2. #6187 (by @nzlosh)
1919
* Drop Python 3.6 testing in CircleCI. #6080
2020
Contributed by (@philipphomberger Schwarz IT KG)
21+
* Refactor `tools/launchdev.sh` to use `tmux` instead of `screen`. #6186 (by @nzlosh and @cognifloyd)
2122

2223
Added
2324
~~~~~

dev_docs/Troubleshooting_Guide.rst

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,15 @@ As we can see from above output port ``9101`` is not even up. To verify this let
4040
vagrant 32403 0.2 1.5 79228 31364 pts/3 Ss+ 18:27 0:00 /home/vagrant/git/st2/virtualenv/bin/python
4141
./virtualenv/bin/gunicorn st2stream.wsgi:application -k eventlet -b 0.0.0.0:9102 --workers 1
4242
43-
- This suggests that the API process crashed, we can verify that by running ``screen -ls``.::
43+
- This suggests that the API process crashed, we can verify that by running ``tmux ls``.::
4444

4545
.. code:: bash
4646
47-
$ screen -ls
48-
There are screens on:
49-
15781.st2-auth (04/26/2016 06:39:10 PM) (Detached)
50-
15778.st2-notifier (04/26/2016 06:39:10 PM) (Detached)
51-
15767.st2-sensorcontainer (04/26/2016 06:39:10 PM) (Detached)
52-
15762.st2-stream (04/26/2016 06:39:10 PM) (Detached)
53-
3 Sockets in /var/run/screen/S-vagrant.
47+
$ tmux ls
48+
st2-auth: 1 windows (created Fri Apr 19 00:42:58 2024)
49+
st2-notifier: 1 windows (created Fri Apr 19 00:42:58 2024)
50+
st2-sensorcontainer: 1 windows (created Fri Apr 19 00:42:58 2024)
51+
st2-stream: 1 windows (created Fri Apr 19 00:42:58 2024)
5452
5553
- Now let us check the logs for any errors:
5654

scripts/github/prepare-integration.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,23 @@ echo ""
3030
python ./st2client/setup.py develop
3131
st2 --version
3232

33-
# Clean up old screen log files
34-
rm -f logs/screen-*.log
33+
# Clean up old st2 log files
34+
rm -f logs/st2*.log
3535

3636
# ::group::/::endgroup:: is helpful github actions syntax to fold this section.
3737
echo ::group::launchdev.sh start -x
3838

39-
# start dev environment in screens
39+
# start dev environment in tmux
4040
./tools/launchdev.sh start -x
4141

4242
# Give processes some time to start and check logs to see if all the services
4343
# started or if there was any error / failure
44-
echo "Giving screen processes some time to start..."
44+
echo "Giving st2 processes some time to start..."
4545
sleep 10
4646

47-
echo " === START: Catting screen process log files. ==="
48-
cat logs/screen-*.log
49-
echo " === END: Catting screen process log files. ==="
47+
echo " === START: Catting st2 process log files. ==="
48+
cat logs/st2-*.log
49+
echo " === END: Catting st2 process log files. ==="
5050

5151
# github actions: fold for launchdev.sh start -x
5252
echo ::endgroup::

0 commit comments

Comments
 (0)