StackStorm/st2

keyvalue deleted by ttl but not triggered

Open

#5802 aperta il 10 nov 2022

Vedi su GitHub
 (7 commenti) (0 reazioni) (0 assegnatari)Python (740 fork)batch import
bughelp wanted

Metriche repository

Star
 (5794 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

Guida contributor