Kong / Kong/kubernetes-testing-framework

Rethink locking in `clusters.Cleaner`

Open
#563 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
44
Forks
11
PR merge metrics
No merged PRs in 30d

Description

> I'm not sure in practice if this will end up mattering, but it seems a bit odd to make the actual cleanup a "ready only" lock, considering all the mutations it's making.

> Actually, it occurs to me now that what we should probably do is lock the object and block all future changes once we've run cleanup. E.g. any `Add` to the cleaner fails after `Cleanup` is called.

_Originally posted by @shaneutt in https://github.com/Kong/kubernetes-testing-framework/pull/552#discussion_r1102879789_

Contributor guide

Open the contributing guide

Research direction

Locate the clusters.Cleaner implementation and its Add and Cleanup entry points, then inspect any existing tests for their locking behavior. Done means cleanup is protected against concurrent mutation and any Add after Cleanup fails, with tests covering that lifecycle.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
testing-qa
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.