microsoft / microsoft/dcp

Consider replacing our usage of NamespacedName for cache keys with UIDs

Open
#27 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
189
Forks
24
Avg merge
2d 16h
Merged PRs (30d)
18

Description

NamespacedNames can be re-used by deleting an recreating a resource, which can potentially lead to incorrect cached data being applied to a new resource if we don't cleanup our cache entries properly. UID is unique per resource and could be a safer option to reduce the likelihood of incorrect cache data being retrieved.

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

Start by locating the Go code that uses NamespacedName for cache keys in the API server, then inspect how cache entries are created and cleaned up. Compare those paths with the resource UID described in the issue. Done means the cache-key approach has been evaluated and updated consistently, with tests covering deletion and recreation of a resource.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.