armab
released this
https://stackstorm.com/2020/04/30/stackstorm-v3-2-0-released/
Added
- Add support for blacklisting / whitelisting hosts to the HTTP runner by adding new
url_hosts_blacklistandurl_hosts_whitelistrunner attribute. (new feature)
#4757 - Add
userparameter tore_runmethod of st2client. #4785 - Install pack dependencies automatically. #4769
- Add support for
immutable_parameterson Action Aliases. This feature allows default
parameters to be supplied to the action on every execution of the alias. #4786 - Add
get_entrypoint()method toActionResourceManagerattribute of st2client.
#4791 - Add support for orquesta task retry. (new feature)
- Add config option
scheduler.execution_scheduling_timeout_threshold_minto better control the cleanup of scheduled actions that were orphaned. #4886
Changed
-
Install pack with the latest tag version if it exists when branch is not specialized.
(improvement) #4743 -
Implement "continue" engine command to orquesta workflow. (improvement) #4740
-
Update various internal dependencies to latest stable versions (apscheduler, eventlet,
kombu, amqp, pyyaml, mongoengine, python-gnupg, paramiko, tooz, webob, bcrypt).Latest version of mongoengine should show some performance improvements (5-20%) when
writing very large executions (executions with large results) to the database. #4767 -
Improved development instructions in requirements.txt and dist_utils.py comment headers
(improvement) #4774 -
Add new
actionrunner.stream_output_buffer_sizeconfig option and default it to-1
(previously default value was0). This should result in a better performance and smaller
CPU utilization for Python runner actions which produce a lot of output.
(improvement) -
Add new
action_runner.pip_optsst2.conf config option which allows user to specify a list
of command line option which are passed topip installcommand when installing pack
dependencies into a pack specific virtual environment. #4792 -
Refactor how orquesta handles individual item result for with items task. Before the fix,
when there are a lot of items and/or result size for each item is huge, there is a negative
performance impact on write to the database when recording the conductor state. (improvement) -
Remove automatic rendering of workflow output when updating task state for orquesta workflows.
This caused workflow output to render incorrectly in certain use case. The render_workflow_output
function must be called separately. (improvement) -
Update various internal dependencies to latest stable versions (cryptography, jinja2, requests,
apscheduler, eventlet, amqp, kombu, semver, six) #4819 (improvement) -
Improve MongoDB connection timeout related code. Connection and server selection timeout is now
set to 3 seconds. Previously a default value of 30 seconds was used which means that for many
connection related errors, our code would first wait for this timeout to be reached (30 seconds)
before returning error to the end user. #4834 -
Upgrade
pymongoto the latest stable version (3.10.0.). #4835 (improvement) -
Updated Paramiko to v2.7.1 to support new PEM ECDSA key formats #4901 (improvement)
-
Remove
.scrutinizer.ymlconfig file. No longer used. -
Convert escaped dict and dynamic fields in workflow db models to normal dict and dynamic fields.
(performnce improvement) -
Add support for
PEP 508 <https://www.python.org/dev/peps/pep-0508/stackstorm/st2#environment-markers>_
environment markers in generatedrequirements.txtfiles. (improvement) #4895 -
Use
pip-compilefrompip-toolsinstead ofpip-conflict-checker(improvement) #4896 -
Refactor how inbound criteria for join task in orquesta workflow is evaluated to count by
task completion instead of task transition. (improvement) -
The workflow engine orquesta is updated to v1.1.0 for the st2 v3.2 release. The version upgrade
contains various new features and bug fixes. Please review the release notes for the full list of
changes at https://github.com/StackStorm/orquesta/releases/tag/v1.1.0 and the st2 upgrade notes
for potential impact. (improvement)
Fixed
-
Fix the action query when filtering tags. The old implementation returned actions which have the
provided name as action name and not as tag name. (bug fix) #4828Reported by @AngryDeveloper and contributed by Marcel Weinberg (@winem)
-
Fix the passing of arrays to shell scripts where the arrays where not detected as such by the
st2 action_db utility. This caused arrays to be passed as Python lists serialized into a string.Reported by @kingsleyadam #4804 and contributed by Marcel Weinberg (@winem) #4861
-
Fix ssh zombies when using ProxyCommand from ssh config #4881 [Eric Edgar]
-
Fix rbac with execution view where the rbac is unable to verify the pack or uid of the execution
because it was not returned from the action execution db. This would result in an internal server
error when trying to view the results of a single execution.
Contributed by Joshua Meyer (@jdmeyer3) #4758 -
Fixed logging middleware to output a
content_lengthof0instead ofInfinity
when the type of data being returned is not supported. Previously, when the value was
set toInfinitythis would result in invalid JSON being output into structured
logs. (bug fix) #4722Contributed by Nick Maludy (@nmaludy Encore Technologies)
-
Fix the workflow execution cancelation to proceed even if the workflow execution is not found or
completed. (bug fix) #4735 -
Added better error handling to
contrib/linux/actions/dig.pyto inform if dig is not installed.
Contributed by JP Bourget (@punkrokk Syncurity) #4732 -
Update
dist_utilsmodule which is bundled withst2clientand other Python packages so it
doesn't depend on internal pip API and so it works with latest pip version. (bug fix) #4750 -
Fix dependency conflicts in pack CI runs: downgrade requests dependency back to 0.21.0, update
internal dependencies and test expectations (amqp, pyyaml, prance, six) (bugfix) #4774 -
Fix secrets masking in action parameters section defined inside the rule when using
GET /v1/rulesandGET /v1/rules/<ref>API endpoint. (bug fix) #4788 #4807Contributed by @Nicodemos305 and @jeansfelix
-
Fix a bug with authentication API endpoint (
POST /auth/v1/tokens) returning internal
server error when running under gunicorn and whenauth.api_urlconfig option was not set.
(bug fix) #4809Reported by @guzzijones
-
Fixed
st2 execution getandst2 runnot printing theaction.reffor non-workflow
actions. (bug fix) #4739Contributed by Nick Maludy (@nmaludy Encore Technologies)
-
Update
st2 execution getcommand to always includecontext.user,start_timestampand
end_timestampattributes. (improvement) #4739 -
Fixed
core.sendmailbase64 encoding of longer subject lines (bug fix) #4795Contributed by @stevemuskiewicz and @guzzijones
-
Update all the various rule criteria comparison operators which also work with strings (equals,
icontains, nequals, etc.) to work correctly on Python 3 deployments if one of the operators is
of a type bytes and the other is of a type unicode / string. (bug fix) #4831 -
Fix SSL connection support for MongoDB and RabbitMQ which wouldn't work under Python 3 and would
result in cryptic "maximum recursion depth exceeded while calling a Python object" error on
connection failure.NOTE: This issue only affected installations using Python 3. (bug fix) #4832 #4834
Reported by @alexku7.
-
Fix the amqp connection setup for WorkflowExecutionHandler to pass SSL params. (bug fix) #4845
Contributed by Tatsuma Matsuki (@mtatsuma)
-
Fix dependency conflicts by updating
requests(2.23.0) andgitpython(2.1.15). #4869 -
Fix orquesta syntax error for with items task where action is misindented or missing. (bug fix)
PR StackStorm/orquesta#195. -
Fix orquesta yaql/jinja vars extraction to ignore methods of base ctx() dict. (bug fix)
PR StackStorm/orquesta#196. Fixes #4866. -
Fix parsing of array of dicts in YAQL functions. Fix regression in YAQL/Jinja conversion
functions as a result of the change. (bug fix) PR StackStorm/orquesta#191.Contributed by Hiroyasu Ohyama (@userlocalhost)
Removed
- Removed Ubuntu 14.04 from test matrix #4897
Assets
2
Changed
- Allow the orquesta st2kv function to return default for nonexistent key. (improvement) #4678
- Update requests library to latest version (2.22.0) in requirements. (improvement) #4680
- Disallow "decrypt_kv" filter to be specified in the config for values that are marked as
"secret: True" in the schema. (improvement) #4709 - Upgrade
toozlibrary to latest stable version (1.65.0) so it uses latest version of
grpciolibrary. (improvement) #4713 - Update
st2-pack-installandst2-pack-downloadCLI command so it supports installing
packs from local directories which are not git repositories. (improvement) #4713
Fixed
- Fix orquesta st2kv to return empty string and null values. (bug fix) #4678
- Allow tasks defined in the same task transition with
failto run for orquesta. (bug fix) - Fix workflow service to handle unexpected coordinator and database errors. (bug fix) #4704 #4705
- Fix filter
to_yaml_stringto handle mongoengine base types for dict and list. (bug fix) #4700 - Fix timeout handling in the Python runner. In some scenarios where action would time out before
producing any output (stdout, stder), timeout was not correctly propagated to the user. (bug fix)
#4713 - Update
st2common/setup.pyfile so it correctly declares all the dependencies and script
files it provides. This wayst2-pack-*commands can be used in a standalone fashion just by
installingst2commonPython package and nothing else. (bug fix) #4713 - Fix
st2-pack-downloadcommand so it works in the environments wheresudobinary is not
available (e.g. Docker). (bug fix) #4713
Assets
2
m4dcoder
released this
Fixed
-
Fix a bug in the remote command and script runner so it correctly uses SSH port from a SSH config
file ifssh_runner.use_ssh_configparameter is set toTrueand if a custom (non-default)
value for SSH port is specified in the configured SSH config file
(ssh_runner.ssh_config_file_path). (bug fix) #4660 #4661 -
Update pack install action so it works correctly when
python_versionspack.yamlmetadata
attribute is used in combination with--python3pack install flag. (bug fix) #4654 #4662 -
Add
source_channelback to the context used by Mistral workflows for executions which are
triggered via ChatOps (using action alias).In StackStorm v3.0.0, this variable was inadvertently removed from the context used by Mistral
workflows. (bug fix) #4650 #4656 -
Fix a bug with
timestampattribute in theexecution.logattribute being incorrect when
server time where st2api is running was not set to UTC. (bug fix) #4668Contributed by Igor Cherkaev. (@emptywee)
-
Fix a bug with some packs which use
--python3flag (running Python 3 actions on installation
where StackStorm components run under Python 2) which rely on modules from Python 3 standard
library which are also available in Python 2 site-packages (e.g.concurrent) not working
correctly.In such scenario, package / module was incorrectly loaded from Python 2 site-packages instead of
Python 3 standard library which broke such packs. (bug fix) #4658 #4674 -
Remove policy-delayed status to avoid bouncing between delayed statuses. (bug fix) #4655
-
Fix a possible shell injection in the
linux.serviceaction. User who had access to run this
action could cause a shell command injection by passing a compromised value for either the
serviceoractionparameter. (bug fix) #4675Reported by James Robinson (Netskope and Veracode).
-
Replace
sseclientlibrary on which CLI depends on withsseclient-py.sseclienthas
various issue which cause client to sometimes hang and keep the connection open which also causes
st2 execution tailcommand to sometimes hang for a long time. (improvement) -
Truncate some database index names so they are less than 65 characters long in total. This way it
also works with AWS DocumentDB which doesn't support longer index name at the moment.NOTE: AWS DocumentDB is not officially supported. Use at your own risk. (improvement) #4688 #4690
Reported by Guillaume Truchot (@GuiTeK)
Assets
2
Added
-
Allow access to user-scoped datastore items using
{{ st2kv.user.<key name> }}Jinja template
notation inside the action parameter default values. (improvement) #4463Contributed by Hiroyasu OHYAMA (@userlocalhost).
-
Add support for new
python_versions(listofstring) attribute to pack metadata file
(pack.yaml). With this attribute pack declares which major Python versions it supports and
works with (e.g.2and3).For backward compatibility reasons, if pack metadata file doesn't contain that attribute, it's
assumed it only works with Python 2. (new feature) #4474 -
Update service bootstrap code and make sure all the services register in a service registry once
they come online and become available.This functionality is only used internally and will only work if configuration backend is
correctly configured inst2.conf(new feature) #4548 -
Add new
GET /v1/service_registry/groupsand
GET /v1/service_registry/groups/<group_id>/membersAPI endpoint for listing available service
registry groups and members.Also add corresponding CLI commands -
st2 service-registry group list,st2 service registry member list [--group-id=<group id>]NOTE: This API endpoint is behind an RBAC wall and can only be viewed by the admins. (new feature)
#4548 -
Add support for
?include_attributesand?exclude_attributesquery param filter to the
GET /api/v1/executions/{id}API endpoint. Also updatest2 execution getCLI command so it
only retrieves attributes which are displayed. (new feature) #4497Contributed by Nick Maludy (@nmaludy Encore Technologies)
-
Add new
--encryptedflag tost2 key setCLI command that allows users to pass in values
which are already encrypted.This attribute signals the API that the value is already encrypted and should be used as-is.
st2 key loadCLI command has also been updated so it knows how to work with values which are
already encrypted. This means thatst2 key list -n 100 -j < data.json ; st2 key load data.jsonwill now also work out of the box for encrypted datastore values (values which have
encrypted: Trueandsecret: Trueattribute will be treated as already encrypted and used
as-is).The most common use case for this feature is migrating / restoring datastore values from one
StackStorm instance to another which uses the same crypto key.Contributed by Nick Maludy (Encore Technologies) #4547
-
Add
source_channelto Orquestast2()context for workflows called via ChatOps. #4600
Changed
-
Changed the
inquiriesAPI path from/expto/api/v1. #4495 -
Refactored workflow state in orquesta workflow engine. Previously, state in the workflow engine
is not status to be consistent with st2. Other terminologies used in the engine are also revised
to make it easier for developers to understand. (improvement) -
Update Python runner code so it prioritizes libraries from pack virtual environment over StackStorm
system dependencies.For example, if pack depends on
six==1.11.0in packrequirements.txt, but StackStorm depends
onsix==1.10.0,six==1.11.0will be used when running Python actions from that pack.Keep in mind that will not work correctly if pack depends on a library which brakes functionality used
by Python action wrapper code.Contributed by Hiroyasu OHYAMA (@userlocalhost). #4571
-
Improved the way that the
winrm-ps-scriptrunner sends scripts to the target Windows
host. Previously the script was read from the local filesystem and serialized as one long
command executed on the command line. This failed when the script was longer than either
2047 or 8191 bytes (depending on Windows version) as the Windows command line uses this
as its maximum length. To overcome this, thewinrm-ps-scriptrunner now uploads the
script into a temporary directory on the target host, then executes the script.
(improvement) #4514Contributed by Nick Maludy (Encore Technologies)
-
Update various internal dependencies to latest stable versions (apscheduler, pyyaml, kombu,
mongoengine, pytz, stevedore, python-editor, jinja2). #4637 -
Update logging code so we exclude log messages with log level
AUDITfrom a default service
log file (e.g.st2api.log). Log messages with levelAUDITare already logged in a
dedicated service audit log file (e.g.st2api.audit.log) so there is no need for them to also
be duplicated and included in regular service log file.NOTE: To aid with debugging, audit log messages are also included in a regular log file when log
level is set toDEBUGorsystem.debugconfig option is set toTrue. -
Add missing
--userargument tost2 execution listCLI command. (improvement) #4632Contributed by Tristan Struthers (@trstruth).
-
Update
decrypt_kvJinja template filter so it to throws a more user-friendly error message
when decryption fails because the variable references a datastore value which doesn't exist.
(improvement) #4634 -
Updated orquesta to v0.5. (improvement)
Fixed
-
Refactored orquesta execution graph to fix performance issue for workflows with many references
to non-join tasks. st2workflowengine and DB models are refactored accordingly. (improvement)
StackStorm/orquesta#122. -
Fix orquesta workflow stuck in running status when one or more items failed execution for a with
items task. (bug fix) #4523 -
Fix orquesta workflow bug where context variables are being overwritten on task join. (bug fix)
StackStorm/orquesta#112 -
Fix orquesta with items task performance issue. Workflow runtime increase significantly when a
with items task has many items and result in many retries on write conflicts. A distributed lock
is acquired before write operations to avoid write conflicts. (bug fix) StackStorm/orquesta#125 -
Fix a bug with some API endpoints returning 500 internal server error when an exception contained
unicode data. (bug fix) #4598 -
Fix the
st2 workflow inspectcommand so it correctly passes authentication token. (bug fix)
#4615 -
Fix an issue with new line characters (
\n) being converted to\r\nin remote shell
command and script actions which use sudo. (bug fix) #4623 -
Update service bootstrap and
st2-register-contentscript code so non-fatal errors are
suppressed by default and only logged underDEBUGlog level. (bug fix) #3933 #4626 #4630 -
Fix a bug with not being able to decrypt user-scoped datastore values inside Jinja expressions
usingdecrypt_kvJinja filter. (bug fix) #4634Contributed by Hiroyasu OHYAMA (@userlocalhost).
-
Fix a bug with user-scoped datastore values not working inside action-chain workflows. (bug fix)
#4634 -
Added missing parameter types to
linux.wait_for_sshaction metadata. (bug fix) #4611 -
Fix HTTP runner (
http-request) so it works correctly with unicode (non-ascii) body payloads.
(bug fix) #4601 #4599Reported by Carlos Santana (@kknyxkk) and Rafael Martins (@rsmartins78).
-
Fix
st2-self-checkso it sets correct permissions on pack directories which it copies over
to/opt/stackstorm/packs. (bug fix) #4645 -
Fix
POST /v1/actionsAPI endpoint to throw a more user-friendly error when writing data file
to disk fails because of incorrect permissions. (bug fix) #4645
Assets
2
Fixed
-
Fix inadvertent regression in notifier service which would cause generic action trigger to only
be dispatched for completed states even if custom states were specified using
action_sensor.emit_whenconfig option. (bug fix)
Reported by Shu Sugimoto (@shusugmt). #4591 -
Make sure we don't log auth token and api key inside st2api log file if those values are provided
via query parameter and not header (?x-auth-token=foo,?st2-api-key=bar). (bug fix) #4592
#4589 -
Fix rendering of
{{ config_context. }}in orquesta task that references action from a
different pack (bug fix) #4570 #4567 -
Add missing default config location (
/etc/st2/st2.conf) to the following services:
st2actionrunner,st2scheduler,st2workflowengine. (bug fix) #4596 -
Update statsd metrics driver so any exception thrown by statsd library is treated as non fatal.
Previously there was an edge case if user used a hostname instead of an IP address for metrics
backend server address. In such scenario, if hostname DNS resolution failed, statsd driver would
throw the exception which would propagate all the way up and break the application. (bug fix) #4597Reported by Chris McKenzie.
Assets
2
Fixed
- Fix improper CORS where request from an origin not listed in
allowed_originswill be responded
withnullfor theAccess-Control-Allow-Originheader. The fix returns the first of our
allowed origins if the requesting origin is not a supported origin. Reported by Barak Tawily.
(bug fix)
Assets
2
m4dcoder
released this
Fixed
- Fix improper CORS where request from an origin not listed in
allowed_originswill be responded
withnullfor theAccess-Control-Allow-Originheader. The fix returns the first of our
allowed origins if the requesting origin is not a supported origin. Reported by Barak Tawily.
(bug fix)
Assets
2
Added
-
Add support for various new SSL / TLS related config options (
ssl_keyfile,ssl_certfile,
ssl_ca_certs,ssl_certfile,authentication_mechanism) to themessagingsection in
st2.confconfig file.With those config options, user can configure things such as client based certificate
authentication, client side verification of a server certificate against a specific CA bundle, etc.NOTE: Those options are only supported when using a default and officially supported AMQP backend
with RabbitMQ server. (new feature) #4541 -
Add metrics instrumentation to the
st2notifierservice. For the available / exposed metrics,
please refer to https://docs.stackstorm.com/reference/metrics.html. (improvement) #4536
Changed
-
Update logging code so we exclude log messages with log level
AUDITfrom a default service
log file (e.g.st2api.log). Log messages with levelAUDITare already logged in a
dedicated service audit log file (e.g.st2api.audit.log) so there is no need for them to also
be duplicated and included in regular service log file.NOTE: To aid with debugging, audit log messages are also included in a regular log file when log
level is set toDEBUGorsystem.debugconfig option is set toTrue. -
Update
pyyamldependency to the latest version. This latest version fixes an issue which
could result in a code execution vulnerability if code usesyaml.loadin an unsafe manner
on untrusted input.NOTE: StackStorm platform itself is not affected, because we already used
yaml.safe_load
everywhere.Only custom packs which use
yaml.loadwith non trusted user input could potentially be
affected. (improvement) #4510 #4552 #4554 -
Update Orquesta to
v0.4. #4551
Fixed
-
Fixed the
packs.pack_install/!pack install {{ packs }}action-alias to not have
redundant patterns. Previously this prevented it from being executed via
st2 action-alias execute 'pack install xxx'. #4511Contributed by Nick Maludy (Encore Technologies)
-
Fix datastore value encryption and make sure it also works correctly for unicode (non-ascii)
values.Reported by @dswebbthg, @nickbaum. (bug fix) #4513 #4527 #4528
-
Fix a bug with action positional parameter serialization used in local and remote script runner
not working correctly with non-ascii (unicode) values.This would prevent actions such as
core.sendmailwhich utilize positional parameters from
working correctly when a unicode value was provided.Reported by @johandahlberg (bug fix) #4533
-
Fix
core.sendmailaction so it specifiescharset=UTF-8in theContent-Typeemail
header. This way it works correctly when an email subject and / or body contains unicode data.Reported by @johandahlberg (bug fix) #4533 4534
-
Fix CLI
st2 apikey loadnot being idempotent and API endpoint/api/v1/apikeysnot
honoring desiredIDfor the new record creation. #4542 -
Moved the lock from concurrency policies into the scheduler to fix a race condition when there
are multiple scheduler instances scheduling execution for action with concurrency policies.
#4481 (bug fix) -
Add retries to scheduler to handle temporary hiccup in DB connection. Refactor scheduler
service to return proper exit code when there is a failure. #4539 (bug fix) -
Update service setup code so we always ignore
kombulibraryheartbeat_tickdebug log
messages.Previously if
DEBUGlog level was set in service logging config file, but--debug
service CLI flag /system.debug = Trueconfig option was not used, those messages were
still logged which caused a lot of noise which made actual useful log messages hard to find.
(improvement) #4557
Assets
2
Fixed
-
Fix an issue with
GET /v1/keysAPI endpoint not correctly handling?scope=alland
?user=<username>query filter parameter inside the open-source edition. This would allow
user A to retrieve datastore values from user B and similar.NOTE: Enterprise edition with RBAC was not affected, because in RBAC version, correct check is
in place which only allows users with an admin role to use?scope=alland retrieve / view
datastore values for arbitrary system users. (security issue bug fix)
Assets
2
Fixed
-
Fix an issue with
GET /v1/keysAPI endpoint not correctly handling?scope=alland
?user=<username>query filter parameter inside the open-source edition. This would allow
user A to retrieve datastore values from user B and similar.NOTE: Enterprise edition with RBAC was not affected, because in RBAC version, correct check is
in place which only allows users with an admin role to use?scope=alland retrieve / view
datastore values for arbitrary system users. (security issue bug fix)