Skip to content

Commit d4c398a

Browse files
authored
expose action parameter debug to all actions (#5911)
* Update base.py Expose debug action parameter as environment variable for all actions * Update CHANGELOG.rst
1 parent b19ab50 commit d4c398a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ Added
2424
* Added publisher to ActionAlias to enable streaming ActionAlias create/update/delete events. #5763
2525
Contributed by @ubaumann
2626

27+
* Expose environment variable ST2_ACTION_DEBUG to all StackStorm actions.
28+
Contributed by @maxfactor1
29+
2730

2831
3.8.0 - November 18, 2022
2932
-------------------------

st2common/st2common/runners/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ def __init__(self, runner_id):
155155
self.context = None
156156
self.auth_token = None
157157
self.rerun_ex_ref = None
158+
self._debug = None
158159

159160
def pre_run(self):
160161
# Handle runner "enabled" attribute
@@ -233,6 +234,7 @@ def _get_common_action_env_variables(self):
233234
result["ST2_ACTION_PACK_NAME"] = self.get_pack_ref()
234235
result["ST2_ACTION_EXECUTION_ID"] = str(self.execution_id)
235236
result["ST2_ACTION_API_URL"] = get_full_public_api_url()
237+
result["ST2_ACTION_DEBUG"] = str(self._debug)
236238

237239
if self.auth_token:
238240
result["ST2_ACTION_AUTH_TOKEN"] = self.auth_token.token

0 commit comments

Comments
 (0)