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

Include tenant in forwarded requests #3283

Merged
merged 4 commits into from
Oct 24, 2022
Merged

Include tenant in forwarded requests #3283

merged 4 commits into from
Oct 24, 2022

Conversation

pstibrany
Copy link
Member

What this PR does

This PR modifies Distributor's forwarding feature to always include X-Scope-OrgId header with tenant when forwarding requests to the configured endpoint.

Checklist

  • Tests updated
  • [na] Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: Peter Štibraný <pstibrany@gmail.com>
Signed-off-by: Peter Štibraný <pstibrany@gmail.com>
@pstibrany pstibrany requested a review from a team as a code owner October 21, 2022 15:11
Signed-off-by: Peter Štibraný <pstibrany@gmail.com>
@pstibrany pstibrany requested a review from replay October 21, 2022 15:12
Copy link
Contributor

@colega colega left a comment

Choose a reason for hiding this comment

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

Makes sense.

@@ -432,6 +434,7 @@ func (f *forwarder) submitForwardingRequest(ctx context.Context, endpoint string
req.requestWg = requestWg

// Target endpoint and TimeSeries to forward.
req.user = user
Copy link
Contributor

Choose a reason for hiding this comment

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

the comment above this line is now strange because it only talks about endpoint/timeseries

Copy link
Member Author

Choose a reason for hiding this comment

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

I've changed the comment to "Request parameters". WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

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

that's better, thx 👍

Copy link
Contributor

@replay replay left a comment

Choose a reason for hiding this comment

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

LGTM, thanks. I just added one comment

Signed-off-by: Peter Štibraný <pstibrany@gmail.com>
@pstibrany pstibrany enabled auto-merge (squash) October 24, 2022 13:49
@pstibrany pstibrany merged commit b525b84 into main Oct 24, 2022
@pstibrany pstibrany deleted the forward-tenant-header branch October 24, 2022 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants