Open
Description
SUMMARY
Code snippets:
# workflows/list_instances.yaml
finish:
action: centro.post_message
input:
channel: <% $.channel %>
module_name: <% $.module_name %>
environment: <% $.environment %>
execution_id: <% $.execution_id %>
user: <% $.user %>
message: "```<% $.instance_list %>```"
on-complete:
- succeed
# chains/post_message.yaml
---
chain:
-
name: "post_message"
ref: "slack.post_message"
parameters:
username: "marvin"
channel: "{{ channel }}"
icon_emoji: ":marvin:"
message: "[{{ module_name }} | {{ environment }} | {{ execution_id }} | {{ user }}] - {{ message }}"
In the previous install of st2, \n
characters were honored and produced newlines in the output to slack. In the 2.7.2 release the \n
characters get output, munging the output into a single line of output.
ISSUE TYPE
Pick one below and delete the rest:
- Bug Report
STACKSTORM VERSION
st2 2.7.2, on Python 2.7
OS / ENVIRONMENT / INSTALL METHOD
CentOS Linux release 7.5.1804 (Core)
Installation method:
curl -sSL https://stackstorm.com/packages/install.sh | bash -s -- --user=st2admin --password='REDACTED' --version="${st2_version}"
STEPS TO REPRODUCE
This outputs the same way ever time.
EXPECTED RESULTS
Expected output:
Instance Id State IP Addr Started Avail Zone Type Environment Role Full Name
--------------------- ---------- ------------- -------------------- ------------ ------------ --------------- --------------- ------------------------------
i-0ab70a085095ff8f4 running 10.50.13.191 2018-08-08 15:15:54 us-west-2c m5.large staging02 biexport-worker biexport-worker-green_staging02
i-0c041493c86994868 running 10.50.12.76 2018-08-08 15:15:39 us-west-2b m4.xlarge staging02 cmm_web cmm-green_staging02
i-099b501ee05e2eb50 running 10.50.12.8 2018-05-01 03:22:48 us-west-2b t2.medium staging02 metabase metabase-staging02
ACTUAL RESULTS
Instance Id State IP Addr Started Avail Zone Type Environment Role Full Name \n--------------------- ---------- ------------- -------------------- ------------ ------------ --------------- --------------- ------------------------------\ni-0ab70a085095ff8f4 running 10.50.13.191 2018-08-08 15:15:54 us-west-2c m5.large staging02 biexport-worker biexport-worker-green_staging02\ni-0c041493c86994868 running 10.50.12.76 2018-08-08 15:15:39 us-west-2b m4.xlarge staging02 cmm_web cmm-green_staging02 \ni-099b501ee05e2eb50 running 10.50.12.8 2018-05-01 03:22:48 us-west-2b t2.medium staging02 metabase metabase-staging02 \n ...