-
Notifications
You must be signed in to change notification settings - Fork 57
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
feat(providers): proxy request for a certain provider #487
Conversation
@@ -302,6 +309,7 @@ impl Display for ProviderKind { | |||
} | |||
} | |||
|
|||
#[allow(clippy::should_implement_trait)] |
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.
Cippy started to warn on this trait implementation, adding a temporary allow
to fix this later.
028b61a
to
d9f7377
Compare
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 you enable this in staging only?
d9f7377
to
f752f78
Compare
I've updated it and now this request is only allowed by a certain project ID to allow only our testing suite to run it or manually when knowing the project ID that's allowed by the |
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.
LGTM
d00e835
to
474696f
Compare
An integration test is added to test the exact provider request with allowed/not allowed projectId. |
Description
This PR adds an ability to request a certain provider in the proxy handler.
At the moment when we are querying the proxy for the certain
chain_id
the weighted provider is used and we can't test the request to the certain provider.Our integration tests uses the proxy requests and when we are requesting the certain
chain_id
the server requests a weighted provider and not the provider in tests itself. This makes tests flaky and unstable as we can't make sure what provider exactly was requested for test.This PR making the following changes:
providerId
request parameter for the proxy handler.RPC_PROXY_TESTING_PROJECT_ID
.ProviderId
should be the same as in the ProviderKind.How Has This Been Tested?
Manual:
RPC_PROXY_TESTING_PROJECT_ID=projectXXX cargo run
providerId
parameter:The expected result is the server log where the Zora exact provider was used and successful response:
CI/CD:
Integration tests are included in this PR.
Merging requirements 🚧
PROJECT_ID
with the Terraform Cloudtesting_project_id
to allow CI/CD tests suite run the exact provider requests on staging and prod.Due Diligence