Project

Profile

Help

Story #4553

closed

Story #7427: [Epic] As a user, I can audit actions taken by Pulp users

As a user, I can query for task parameter information

Added by daviddavis about 5 years ago. Updated over 3 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

Problem

Plugin writers and users want to query tasks by data used as their RQ task parameters. For example, tasks that use base_version as an argument would be useful to query on later.

Solution

Have RQ tasks store the keyword, value pairs in a separate Table that foreign key relate to the Task model. Serialize these for the Task complete serialization.

The attribute can be called kwargs that shows a list of <key, value> tuples.

Security

We should have a decorators available for plugin writers to ensure this feature doesn't leak information it shouldn't. Specifically make a decorator called no_kwargs_recording that will disable the kwargs recording for a task.

Additionally it should take a list of kwarg names that will specifically be not recorded. For example:

no_kwargs_recording('password')
def myfunc(username, password):
    pass

This example would record the 'username' key and its value, but never the 'password' key.

Also available in: Atom PDF