-
Notifications
You must be signed in to change notification settings - Fork 435
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
internal/civisibility/utils/net: a new http client for rapid endpoints #2869
Conversation
BenchmarksBenchmark execution time: 2024-09-19 11:56:47 Comparing candidate commit d2119cb in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 59 metrics, 0 unstable metrics. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I just don't know Go but I find the amount of omitempty
in JSON struct definitions a bit concerning.
Doesn't that mean we could unmarshal unexpectedly formatted JSON responses, and then crash later when we try to use them? Or does the compiler make sure we never try to access something that might be empty?
|
Oh, carry on then. :) Edit: although if it doesn't affect unmarshalling, why use |
Yes I removed a lot of omitempty here: 7c60549 |
…s used by ci visibility with json and message pack support, exponential backoff, ratelimiting status code, gzip compression and multipart bodies (attachments).
…dependency to the msgpack package
… with the following transactions: settings api request, early flake detection api request, search commits api request and send object pack files request.
…ve a package dependency.
f0c2d4c
to
c2ee372
Compare
What does this PR do?
This PR adds a new http client for specific use on rapid endpoints used by ci visibility with json support, exponential backoff, rate-limiting status code, gzip compression and multipart bodies (attachments).
Motivation
Some CI Visibility features require getting, posting and sending multipart form data to the backend. Features like:
Code Coverage
Reviewer's Checklist
Unsure? Have a question? Request a review!