StackStorm/st2

keyvalue deleted by ttl but not triggered

Open

#5 802 ouverte le 10 nov. 2022

Voir sur GitHub
 (7 commentaires) (0 réactions) (0 assignés)Python (740 forks)batch import
bughelp wanted

Métriques du dépôt

Stars
 (5 794 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

SUMMARY

When a keyvalue is deleted by the ttl, no core.st2.key_value_pair.delete is generated

STACKSTORM VERSION

st2 version: st2 3.7.0, on Python 3.6.8

OS, environment, install method

Post what OS you are running this on, along with any other relevant information/ OS: CentOS Linux 3.10.0-1160.76.1.el7.x86_64 Installation: one-line install

Steps to reproduce the problem

(cluster)-[root@auto ~]$ st2 key set test_ttl toto -l 30
+------------------+-----------------------------+
| Property         | Value                       |
+------------------+-----------------------------+
| name             | test_ttl                    |
| value            | toto                        |
| scope            | st2kv.system                |
| expire_timestamp | 2022-11-10T12:34:34.529983Z |
+------------------+-----------------------------+
(cluster)-[root@auto ~]$ st2 key list
+---------------------------+--------------------------------+--------+-----------+--------------+------+-------------------------------+
| name                      | value                          | secret | encrypted | scope        | user | expire_timestamp              |
+---------------------------+--------------------------------+--------+-----------+--------------+------+-------------------------------+
| test_ttl                  | toto                           | False  | False     | st2kv.system |      | Thu, 10 Nov 2022 13:34:34 CET |
+---------------------------+--------------------------------+--------+-----------+--------------+------+-------------------------------+
(cluster)-[root@auto ~]$ st2 key get test_ttl
Key Value Pair "test_ttl" is not found.

ERROR: Resource test_ttl not found.
 (cluster)-[root@auto ~]$st2 trigger-instance list
+--------------------------+--------------------------------+-------------------------------+-----------+
| id                       | trigger                        | occurrence_time               | status    |
+--------------------------+--------------------------------+-------------------------------+-----------+
| 636cefbc87c48a6504896824 | core.st2.key_value_pair.create | Thu, 10 Nov 2022 13:34:04 CET | processed |
+--------------------------+--------------------------------+-------------------------------+-----------+

Expected Results

Once the ttl expire the keyvalue is deleted by the system, it should create a trigger core.st2.key_value_pair.delete.

Actual Results

There is no trigger core.st2.key_value_pair.delete genereted but if you delete a key by hand, a trigger is generated

Guide contributeur