Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruler: Do not clear remote-write HTTP client config #4437

Merged

Conversation

dannykopping
Copy link
Contributor

What this PR does / why we need it:
HTTP client configurations are not currently overrideable per tenant. This was accidentally set to an empty struct in #4429.

Which issue(s) this PR fixes:
N/A

Special notes for your reviewer:

Checklist

  • Documentation added
  • Tests updated

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
@dannykopping dannykopping requested a review from a team as a code owner October 8, 2021 08:18
Copy link
Collaborator

@kavirajk kavirajk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. two small nits

walDir, err := createTempWALDir()
require.NoError(t, err)
reg := setupRegistry(t, walDir)
defer os.RemoveAll(walDir)
Copy link
Collaborator

@kavirajk kavirajk Oct 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
defer os.RemoveAll(walDir)
defer func() {
require.NoError(t, os.RemoveAll(walDir))
}()


tenantCfg, err := reg.getTenantConfig(enabledRWTenant)
require.NoError(t, err)

Copy link
Collaborator

@kavirajk kavirajk Oct 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: require.Len(t, tenantCfg.RemoteWrite, 1).
Just to avoid panic with tenantCfg.RemoteWrite[0] and make sure we just have one element.

@dannykopping
Copy link
Contributor Author

Going to defer applying the suggestions for a subsequent PR. The feedback is valuable 👍 thanks

@dannykopping dannykopping merged commit d265e1d into grafana:main Oct 8, 2021
@dannykopping dannykopping deleted the dannykopping/retain-base-http-config branch October 8, 2021 08:27
dannykopping pushed a commit that referenced this pull request Oct 8, 2021
Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants