Skip to content

Commit

Permalink
Backport proxyURL fix
Browse files Browse the repository at this point in the history
patch instructions
  • Loading branch information
OlivierCazade authored and jotak committed Aug 8, 2024
1 parent 0c7b585 commit 5f52330
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
# NetObserv patch content

This package is patched to allow JSON (de)serialization.

Assuming you have "upstream" set as the prometheus upstream remote, and "netobserv" set as the netobserv patched remote, e.g:

```bash
$ git remote -v
netobserv git@github.com:netobserv/prometheus-common.git (fetch)
netobserv git@github.com:netobserv/prometheus-common.git (push)
upstream https://github.com/prometheus/common.git (fetch)
upstream https://github.com/prometheus/common.git (push)
```

Steps to rebase:

```bash
tag=v0.55.0 # the tag to rebase on
git fetch upstream ; git fetch netobserv
git reset --hard $tag
git cherry-pick netobserv/main
git tag -a "$tag-netobserv" -m "$tag-netobserv"
git push netobserv HEAD:main
git push netobserv --tags
```


# Common
![circleci](https://circleci.com/gh/prometheus/common/tree/main.svg?style=shield)

Expand Down
4 changes: 4 additions & 0 deletions config/http_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,10 @@ func (c *HTTPClientConfig) Validate() error {
return fmt.Errorf("at most one of oauth2 client_secret, client_secret_file & client_secret_ref must be configured")
}
}
// Change empty URL to nil to avoid connection errors
if c.ProxyURL.URL != nil && *c.ProxyURL.URL == (url.URL{}) {
c.ProxyURL.URL = nil
}
if err := c.ProxyConfig.Validate(); err != nil {
return err
}
Expand Down

0 comments on commit 5f52330

Please sign in to comment.