Fixes missing HTTP header X-Goog-User-Project#2348
Merged
adamvduke merged 1 commit intoMar 9, 2023
Merged
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Flank does not pass the the HTTP header flag X-Goog-user-Project with project Id when using end user credentials. This results in HTTP error 403 (PERMISSION_DENIED). This fix sets the flag so the tests can be run by the user. Fixes Flank#2347
cc37670 to
df2e41a
Compare
Contributor
|
@flank-it |
Contributor
|
Integration tests succeed for all OSs ✅ |
adamvduke
approved these changes
Mar 9, 2023
Contributor
|
Thanks @vinaypotluri! |
adamvduke
added a commit
that referenced
this pull request
Mar 10, 2023
This reverts commit 327033f.
adamvduke
added a commit
that referenced
this pull request
Mar 10, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Flank does not pass the the HTTP header flag X-Goog-user-Project with project Id when using end user credentials. This results in HTTP error 403 (PERMISSION_DENIED). This fix sets the flag so the tests can be run by the user.
Fixes #2347
Test Plan
Before:
After:
This fix will pass HTTP header
{"X-Goog-user-Project" : project Id}with requests for testingSteps to build & test locally
Checkout the branch
Build the project
This generates a jar inside
~/.m2/repository/com/github/flankConfigure your android project's fladle extension to use the generated local SNAPSHOT
Summary of the Changes
2 client libraries are being used namely ToolResults.java (toolresults.googleapis.com) & Testing.java (testing.googleapis.com) to interact with Firebase / Google Client.
All the classes that use these client libraries need to pass in the required header while making a request, otherwise this will result in http error 403. Changes in this PR will make sure to set the header when the client libraries are called.
ex:
{"x-goog-user-project", "my-project-id"}Workflow:
ToolResults.java
Testing.java