oskoperator / oskoperator/osko
isPrometheusSource duplicates the backend type list
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 20
- Forks
- 3
- Avg merge
- 44m
- Merged PRs (30d)
- 7
Description
isPrometheusSource (internal/helpers/prometheus_helper.go:318) switches over prometheus, mimir, cortex, victoriametrics, thanos — the same five values internal/backend.Parse already owns.
The lists are identical today but independent, so a sixth backend gets silently supported in one place and not the other. ADR 0008 introduced internal/backend specifically to remove this kind of scattered string comparison.
The fields differ (SLI.metricSource.type vs Datasource.spec.type), so this wants a deliberate decision rather than a blind swap. The obvious shape is _, err := backend.Parse(s); return err == nil.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare isPrometheusSource at internal/helpers/prometheus_helper.go:318 with internal/backend.Parse, then read ADR 0008 for the intended ownership of backend types. Decide how the differing SLI.metricSource.type and Datasource.spec.type fields should be handled; done means the backend list has one source of truth without changing valid field semantics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, prometheus
- Domain
- backend, observability
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100