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

Errorsource: mark protocol error as downstream #1103

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

iwysiu
Copy link
Contributor

@iwysiu iwysiu commented Oct 3, 2024

What this PR does / why we need it:
This error happens because the user sets a bad url, so it should be downstream. It's causing problems with the elasticsearch alerts.

Unfortunately because of the way it's declared, i don't have a better way to check for it than just checking for the string https://cs.opensource.google/go/go/+/master:src/net/http/transport.go;l=585?q=%22unsupported%20protocol%20scheme%22&ss=go%2Fgo

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

@iwysiu iwysiu requested a review from idastambuk October 3, 2024 21:45
@iwysiu iwysiu marked this pull request as ready for review October 3, 2024 22:12
@iwysiu iwysiu requested a review from a team as a code owner October 3, 2024 22:12
@iwysiu iwysiu requested review from wbrowne, oshirohugo and xnyo and removed request for a team October 3, 2024 22:12
Copy link
Member

@marefr marefr left a comment

Choose a reason for hiding this comment

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

I think you rather want to/should validate this here https://github.com/grafana/grafana/blob/f403bc57d542cd07b27da0a24c4d94d32f452f97/pkg/tsdb/elasticsearch/elasticsearch.go#L167 and/or default to prefix with http:// if it's missing.

In general, I wonder why not treat any error here as downstream instead?

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.

2 participants