Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc CI improvements/fixes #6235

Merged
merged 3 commits into from
Sep 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions st2common/st2common/content/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
# limitations under the License.

from __future__ import absolute_import

from st2common.util.monkey_patch import monkey_patch

monkey_patch()

import os
import sys
import logging
Expand Down
7 changes: 0 additions & 7 deletions st2common/st2common/util/monkey_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,7 @@ def monkey_patch(patch_thread=None):
patched unless debugger is used.
:type patch_thread: ``bool``
"""
# Eventlet when patched doesn't throw the standard ssl error on timeout, which can break
# some third-party libraries including redis SSL.
# See: https://github.com/eventlet/eventlet/issues/692
# Therefore set the patched ssl module to use the standard socket.timeout exception
from eventlet.green import ssl
import eventlet
from socket import timeout

if patch_thread is None:
patch_thread = not is_use_debugger_flag_provided()
Expand All @@ -60,7 +54,6 @@ def monkey_patch(patch_thread=None):
eventlet.monkey_patch(
os=True, select=True, socket=True, thread=patch_thread, time=True
)
ssl.timeout_exc = timeout


def use_select_poll_workaround(nose_only=True):
Expand Down
7 changes: 4 additions & 3 deletions tools/launchdev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ function init()
echo -n "Using virtualenv: "; iecho "${VIRTUALENV}"
echo -n "Using python: "; iecho "${PY} (${PYTHON_VERSION})"
echo -n "Log file location: "; iecho "${ST2_LOGS}"
echo -n "Using tmux: "; iecho "$(tmux -V)"

if [ -z "$ST2_CONF" ]; then
ST2_CONF=${ST2_REPO}/conf/st2.dev.conf
Expand Down Expand Up @@ -221,7 +222,7 @@ function st2start()
export ST2_CONFIG_PATH=${ST2_CONF};

# Kill existing st2 terminal multiplexor sessions
for tmux_session in $(tmux ls | awk -F: '/^st2-/ {print $1}')
for tmux_session in $(tmux ls 2>/dev/null | awk -F: '/^st2-/ {print $1}')
do
echo "Kill existing session $tmux_session"
tmux kill-session -t $tmux_session
Expand Down Expand Up @@ -328,7 +329,7 @@ function st2start()
echo
for s in "${SESSIONS[@]}"
do
tmux ls | grep "^${s}[[:space:]]" &> /dev/null
tmux ls | grep "^${s}:\?[[:space:]]" &> /dev/null
if [ $? != 0 ]; then
eecho "ERROR: terminal multiplex session for $s failed to start."
fi
Expand Down Expand Up @@ -356,7 +357,7 @@ function st2start()

function st2stop()
{
for tmux_session in $(tmux ls | awk -F: '/^st2-/ {print $1}')
for tmux_session in $(tmux ls 2>/dev/null | awk -F: '/^st2-/ {print $1}')
do
echo "Kill existing session $tmux_session"
tmux kill-session -t $tmux_session
Expand Down
Loading