From a136843bc740a659fc9a3657e2899c9a7fb7e864 Mon Sep 17 00:00:00 2001 From: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com> Date: Thu, 29 Feb 2024 17:13:30 -0500 Subject: [PATCH 01/10] PoC awx debugpy launch all awx processes through vscode python debugger --- .gitignore | 4 +- .vscode/launch.json | 80 +++++++++++++++++++ awx/settings/defaults.py | 2 +- .../roles/sources/templates/nginx.conf.j2 | 4 + .../sources/templates/nginx.locations.conf.j2 | 8 ++ 5 files changed, 96 insertions(+), 2 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.gitignore b/.gitignore index 26e0f20f0a71..d6f0ee4c3947 100644 --- a/.gitignore +++ b/.gitignore @@ -95,7 +95,9 @@ awx/awx_test.sqlite3-journal *.DS_Store # VSCode -.vscode/ +!.vscode/ +.vscode/* +!.vscode/launch.json # Editors *.sw[poj] diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000000..d529403e9cb7 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,80 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Python Debugger: run_ws_heartbeat", + "type": "debugpy", + "request": "launch", + "program": "manage.py", + "args": ["run_ws_heartbeat"], + "django": true + }, + { + "name": "Python Debugger: run_callback_receiver", + "type": "debugpy", + "request": "launch", + "program": "manage.py", + "args": ["run_callback_receiver"], + "django": true + }, + { + "name": "Python Debugger: run_dispatcher", + "type": "debugpy", + "request": "launch", + "program": "manage.py", + "args": ["run_dispatcher"], + "django": true + }, + { + "name": "Python Debugger: run_rsyslog_configurer", + "type": "debugpy", + "request": "launch", + "program": "manage.py", + "args": ["run_rsyslog_configurer"], + "django": true + }, + { + "name": "Python Debugger: run_cache_clear", + "type": "debugpy", + "request": "launch", + "program": "manage.py", + "args": ["run_cache_clear"], + "django": true + }, + { + "name": "Python Debugger: run_wsrelay", + "type": "debugpy", + "request": "launch", + "program": "manage.py", + "args": ["run_wsrelay"], + "django": true + }, + { + "name": "Python Debugger: run_wsrelay", + "type": "debugpy", + "request": "launch", + "program": "manage.py", + "args": ["run_wsrelay"], + "django": true + }, + { + "name": "Python Debugger: daphne", + "type": "debugpy", + "request": "launch", + "program": "/var/lib/awx/venv/awx/bin/daphne", + "args": ["-b", "127.0.0.1", "-p", "8051", "awx.asgi:channel_layer"], + "django": true + }, + { + "name": "Python Debugger: runserver_plus", + "type": "debugpy", + "request": "launch", + "program": "manage.py", + "args": ["runserver_plus", "0.0.0.0:8052", "--threaded"], + "django": true + } + ] +} diff --git a/awx/settings/defaults.py b/awx/settings/defaults.py index 1e2fed59b9a4..207478f1c760 100644 --- a/awx/settings/defaults.py +++ b/awx/settings/defaults.py @@ -177,7 +177,7 @@ # If we are behind a reverse proxy/load balancer, use this setting to # allow the scheme://addresses from which Tower should trust csrf requests from # If this setting is an empty list (the default), we will only trust ourself -CSRF_TRUSTED_ORIGINS = [] +CSRF_TRUSTED_ORIGINS = ["https://localhost:8043"] CUSTOM_VENV_PATHS = [] diff --git a/tools/docker-compose/ansible/roles/sources/templates/nginx.conf.j2 b/tools/docker-compose/ansible/roles/sources/templates/nginx.conf.j2 index 7115e155823b..e0be1528181d 100644 --- a/tools/docker-compose/ansible/roles/sources/templates/nginx.conf.j2 +++ b/tools/docker-compose/ansible/roles/sources/templates/nginx.conf.j2 @@ -29,6 +29,10 @@ http { server localhost:8050; } + upstream runserver { + server localhost:8052; + } + upstream daphne { server localhost:8051; } diff --git a/tools/docker-compose/ansible/roles/sources/templates/nginx.locations.conf.j2 b/tools/docker-compose/ansible/roles/sources/templates/nginx.locations.conf.j2 index fd2b89a69133..8e3cddf91457 100644 --- a/tools/docker-compose/ansible/roles/sources/templates/nginx.locations.conf.j2 +++ b/tools/docker-compose/ansible/roles/sources/templates/nginx.locations.conf.j2 @@ -38,4 +38,12 @@ location {{ ingress_path }} { uwsgi_read_timeout 120s; uwsgi_pass uwsgi; include /etc/nginx/uwsgi_params; + error_page 502 = @fallback; +} + + +location @fallback { + # Add trailing / if missing + rewrite ^(.*)$http_host(.*[^/])$ $1$http_host$2/ permanent; + proxy_pass http://runserver; } From 3012cb354ebb82934d5c79b8ac188b88c4259ae8 Mon Sep 17 00:00:00 2001 From: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com> Date: Thu, 29 Feb 2024 17:14:34 -0500 Subject: [PATCH 02/10] Move CSRF_TRUSTED_ORIGINS hack --- awx/settings/defaults.py | 2 +- awx/settings/development.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/awx/settings/defaults.py b/awx/settings/defaults.py index 207478f1c760..1e2fed59b9a4 100644 --- a/awx/settings/defaults.py +++ b/awx/settings/defaults.py @@ -177,7 +177,7 @@ # If we are behind a reverse proxy/load balancer, use this setting to # allow the scheme://addresses from which Tower should trust csrf requests from # If this setting is an empty list (the default), we will only trust ourself -CSRF_TRUSTED_ORIGINS = ["https://localhost:8043"] +CSRF_TRUSTED_ORIGINS = [] CUSTOM_VENV_PATHS = [] diff --git a/awx/settings/development.py b/awx/settings/development.py index bdf882c795b5..6d604deca1b4 100644 --- a/awx/settings/development.py +++ b/awx/settings/development.py @@ -117,3 +117,5 @@ set_application_name(DATABASES, CLUSTER_HOST_ID) # NOQA del set_application_name + +CSRF_TRUSTED_ORIGINS = ["https://localhost:8043"] # TODO: fixme From 587e5c5518828deb9b495892b30484a853a4700e Mon Sep 17 00:00:00 2001 From: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com> Date: Thu, 29 Feb 2024 18:30:07 -0500 Subject: [PATCH 03/10] Auto start/stop services when launching debug --- .gitignore | 1 + .vscode/launch.json | 37 +++++--- .vscode/tasks.json | 95 +++++++++++++++++++ .../sources/templates/nginx.locations.conf.j2 | 1 - 4 files changed, 121 insertions(+), 13 deletions(-) create mode 100644 .vscode/tasks.json diff --git a/.gitignore b/.gitignore index d6f0ee4c3947..9f4f2877e349 100644 --- a/.gitignore +++ b/.gitignore @@ -98,6 +98,7 @@ awx/awx_test.sqlite3-journal !.vscode/ .vscode/* !.vscode/launch.json +!.vscode/tasks.json # Editors *.sw[poj] diff --git a/.vscode/launch.json b/.vscode/launch.json index d529403e9cb7..69db4e3c0ffe 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,7 +1,4 @@ { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { @@ -10,7 +7,9 @@ "request": "launch", "program": "manage.py", "args": ["run_ws_heartbeat"], - "django": true + "django": true, + "preLaunchTask": "start awx-ws-heartbeat", + "postDebugTask": "stop awx-ws-heartbeat" }, { "name": "Python Debugger: run_callback_receiver", @@ -26,7 +25,9 @@ "request": "launch", "program": "manage.py", "args": ["run_dispatcher"], - "django": true + "django": true, + "preLaunchTask": "start awx-dispatcher", + "postDebugTask": "stop awx-dispatcher" }, { "name": "Python Debugger: run_rsyslog_configurer", @@ -34,7 +35,9 @@ "request": "launch", "program": "manage.py", "args": ["run_rsyslog_configurer"], - "django": true + "django": true, + "preLaunchTask": "start awx-rsyslog-configurer", + "postDebugTask": "stop awx-rsyslog-configurer" }, { "name": "Python Debugger: run_cache_clear", @@ -42,7 +45,9 @@ "request": "launch", "program": "manage.py", "args": ["run_cache_clear"], - "django": true + "django": true, + "preLaunchTask": "start awx-cache-clear", + "postDebugTask": "stop awx-cache-clear" }, { "name": "Python Debugger: run_wsrelay", @@ -50,7 +55,9 @@ "request": "launch", "program": "manage.py", "args": ["run_wsrelay"], - "django": true + "django": true, + "preLaunchTask": "start awx-wsrelay", + "postDebugTask": "stop awx-wsrelay" }, { "name": "Python Debugger: run_wsrelay", @@ -58,7 +65,9 @@ "request": "launch", "program": "manage.py", "args": ["run_wsrelay"], - "django": true + "django": true, + "preLaunchTask": "start awx-wsrelay", + "postDebugTask": "stop awx-wsrelay" }, { "name": "Python Debugger: daphne", @@ -66,15 +75,19 @@ "request": "launch", "program": "/var/lib/awx/venv/awx/bin/daphne", "args": ["-b", "127.0.0.1", "-p", "8051", "awx.asgi:channel_layer"], - "django": true + "django": true, + "preLaunchTask": "stop awx-daphne", + "postDebugTask": "start awx-daphne" }, { - "name": "Python Debugger: runserver_plus", + "name": "Python Debugger: uwsgi", "type": "debugpy", "request": "launch", "program": "manage.py", "args": ["runserver_plus", "0.0.0.0:8052", "--threaded"], - "django": true + "django": true, + "preLaunchTask": "stop awx-uwsgi", + "postDebugTask": "start awx-uwsgi" } ] } diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 000000000000..249661546d34 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,95 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "start awx-cache-clear", + "type": "shell", + "command": "supervisorctl start tower-processes:awx-cache-clear" + }, + { + "label": "stop awx-cache-clear", + "type": "shell", + "command": "supervisorctl stop tower-processes:awx-cache-clear" + }, + { + "label": "start awx-daphne", + "type": "shell", + "command": "supervisorctl start tower-processes:awx-daphne" + }, + { + "label": "stop awx-daphne", + "type": "shell", + "command": "supervisorctl stop tower-processes:awx-daphne" + }, + { + "label": "start awx-dispatcher", + "type": "shell", + "command": "supervisorctl start tower-processes:awx-dispatcher" + }, + { + "label": "stop awx-dispatcher", + "type": "shell", + "command": "supervisorctl stop tower-processes:awx-dispatcher" + }, + { + "label": "start awx-receiver", + "type": "shell", + "command": "supervisorctl start tower-processes:awx-receiver" + }, + { + "label": "stop awx-receiver", + "type": "shell", + "command": "supervisorctl stop tower-processes:awx-receiver" + }, + { + "label": "start awx-rsyslog-configurer", + "type": "shell", + "command": "supervisorctl start tower-processes:awx-rsyslog-configurer" + }, + { + "label": "stop awx-rsyslog-configurer", + "type": "shell", + "command": "supervisorctl stop tower-processes:awx-rsyslog-configurer" + }, + { + "label": "start awx-rsyslogd", + "type": "shell", + "command": "supervisorctl start tower-processes:awx-rsyslogd" + }, + { + "label": "stop awx-rsyslogd", + "type": "shell", + "command": "supervisorctl stop tower-processes:awx-rsyslogd" + }, + { + "label": "start awx-uwsgi", + "type": "shell", + "command": "supervisorctl start tower-processes:awx-uwsgi" + }, + { + "label": "stop awx-uwsgi", + "type": "shell", + "command": "supervisorctl stop tower-processes:awx-uwsgi" + }, + { + "label": "start awx-ws-heartbeat", + "type": "shell", + "command": "supervisorctl start tower-processes:awx-ws-heartbeat" + }, + { + "label": "stop awx-ws-heartbeat", + "type": "shell", + "command": "supervisorctl stop tower-processes:awx-ws-heartbeat" + }, + { + "label": "start awx-wsrelay", + "type": "shell", + "command": "supervisorctl start tower-processes:awx-wsrelay" + }, + { + "label": "stop awx-wsrelay", + "type": "shell", + "command": "supervisorctl stop tower-processes:awx-wsrelay" + } + ] +} diff --git a/tools/docker-compose/ansible/roles/sources/templates/nginx.locations.conf.j2 b/tools/docker-compose/ansible/roles/sources/templates/nginx.locations.conf.j2 index 8e3cddf91457..7c91a3c856a7 100644 --- a/tools/docker-compose/ansible/roles/sources/templates/nginx.locations.conf.j2 +++ b/tools/docker-compose/ansible/roles/sources/templates/nginx.locations.conf.j2 @@ -41,7 +41,6 @@ location {{ ingress_path }} { error_page 502 = @fallback; } - location @fallback { # Add trailing / if missing rewrite ^(.*)$http_host(.*[^/])$ $1$http_host$2/ permanent; From 48109b9d902e844d9738b2be71272dd2fd07ff26 Mon Sep 17 00:00:00 2001 From: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com> Date: Thu, 29 Feb 2024 19:21:07 -0500 Subject: [PATCH 04/10] shorter launch name and add runserver also install Werkzeug if using runserver_plus --- .vscode/launch.json | 70 ++++++++++++++++++++++++++------------------- .vscode/tasks.json | 5 ++++ 2 files changed, 46 insertions(+), 29 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 69db4e3c0ffe..506500e91284 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,75 +2,77 @@ "version": "0.2.0", "configurations": [ { - "name": "Python Debugger: run_ws_heartbeat", + "name": "run_ws_heartbeat", "type": "debugpy", "request": "launch", "program": "manage.py", "args": ["run_ws_heartbeat"], "django": true, - "preLaunchTask": "start awx-ws-heartbeat", - "postDebugTask": "stop awx-ws-heartbeat" + "preLaunchTask": "stop awx-ws-heartbeat", + "postDebugTask": "start awx-ws-heartbeat" }, { - "name": "Python Debugger: run_callback_receiver", + "name": "run_cache_clear", "type": "debugpy", "request": "launch", "program": "manage.py", - "args": ["run_callback_receiver"], - "django": true + "args": ["run_cache_clear"], + "django": true, + "preLaunchTask": "stop awx-cache-clear", + "postDebugTask": "start awx-cache-clear" }, { - "name": "Python Debugger: run_dispatcher", + "name": "run_callback_receiver", "type": "debugpy", "request": "launch", "program": "manage.py", - "args": ["run_dispatcher"], + "args": ["run_callback_receiver"], "django": true, - "preLaunchTask": "start awx-dispatcher", - "postDebugTask": "stop awx-dispatcher" + "preLaunchTask": "stop awx-receiver", + "postDebugTask": "start awx-receiver" }, { - "name": "Python Debugger: run_rsyslog_configurer", + "name": "run_dispatcher", "type": "debugpy", "request": "launch", "program": "manage.py", - "args": ["run_rsyslog_configurer"], + "args": ["run_dispatcher"], "django": true, - "preLaunchTask": "start awx-rsyslog-configurer", - "postDebugTask": "stop awx-rsyslog-configurer" + "preLaunchTask": "stop awx-dispatcher", + "postDebugTask": "start awx-dispatcher" }, { - "name": "Python Debugger: run_cache_clear", + "name": "run_rsyslog_configurer", "type": "debugpy", "request": "launch", "program": "manage.py", - "args": ["run_cache_clear"], + "args": ["run_rsyslog_configurer"], "django": true, - "preLaunchTask": "start awx-cache-clear", - "postDebugTask": "stop awx-cache-clear" + "preLaunchTask": "stop awx-rsyslog-configurer", + "postDebugTask": "start awx-rsyslog-configurer" }, { - "name": "Python Debugger: run_wsrelay", + "name": "run_cache_clear", "type": "debugpy", "request": "launch", "program": "manage.py", - "args": ["run_wsrelay"], + "args": ["run_cache_clear"], "django": true, - "preLaunchTask": "start awx-wsrelay", - "postDebugTask": "stop awx-wsrelay" + "preLaunchTask": "stop awx-cache-clear", + "postDebugTask": "start awx-cache-clear" }, { - "name": "Python Debugger: run_wsrelay", + "name": "run_wsrelay", "type": "debugpy", "request": "launch", "program": "manage.py", "args": ["run_wsrelay"], "django": true, - "preLaunchTask": "start awx-wsrelay", - "postDebugTask": "stop awx-wsrelay" + "preLaunchTask": "stop awx-wsrelay", + "postDebugTask": "start awx-wsrelay" }, { - "name": "Python Debugger: daphne", + "name": "daphne", "type": "debugpy", "request": "launch", "program": "/var/lib/awx/venv/awx/bin/daphne", @@ -80,14 +82,24 @@ "postDebugTask": "start awx-daphne" }, { - "name": "Python Debugger: uwsgi", + "name": "runserver(uwsgi alternative)", "type": "debugpy", "request": "launch", "program": "manage.py", - "args": ["runserver_plus", "0.0.0.0:8052", "--threaded"], + "args": ["runserver", "0.0.0.0:8052"], "django": true, "preLaunchTask": "stop awx-uwsgi", "postDebugTask": "start awx-uwsgi" - } + }, + { + "name": "runserver_plus(uwsgi alternative)", + "type": "debugpy", + "request": "launch", + "program": "manage.py", + "args": ["runserver_plus", "0.0.0.0:8052"], + "django": true, + "preLaunchTask": "stop awx-uwsgi and install Werkzeug", + "postDebugTask": "start awx-uwsgi" + }, ] } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 249661546d34..0b878663c311 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -71,6 +71,11 @@ "type": "shell", "command": "supervisorctl stop tower-processes:awx-uwsgi" }, + { + "label": "stop awx-uwsgi and install Werkzeug", + "type": "shell", + "command": "pip install Werkzeug; supervisorctl stop tower-processes:awx-uwsgi" + }, { "label": "start awx-ws-heartbeat", "type": "shell", From 72739afcdf05eefc1e5656562c7ad23eb80483c6 Mon Sep 17 00:00:00 2001 From: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com> Date: Mon, 4 Mar 2024 14:55:25 -0500 Subject: [PATCH 05/10] Fix test_default_settings --- .vscode/launch.json | 4 ++-- awx/settings/development.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 506500e91284..e6e13ac62de9 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -86,7 +86,7 @@ "type": "debugpy", "request": "launch", "program": "manage.py", - "args": ["runserver", "0.0.0.0:8052"], + "args": ["runserver", "127.0.0.1:8052"], "django": true, "preLaunchTask": "stop awx-uwsgi", "postDebugTask": "start awx-uwsgi" @@ -96,7 +96,7 @@ "type": "debugpy", "request": "launch", "program": "manage.py", - "args": ["runserver_plus", "0.0.0.0:8052"], + "args": ["runserver_plus", "127.0.0.1:8052"], "django": true, "preLaunchTask": "stop awx-uwsgi and install Werkzeug", "postDebugTask": "start awx-uwsgi" diff --git a/awx/settings/development.py b/awx/settings/development.py index 6d604deca1b4..e518c1204f78 100644 --- a/awx/settings/development.py +++ b/awx/settings/development.py @@ -72,6 +72,9 @@ # Allows user to trigger task managers directly for debugging and profiling purposes. # Only works in combination with settings.SETTINGS_MODULE == 'awx.settings.development' AWX_DISABLE_TASK_MANAGERS = False + +# Needed for launching runserver in debug mode +CSRF_TRUSTED_ORIGINS = ["https://localhost:8043"] # ======================!!!!!!! FOR DEVELOPMENT ONLY !!!!!!!================================= # Store a snapshot of default settings at this point before loading any @@ -117,5 +120,3 @@ set_application_name(DATABASES, CLUSTER_HOST_ID) # NOQA del set_application_name - -CSRF_TRUSTED_ORIGINS = ["https://localhost:8043"] # TODO: fixme From 10accc26a95b05ffaa6bfb0955136f8ad3ed6eac Mon Sep 17 00:00:00 2001 From: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com> Date: Wed, 6 Mar 2024 13:54:37 -0500 Subject: [PATCH 06/10] Add shell_plus as debug launch target Super useful! --- .vscode/launch.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.vscode/launch.json b/.vscode/launch.json index e6e13ac62de9..62289122564a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -101,5 +101,13 @@ "preLaunchTask": "stop awx-uwsgi and install Werkzeug", "postDebugTask": "start awx-uwsgi" }, + { + "name": "shell_plus", + "type": "debugpy", + "request": "launch", + "program": "manage.py", + "args": ["shell_plus"], + "django": true, + }, ] } From 5c06f478fdb0a4a74b5b17518f92d21fb5158e92 Mon Sep 17 00:00:00 2001 From: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com> Date: Thu, 7 Mar 2024 14:07:21 -0500 Subject: [PATCH 07/10] Add debugpy to requirements_dev --- requirements/requirements_dev.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/requirements/requirements_dev.txt b/requirements/requirements_dev.txt index b5084695b9ab..4d087803fda0 100644 --- a/requirements/requirements_dev.txt +++ b/requirements/requirements_dev.txt @@ -20,10 +20,13 @@ jupyter # matplotlib - Caused issues when bumping to setuptools 58 backports.tempfile # support in unit tests for py32+ tempfile.TemporaryDirectory git+https://github.com/artefactual-labs/mockldap.git@master#egg=mockldap -sdb -remote-pdb gprof2dot atomicwrites==1.4.0 flake8 yamllint pip>=21.3 # PEP 660 – Editable installs for pyproject.toml based builds (wheel based) + +# python debuggers +debugpy +remote-pdb +sdb From aad250a0de57824e02a47639a007d84abcbd3418 Mon Sep 17 00:00:00 2001 From: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com> Date: Thu, 7 Mar 2024 14:08:27 -0500 Subject: [PATCH 08/10] Git Ignore vscode --- .gitignore | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitignore b/.gitignore index 9f4f2877e349..19c34319451d 100644 --- a/.gitignore +++ b/.gitignore @@ -95,10 +95,7 @@ awx/awx_test.sqlite3-journal *.DS_Store # VSCode -!.vscode/ .vscode/* -!.vscode/launch.json -!.vscode/tasks.json # Editors *.sw[poj] From d1f7d03e8e5a84fe4bf8c6a6092a2d300b213450 Mon Sep 17 00:00:00 2001 From: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com> Date: Thu, 7 Mar 2024 14:09:10 -0500 Subject: [PATCH 09/10] Update .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 19c34319451d..26e0f20f0a71 100644 --- a/.gitignore +++ b/.gitignore @@ -95,7 +95,7 @@ awx/awx_test.sqlite3-journal *.DS_Store # VSCode -.vscode/* +.vscode/ # Editors *.sw[poj] From 40e1876b9c4a96aca8a915bb6fb7ae04c804dc9c Mon Sep 17 00:00:00 2001 From: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com> Date: Thu, 7 Mar 2024 14:11:21 -0500 Subject: [PATCH 10/10] Update nginx.locations.conf.j2 --- .../ansible/roles/sources/templates/nginx.locations.conf.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/docker-compose/ansible/roles/sources/templates/nginx.locations.conf.j2 b/tools/docker-compose/ansible/roles/sources/templates/nginx.locations.conf.j2 index 7c91a3c856a7..404be4ade26b 100644 --- a/tools/docker-compose/ansible/roles/sources/templates/nginx.locations.conf.j2 +++ b/tools/docker-compose/ansible/roles/sources/templates/nginx.locations.conf.j2 @@ -41,6 +41,7 @@ location {{ ingress_path }} { error_page 502 = @fallback; } +# Enable scenario where we shutdown uwsgi and launching runserver for debugging purposes location @fallback { # Add trailing / if missing rewrite ^(.*)$http_host(.*[^/])$ $1$http_host$2/ permanent;