saltstack / saltstack/salt

[BUG] thorium key.timeout() deletes keys one at a time instead of using match_dict

Open
#62,149 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Reactor
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description
https://github.com/saltstack/salt/blob/master/salt/thorium/key.py#L67 is passing each key in a loop as a match (evaluated as a glob) to delete_key(). This results in many unnecessary evaluations of the minion cache and key state. It should just construct the match_dict and deleted them all at once.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read salt/thorium/key.py at line 67 and trace key.timeout() into delete_key(). Check how the current loop passes matches and how match_dict is constructed. Done means timeout removes the affected keys through one match_dict operation rather than repeated per-key cache evaluations.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
infrastructure
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.