ChainSafe / ChainSafe/gossamer
Review usage of `context.Background()` and pass down contexts
- Dominant language
- Go
- Stars
- 454
- Forks
- 144
- PR merge metrics
- No merged PRs in 30d
Description
## Task summary
Newer code use contexts (`context.Context`) to cancel operations.
Unfortunately most of existing code does not and so we use `context.Background()` instead of passing down contexts from the caller,
We should review each usage of `context.Background()` and modify the calling code the pass down a context from its own caller.
EDIT: We should also check for `context.TODO()`
Contributor guide
Research direction
Search the repository for every use of context.Background() and context.TODO(), then trace each call to its caller and identify where a context can be passed down. Done means the usages have been reviewed and applicable calling code passes a caller-provided context instead of creating a background or placeholder context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100