scylladb / argus

Apache License 2.0
4 stars 10 forks source link

Idea: use argus to notify about resources running #419

Open soyacz opened 2 months ago

soyacz commented 2 months ago

Currently we have problem that left instances created by 'QA' are not cleaned promptly (and not only for QA tag). This is due no real ownership or just user omission. In Argus we have information about resources and tests and assignee (and who started the test). Idea is to notify appropriately in Argus responsible persons (in order: Assignee->who started->specific unfortunate user who will be the last resort for cleanup).

Especially now with 'clean resources' button in resources tab.

fruch commented 1 month ago

I think it would be better to avoid listing QA/timer as much as we can.

if Argus would have api to get the assignee, SCT would be able to switch the resources on creation to be labeled on the assignee

A nice addition would be also ability to relabel resources, and then Argus can trigger a pipeline to assign the new assignee, when switching the investigation to someone else.

I would rather not add any background processes like that to Argus itself.

soyacz commented 1 month ago

idea: make cleanup scripts to update machines labels based on Argus information

soyacz commented 1 month ago

update also machines that are no eligible for cleanup - so, when someone reassigns running test to someone else, machines ownership will be transferred too.

k0machi commented 1 month ago

The recent client update allows getting state of the run by id, so it can be used to retrieve assignee - what we're missing is then some endpoint to resolve the assignee id to user information (aside from using /users endpoint, but that just gives you every user on the system that you would have to filter through)

soyacz commented 1 month ago

@k0machi to clarify: we can get for each test-id an assignee id and get a map assignee->name from /users endpoint (can be done once) I'm correct?

k0machi commented 1 month ago

@k0machi to clarify: we can get for each test-id an assignee id and get a map assignee->name from /users endpoint (can be done once) I'm correct?

Yes, that's what currently possible with the current master (I don't think I've pushed a specific version for it onto pypi, so you'll have to do that first)