-
Notifications
You must be signed in to change notification settings - Fork 408
fix: fix bug with customheadersoption #15053
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
fix: fix bug with customheadersoption #15053
Conversation
A few general comments, it looks like this is breaking at least one test in the That said, as we discussed I'm not sure adding a new function is the way to best fix this. Perhaps this is a good topic to raise in the weekly C++ meeting tomorrow but I would think the existing functions should behave correctly. |
94a750e
to
61f39df
Compare
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
I deleted the previous "quick fix" and added a new class CustomHeaders in GCS. example:
|
8982fd2
to
f55ff55
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #15053 +/- ##
=======================================
Coverage 92.86% 92.87%
=======================================
Files 2356 2356
Lines 210713 210741 +28
=======================================
+ Hits 195675 195718 +43
+ Misses 15038 15023 -15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Can we add some unit tests that verify the desired behavior?
Reviewable status: 0 of 8 files reviewed, 5 unresolved discussions (waiting on @cuiy0006, @ddelgrosso1, and @eliekozah)
google/cloud/storage/internal/rest/stub.cc
line 121 at r4 (raw file):
} Status AddCustomHeaders(Options const& options, RestRequestBuilder& builder) {
It doesn't appear that anything called in this function can fail, so let's change the return type to void
.
google/cloud/storage/internal/rest/stub.cc
line 129 at r4 (raw file):
} Status AddHeaders(Options const& options, RestRequestBuilder& builder) {
It appears AddAuthortizationHeader
can fail, so this function needs to continue to return Status
. Additionally, calls to this function need to propagate up any non-OK Status
that are returned.
@eliekozah can you convert this to a draft pr if you are still working on it. Will help avoid people reviewing it. |
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.
Reviewable status: 0 of 10 files reviewed, 5 unresolved discussions (waiting on @cuiy0006, @ddelgrosso1, and @scotthart)
google/cloud/storage/internal/rest/stub.cc
line 121 at r4 (raw file):
Previously, scotthart (Scott Hart) wrote…
It doesn't appear that anything called in this function can fail, so let's change the return type to
void
.
Done.
google/cloud/storage/internal/rest/stub.cc
line 129 at r4 (raw file):
Previously, scotthart (Scott Hart) wrote…
It appears
AddAuthortizationHeader
can fail, so this function needs to continue to returnStatus
. Additionally, calls to this function need to propagate up any non-OKStatus
that are returned.
Done.
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.
@scotthart Done
Reviewable status: 0 of 10 files reviewed, 5 unresolved discussions (waiting on @cuiy0006, @ddelgrosso1, and @scotthart)
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.
Reviewable status: 0 of 10 files reviewed, 13 unresolved discussions (waiting on @bajajneha27, @cuiy0006, @eliekozah, and @scotthart)
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.
Reviewed 1 of 3 files at r6.
Reviewable status: 1 of 10 files reviewed, 13 unresolved discussions (waiting on @bajajneha27, @cuiy0006, and @eliekozah)
* fix: fix bug with customheadersoption * fix: fix bug with customheadersoption * fix: fix bug with customheadersoption * fix: fix bug with customheadersoption * fix: fix bug with customheadersoption * fix: fix bug with customheadersoption * fix: fix bug with customheadersoption --------- Co-authored-by: Denis DelGrosso <85250797+ddelgrosso1@users.noreply.github.com>
This is a Draft PR for PR issue b/402481452
Please do not merge.
This change is