Issue Summary: Refactoring HTTP Transport Configuration in Thanos
Issue Title: Refactoring: move all http.Transport configuration parameter parsing into one place Created by: GiedriusS on 2021-09-01 Last updated by: NishantBansal2003 on 2024-07-22
Description:
The issue addresses the need to consolidate various HTTP transport configuration functions across multiple components in the Thanos repository. Specifically, there are several DefaultTransport
functions defined in the following files:
thanos/pkg/objstore/azure/helpers.go
thanos/pkg/objstore/cos/cos.go
thanos/pkg/objstore/s3/s3.go
These functions serve the same purpose but are scattered throughout the codebase. The goal is to refactor this duplication by centralizing the configuration into a single struct that adheres to a consistent interface. The proposed location for this struct is within the exthttp
package.
Discussion Points:
- The conversation includes contributions from various developers discussing how to implement the consolidation effectively.
- Contributions suggested the creation of a new
DefaultTransport
function inexthttp
, which would simplify and standardize the configuration process across different storage backends. - The acceptance criteria (AC) for the refactoring included:
- Implementation of a single
HTTPConfig
struct that can be unmarshaled from YAML consistently. - A unified helper for creating a transport from this
HTTPConfig
. - Ensuring compatibility with existing dependencies, specifically Cortex.
Current Status: As of July 2024, a pull request associated with this issue has been merged, completing the refactoring work. The issue can be closed now. Several contributors have been active in discussion and proposals, demonstrating collaborative effort towards improving code quality and maintainability in the Thanos codebase.
Labels:
- Component: store
- Feature request/improvement
- Good first issue
- State: someone-working-on-it