You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when you execute ssh-action, it outputs the whole screen of log lines that can't be collapsed! Including completely excessive lines with your ssh script passed to execute on the remote server 😮
This is a real example of just a small script that is a part of ~200 lines of bash script for release logic:
======CMD======
#!/bin/bashset -e
#### extract the Artifact and remove on successcd$RELEASE
tar -mxf release.tar.gz
tar -mxf release-file1.tar.gz
tar -mxf release-file2.tar.gz
rm -f release.tar.gz
rm -f release-file1.tar.gz
rm -f release-file2.tar.gz
#### map new symlinks for specified shared foldersecho"INFO: trying to map shared folders in $ROOT."forFOLDERin$FOLDERS;doif [ !-z"$FOLDER" ] && [ -e"$RELEASE/$FOLDER" ];thencd$RELEASE&& rm -rf $FOLDERecho"INFO: Removed existing folder $RELEASE/$FOLDER"elseecho"INFO: No existing folder found on $RELEASE/$FOLDER. Skipping removal."fiif [ !-z"$FOLDER" ] && [ -e"$ROOT/shared/$FOLDER" ];thencd$RELEASE&& ln -nsf ../../../shared/$FOLDER$FOLDERecho"INFO: Mapped folder ../shared/$FOLDER."elseecho"INFO: No symlink folder found for ../shared/$FOLDER. Skipping mapping."fidone
......................................................
.............there goes LOTS MORE LINES...............
......................................................
======END======
out: INFO: trying to map shared folders in***.
out: INFO: No existing folder found on ***/releases/2023_06_12_15_05_28/pub/media. Skipping removal.
out: INFO: Mapped folder ../shared/pub/media.
out: INFO: Removed existing folder ***/releases/2023_06_12_15_05_28/pub/showroom
out: INFO: Mapped folder ../shared/pub/showroom.
out: INFO: No existing folder found on ***/releases/2023_06_12_15_05_28/var/log. Skipping removal.
out: INFO: Mapped folder ../shared/var/log.
out: INFO: No existing folder found on ***/releases/2023_06_12_15_05_28/var/import. Skipping removal.
out: INFO: Mapped folder ../shared/var/import.
out: INFO: No existing folder found on ***/releases/2023_06_12_15_05_28/var/export. Skipping removal.
out: INFO: Mapped folder ../shared/var/export.
out: INFO: No existing folder found on ***/releases/2023_06_12_15_05_28/var/importexport. Skipping removal.
out: INFO: Mapped folder ../shared/var/importexport.
......................................................
.............there goes LOTS MORE LINES...............
.............there goes LOTS MORE LINES...............
.............there goes LOTS MORE LINES...............
.............there goes LOTS MORE LINES...............
.............there goes LOTS MORE LINES...............
......................................................
==============================================
✅ Successfully executed commands to all host.
==============================================
As you can see, there are a couple of issues:
Script for execution is being passed right into output at the very beginning
Lines can't be collapsed
So if you have along script like mine with about ~200 lines long shell script that is messing around releasing.. and it producing even longer output (hundreds of lines!).. it all of a sudden becomes super messy to check the general log.
SOLUTION proposal is simple:
make a collapsible grouping using core Actions functionality for grouping log lines
echo "::group::Rsync process started"
echo "Inside group, executing commands, the whole lot of things echoing here"
echo "::endgroup::"
That will make a nice and clean log grouping.
For example, self-made grouping for my custom action\step, which is collapsed by default and can be opened by clicking:
P.S.
Probably, the only vital thing without grouping would be DONE or FAIL status in the end. The current executing script (that is being dumped at the beginning) can be definitely collapsed, as well as the execution log output.
P.P.S.
Also, if you can't add line grouping - it would be super great to have a param that will mute everything but the final result output (ok\fail)! e.g. it is unclear how the default debug param now works... but for example, once set to "false" it will group output, but if you pass "true" it will just dump the whole lot in the actions log.
Regards,
Stas
The text was updated successfully, but these errors were encountered:
Currently, when you execute ssh-action, it outputs the whole screen of log lines that can't be collapsed! Including completely excessive lines with your ssh script passed to execute on the remote server 😮
This is a real example of just a small script that is a part of ~200 lines of bash script for release logic:
As you can see, there are a couple of issues:
So if you have along script like mine with about ~200 lines long shell script that is messing around releasing.. and it producing even longer output (hundreds of lines!).. it all of a sudden becomes super messy to check the general log.
SOLUTION proposal is simple:
make a collapsible grouping using core Actions functionality for grouping log lines
Official documentation:
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#grouping-log-lines
Example:
That will make a nice and clean log grouping.
For example, self-made grouping for my custom action\step, which is collapsed by default and can be opened by clicking:
P.S.
Probably, the only vital thing without grouping would be DONE or FAIL status in the end. The current executing script (that is being dumped at the beginning) can be definitely collapsed, as well as the execution log output.
P.P.S.
Also, if you can't add line grouping - it would be super great to have a param that will mute everything but the final result output (ok\fail)! e.g. it is unclear how the default debug param now works... but for example, once set to "false" it will group output, but if you pass "true" it will just dump the whole lot in the actions log.
Regards,
Stas
The text was updated successfully, but these errors were encountered: