From d246090adb80efeeefc68f7918847aa13c1edf91 Mon Sep 17 00:00:00 2001 From: Carlos Date: Mon, 28 Apr 2025 08:58:44 +0200 Subject: [PATCH 1/3] Upgrade notes for v3.9 --- docs/source/chatops/chatops.rst | 2 +- docs/source/install/uninstall.rst | 4 +-- docs/source/roadmap.rst | 19 ++++++++++--- docs/source/upgrade_notes.rst | 45 +++++++++++++++++++++++++------ 4 files changed, 55 insertions(+), 15 deletions(-) diff --git a/docs/source/chatops/chatops.rst b/docs/source/chatops/chatops.rst index b416da11..212fadbb 100644 --- a/docs/source/chatops/chatops.rst +++ b/docs/source/chatops/chatops.rst @@ -251,5 +251,5 @@ Logging ======= ChatOps logs are written to ``/var/log/st2/st2chatops.log`` on non systemd-based distros. For -systemd-based distros (Ubuntu 18/20, RHEL/RockyLinux8+), you can access the logs via +systemd-based distros (Ubuntu 18+, RHEL/RockyLinux8+), you can access the logs via ``journalctl --unit=st2chatops`` diff --git a/docs/source/install/uninstall.rst b/docs/source/install/uninstall.rst index 6e73620e..8a27cffb 100644 --- a/docs/source/install/uninstall.rst +++ b/docs/source/install/uninstall.rst @@ -40,7 +40,7 @@ below. Only execute the instructions for your distribution. 1. Stop Services ---------------- -* Ubuntu 18.04/20.04: +* Ubuntu: .. sourcecode:: bash @@ -69,7 +69,7 @@ below. Only execute the instructions for your distribution. 2. Remove Packages ------------------ -* Ubuntu 18.04/20.04: +* Ubuntu: If you are using StackStorm only: diff --git a/docs/source/roadmap.rst b/docs/source/roadmap.rst index 1d5efc0c..1036420f 100644 --- a/docs/source/roadmap.rst +++ b/docs/source/roadmap.rst @@ -16,10 +16,12 @@ contributions. Here's our plans for the next releases. the feature. Pull Requests are open to anyone. -3.8 +3.10 --- -* **Output Schema:** Allow action/runner output schemas to cover all output types, not just JSON objects. +* **SSO:** Support SSO with SAML2 for |ewc| web UI (beta). +* **Python ChatOps:** Convert ChatOps backend to Python + * More will be added to the roadmap for ``3.8``. So, stay tuned! Monitor the `master branch `_ to see how we're progressing. @@ -29,12 +31,10 @@ Backlog Here's some more nice things on our list that we haven't scheduled yet: -* **Python ChatOps:** Convert ChatOps backend to Python * **ChatOps:** Support RBAC. * **K8s/HA:** Graduate `K8s Helm chart `_ from beta to stable. * **Workflow runtime graph:** Runtime view of workflow execution in st2flow for |ewc|. * **Workflow dry run:** Ability to run unit tests on orquesta workflows for |ewc|. -* **SSO:** Support SSO with SAML2 for |ewc| web UI (beta). * **Job Scheduling:** Job scheduling for ad-hoc jobs. * **Datastore viewer/editor:** Datastore viewer/editor at web UI. * **History and Audit service:** History view with advanced search over years worth of execution @@ -59,6 +59,17 @@ Submit a PR! Release History --------------- +.. rubric:: Done in v3.9 + +* **MongoDB compatibility:** Support for versions greater than v4.x add with v7.x being actively tested. +* **RHEL/RockyLinux 9:** is now supported which has replaced RHEL7 in the supported OS matrix. +* **Ubuntu Jammy 22.04:** is now supported and has replaced Ubuntu Bionic 18.04 +* **Python 3.9, 3.10 & 3.11:** st2 is now tested against supported version of Python. Python 3.6 support has been removed. + +.. rubric:: Done in v3.8 + +* **Output Schema:** Allow action/runner output schemas to cover all output types, not just JSON objects. + .. rubric:: Done in v3.7 * **RHEL/RockyLinux 8:** EL8 support continues, despite the deprecation of CentOS 8. We now use RockyLinux 8 to build for and test on EL8. diff --git a/docs/source/upgrade_notes.rst b/docs/source/upgrade_notes.rst index b41ed12b..6a4839e2 100644 --- a/docs/source/upgrade_notes.rst +++ b/docs/source/upgrade_notes.rst @@ -3,6 +3,35 @@ Upgrade Notes ============= +.. _ref-upgrade-notes-v3-9: + +|st2| v3.9 +---------- + + * Compatibility updates. + - Linux distribution support for Ubuntu 22.04 Jammy and RockyLinux 9 (RHEL9 compatible) has been added. Support for Ubuntu 18.04 Focal and CentOS 7 has been removed. + - Python versions from ``3.8`` to ``3.11`` are supported along with the removal of ``3.6`` support. + - MongoDB compatibility ranges from ``4.x`` to ``v7.x`` for the official MongoDB database. + + * Configuration updates required in ``st2.conf``. + + Several ``st2.conf`` database options have been renamed or deprecated. Most of the options will continue to work using their old name. + However, if you use `[database].ssl_keyfile` and/or `[database].ssl_certfile`, you MUST migrate to `[database].tls_certificate_key_file`. + This new option expects the key and certificate in the same file. Use something like the following to create that file from your old files: + + .. code-block:: + + cat path/to/ssl_keyfile path/to/ssl_certfile > path/to/tls_certificate_key_file + + + Other options that were renamed under ``[database]`` are (more details available in ``st2.conf.sample``): + + * ``ssl`` -> ``tls`` + * ``ssl_cert_reqs`` -> ``tls_allow_invalid_certificates`` (opt type change: string -> boolean) + * ``ssl_ca_certs`` -> ``tls_ca_file`` + * ``ssl_match_hostnames`` -> ``tls_allow_invalid_hostnames`` (meaning is inverted: the new option is the opposite of the old) + + .. _ref-upgrade-notes-v3-8: |st2| v3.8 @@ -53,7 +82,7 @@ Upgrade Notes * As part of extending RBAC support to include protecting access to datastore operations, if you have RBAC enabled and any workflows access the datastore, then any user with execute permissions for those workflows will need to be assigned an RBAC role with the appropriate - key_value_pair permissions. + key_value_pair permissions. Further information can be found in the :doc:`RBAC documentation `. * Additional garbage collection options are available to automatically delete old tokens. @@ -102,7 +131,7 @@ Upgrade Notes * As part of extending RBAC support to include protecting access to datastore operations, if you have RBAC enabled and any sensors access the datastore, then the ``sensor_service`` user will - need to be assigned an RBAC role with the appropriate key_value_pair permissions. + need to be assigned an RBAC role with the appropriate key_value_pair permissions. Further information can be found in the :doc:`RBAC documentation `. .. _ref-upgrade-notes-v3-6: @@ -156,10 +185,10 @@ Upgrade Notes * ``%`` interpolation in st2 configuration parameters is no longer supported. Update your configuration parameters to fix strings if you use ``%`` interpolation to lookup keys as part of your parameter. - + Now ``%`` is a valid character in parameter values. - - This increases security because passwords with a ``%`` in it do no longer result into an error. + + This increases security because passwords with a ``%`` in it do no longer result into an error. * The underlying database field type for storing large values such as action execution result has changed for various database models (ActionExecutionDB, LiveActionDB, WorkflowExecutionDB, @@ -288,11 +317,11 @@ Upgrade Notes the ``/opt/stackstorm/st2`` virtualenv. This is caused by the fact that the core ``st2`` package no longer bundles in the ``pyasn1`` module, so it will be absent post-upgrade. Running following command will be necessary for ``st2auth`` to function again: - + .. code-block:: bash /opt/stackstorm/st2/bin/pip install pyasn1 - + .. _ref-upgrade-notes-v3-0: @@ -405,7 +434,7 @@ Upgrade Notes ``sudo st2ctl reload --register-runners`` command. Keep in mind that all the runners which are installed inside |st2| virtual environment are now - automatically loaded and registered on each |st2| service start up. You only need to run + automatically loaded and registered on each |st2| service start up. You only need to run ``sudo st2ctl reload --register-runners`` if you are using runner outside the service context or if you didn't restart the services. From 1627adbde72e9331b2b856473abb1e0a64fefdc7 Mon Sep 17 00:00:00 2001 From: Jacob Zufelt Date: Fri, 6 Jun 2025 12:51:05 -0600 Subject: [PATCH 2/3] Few fixes to chatops docs --- docs/source/chatops/aliases.rst | 2 +- docs/source/chatops/chatops.rst | 5 +++-- docs/source/install/common/configure_chatops.rst | 13 ++----------- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/docs/source/chatops/aliases.rst b/docs/source/chatops/aliases.rst index 010c0eb7..8e507c05 100644 --- a/docs/source/chatops/aliases.rst +++ b/docs/source/chatops/aliases.rst @@ -374,7 +374,7 @@ depending on execution status: To disable the result message, you can use the ``enabled`` flag in the same way as in ``ack``. Threading Replies (Slack) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^^^^ You can configure the hubot ``ack`` and ``result`` messages to be sent as a threaded reply to the invoked command in slack. This defaults to false if not set. diff --git a/docs/source/chatops/chatops.rst b/docs/source/chatops/chatops.rst index 212fadbb..401316bc 100644 --- a/docs/source/chatops/chatops.rst +++ b/docs/source/chatops/chatops.rst @@ -78,8 +78,9 @@ installed, and StackStorm :ref:`API keys ` have been con You just need to tell |st2| which Chat service to use - e.g. Slack. You will also need to give it credentials. Your Chat service may also need configuration. For example, to configure Slack, -you first need to add a new Hubot integration to Slack. You can do this through Slack's admin interface. -Take note of the ``HUBOT_SLACK_TOKEN`` that Slack provides. +you first need to add a new Hubot integration to Slack. You can do this through Slack's admin interface +using the following `example bot yaml definition `_. +Take note of the ``HUBOT_SLACK_BOT_TOKEN`` and ``HUBOT_SLACK_APP_TOKEN`` that Slack provides. Then edit the file ``/opt/stackstorm/chatops/st2chatops.env``. Edit and uncomment the variables for your adapter. For example, if you are configuring Slack, look for this section: diff --git a/docs/source/install/common/configure_chatops.rst b/docs/source/install/common/configure_chatops.rst index 4cafa73a..3b47f30c 100644 --- a/docs/source/install/common/configure_chatops.rst +++ b/docs/source/install/common/configure_chatops.rst @@ -5,14 +5,5 @@ update the ``ST2_API`` and ``ST2_AUTH_URL`` variables or just point to the correct host with ``ST2_HOSTNAME``. - The example configuration uses Slack. To set this up, go to the Slack web admin interface, create - a Bot, and copy the authentication token into ``HUBOT_SLACK_TOKEN``. - - If you are using a different Chat Service, set the corresponding environment variables under the - ``Chat service adapter settings`` section in ``st2chatops.env``: - `Slack `_, - `Flowdock `_, - `IRC `_ , - `Mattermost `_, - `RocketChat `_, - `XMPP `_. + The example configuration uses Slack. To see the full list of supported Chat Services and environmental + variables to configure see :ref:`chatops-configuration`. \ No newline at end of file From 2c8ee1f0198470e57b3c14ba175701bdf5c72619 Mon Sep 17 00:00:00 2001 From: NitinNahal Date: Thu, 10 Jul 2025 12:57:04 +0000 Subject: [PATCH 3/3] Fix: st2-run-pack-tests examples - With migration from nosetest to pytest, st2-run-pack-tests examples should be modified. Signed-off-by: NitinNahal --- docs/source/development/pack_testing.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/development/pack_testing.rst b/docs/source/development/pack_testing.rst index 0d681ba0..ee086c7b 100644 --- a/docs/source/development/pack_testing.rst +++ b/docs/source/development/pack_testing.rst @@ -227,13 +227,13 @@ If you only want to run a specific test file or a method in a test method, you c # class name with the "test_poll" method. # Run all the tests inside that test file / module - st2-run-pack-tests -p /data/packs/docker/ -f test_sensor_docker_sensor + st2-run-pack-tests -p /data/packs/docker/ -f test_sensor_docker_sensor.py # Run all tests in a specific test class - st2-run-pack-tests -p /data/packs/docker/ -f test_sensor_docker_sensor:DockerSensorTestCase + st2-run-pack-tests -p /data/packs/docker/ -f test_sensor_docker_sensor.py::DockerSensorTestCase # Run a single test method from a specific test file - st2-run-pack-tests -p /data/packs/docker/ -f test_sensor_docker_sensor:DockerSensorTestCase.test_poll + st2-run-pack-tests -p /data/packs/docker/ -f test_sensor_docker_sensor.py::DockerSensorTestCase::test_poll As more tests are developed it is always a good idea to determine how much code has been covered by the tests and how much remains un-tested. Calculated test coverage can be printed out using the