canonical / canonical/fetch-service
Have inspectors explicitly declare dependencies on other inspectors
- Dominant language
- Go
- Stars
- 4
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
### What needs to get done
- Modify inspectors implementation and likely the `Inspector` interface to enable inspectors listing other inspectors they depend on.
- Rework `inspectors.New()` to dynamically order the inspectors based on their dependencies.
- Cleanup the error handling in inspectors dealing with potentially missing metadata from previous inspectors
### Why it needs to get done
Inspectors are run in the order they are declared in `insList` in `inspectors.New()`. Reordering this slice, or adding new inspector at the wrong position could have unintended and hard to diagnose behavior.
Moreover existing dependency between inspectors is implicit and could change on a minor code change.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the inspectors implementation, the Inspector interface, and inspectors.New(), including its insList ordering. Define how inspectors declare dependencies, make New() order them dynamically, and clean up missing-metadata error handling; done means dependency order no longer relies on slice position and existing inspector behavior remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100