From cbcc3b9251bd83531da4a7a39a6147528529e807 Mon Sep 17 00:00:00 2001 From: maxfactor1 Date: Thu, 23 Feb 2023 13:27:13 -0600 Subject: [PATCH 1/4] Update base.py Expose debug action parameter as environment variable for all actions --- st2common/st2common/runners/base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/st2common/st2common/runners/base.py b/st2common/st2common/runners/base.py index aad8095aa3..91968ee8e5 100644 --- a/st2common/st2common/runners/base.py +++ b/st2common/st2common/runners/base.py @@ -233,6 +233,7 @@ def _get_common_action_env_variables(self): result["ST2_ACTION_PACK_NAME"] = self.get_pack_ref() result["ST2_ACTION_EXECUTION_ID"] = str(self.execution_id) result["ST2_ACTION_API_URL"] = get_full_public_api_url() + result["ST2_ACTION_DEBUG"] = str(self._debug) if self.auth_token: result["ST2_ACTION_AUTH_TOKEN"] = self.auth_token.token From f1fe377818baf3ee39f5e5291f2e28e121348672 Mon Sep 17 00:00:00 2001 From: Maxwell Buehler Date: Tue, 13 Feb 2024 10:17:52 -0600 Subject: [PATCH 2/4] Add max_page_size IntOpt to api_opts --- st2common/st2common/config.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/st2common/st2common/config.py b/st2common/st2common/config.py index c88955e4bb..d6cbef660b 100644 --- a/st2common/st2common/config.py +++ b/st2common/st2common/config.py @@ -363,6 +363,10 @@ def register_opts(ignore_errors=False): api_opts = [ cfg.StrOpt("host", default="127.0.0.1", help="StackStorm API server host"), cfg.IntOpt("port", default=9101, help="StackStorm API server port"), + cfg.IntOpt("max_page_size", + default=100, + help="Maximum limit (page size) argument which can be specified by the user in a query string.", + ), cfg.ListOpt( "allow_origin", default=["http://127.0.0.1:3000"], From 21769220e9a45d14ad209d00e2dc320ade2275f6 Mon Sep 17 00:00:00 2001 From: Maxwell Buehler Date: Tue, 13 Feb 2024 10:20:00 -0600 Subject: [PATCH 3/4] Add max_page_size IntOpt to api_opts --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1e48760eef..798d1ec4cd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -66,6 +66,9 @@ Fixed * For "local-shell-script" runner, on readonly filesystems, don't attempt to run chmod +x on script_action. Fixes #5591 Contributed by @jk464 +* Fix "api.max_page_size" added to st2common/st2common/config.py. Fixes 5327 + Contributed by @maxfactor1 + Added ~~~~~ * Move `git clone` to `user_home/.st2packs` #5845 From 395310348941616cb2a9fb3f0a4004f10a840cb0 Mon Sep 17 00:00:00 2001 From: Maxwell Buehler Date: Tue, 13 Feb 2024 12:57:10 -0600 Subject: [PATCH 4/4] reformat with black --- st2common/st2common/config.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/st2common/st2common/config.py b/st2common/st2common/config.py index d6cbef660b..464140f89e 100644 --- a/st2common/st2common/config.py +++ b/st2common/st2common/config.py @@ -363,10 +363,11 @@ def register_opts(ignore_errors=False): api_opts = [ cfg.StrOpt("host", default="127.0.0.1", help="StackStorm API server host"), cfg.IntOpt("port", default=9101, help="StackStorm API server port"), - cfg.IntOpt("max_page_size", - default=100, - help="Maximum limit (page size) argument which can be specified by the user in a query string.", - ), + cfg.IntOpt( + "max_page_size", + default=100, + help="Maximum limit (page size) argument which can be specified by the user in a query string.", + ), cfg.ListOpt( "allow_origin", default=["http://127.0.0.1:3000"],