Skip to content

Use cloned http.DefaultTransport. issue-1857 - #1885

Merged
bwplotka merged 6 commits into
prometheus:mainfrom
karthikkondapally:issue-1857
Oct 15, 2025
Merged

bwplotka merged 6 commits into
prometheus:mainfrom
karthikkondapally:issue-1857

Conversation

@karthikkondapally

Copy link
Copy Markdown
Contributor

fixes #1857

  • Clone http.DefaultTransport to inherit future Go defaults
  • If cloning fails, construct and return a new http.Transport
    with standard fallback configuration

Signed-off-by: Karthik Kondapally <kondapally9@gmail.com>
Signed-off-by: Karthik Kondapally <kondapally9@gmail.com>
@karthikkondapally

Copy link
Copy Markdown
Contributor Author

cc @bwplotka

@karthikkondapally

karthikkondapally commented Oct 7, 2025 •

Copy link
Copy Markdown
Contributor Author

Tansport.clone has issues with Http2 and is mentioned in this golang/go#39302 and even 1.24 has issues golang/go#39302(comment) ,
I will just simply add additional missing variables to old Transport construction.

@karthikkondapally
karthikkondapally marked this pull request as draft October 7, 2025 15:33
@karthikkondapally
karthikkondapally marked this pull request as ready for review October 13, 2025 05:14

@bwplotka bwplotka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@bwplotka

Copy link
Copy Markdown
Member

LGTM, sorry for test failures, it's being fixed in #1892 (you can help us figure things out too 🙃 e.g. why it happened)

@karthikkondapally

karthikkondapally commented Oct 14, 2025 •

Copy link
Copy Markdown
Contributor Author

LGTM, sorry for test failures, it's being fixed in #1892 (you can help us figure things out too 🙃 e.g. why it happened)

yeah, I think metrics were generated on sep 1 but on oct 7, 8 this new metric "httpcookiemaxnum" got added for versions 1.24 and 1.25.

May be that is the issue? and this PR 1892 fixes it ?

@bwplotka

Copy link
Copy Markdown
Member

Yes, we just merged it. Do you mind rebasing?

@karthikkondapally

Copy link
Copy Markdown
Contributor Author

Yes, we just merged it. Do you mind rebasing?

Done

@bwplotka bwplotka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@bwplotka
bwplotka merged commit 187cb02 into prometheus:main Oct 15, 2025
8 checks passed
majewsky added a commit to sapcc/go-bits that referenced this pull request Apr 1, 2026
… defaults

This adds a test to decrease the chance of drifting from
net/http.DefaultTransport again. The test is not perfect because we
cannot deep-compare into the function-pointer fields of http.Transport,
but it is better than nothing.

Compare <prometheus/client_golang#1885>.
majewsky added a commit to sapcc/go-bits that referenced this pull request Apr 1, 2026
… defaults

This adds a test to decrease the chance of drifting from
net/http.DefaultTransport again. The test is not perfect because we
cannot deep-compare into the function-pointer fields of http.Transport,
but it is better than nothing.

Compare <prometheus/client_golang#1885>.
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.

Why not use the http.DefaultTransport of go sdk as the api.DefaultTransport value

2 participants