Skip to content
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

Pass through extra headers on every request. #2510

Merged
merged 2 commits into from Jul 27, 2021
Merged

Conversation

lsb
Copy link
Contributor

@lsb lsb commented Jul 23, 2021

No description provided.

@lsb
Copy link
Contributor Author

lsb commented Jul 23, 2021

Some manual testing:

>>> Client(host="scribd.external.verta.ai", email="leeb@scribd.com", dev_key="12341234-1234-1234-1234-123412341234")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/leeb/modeldb/client/verta/verta/client.py", line 199, in __init__
    _utils.raise_for_http_error(response)
  File "/Users/leeb/modeldb/client/verta/verta/_internal_utils/_utils.py", line 681, in raise_for_http_error
    six.raise_from(requests.HTTPError(message, response=response), None)
  File "<string>", line 3, in raise_from
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://scribd.external.verta.ai/api/v1/modeldb/project/verifyConnection at 2021-07-23 20:03:21.724000 UTC
>>> Client(host="scribd.external.verta.ai", email="leeb@scribd.com", dev_key="12341234-1234-1234-1234-123412341234", extra_auth_headers={"12341234123412341234": "12341234-1234-1234-1234-123412341234"})
connection successfully established
<verta.client.Client object at 0x10b373670>

@convoliution convoliution self-requested a review July 23, 2021 23:45
@convoliution convoliution self-assigned this Jul 23, 2021
client/verta/verta/client.py Outdated Show resolved Hide resolved
Co-authored-by: Michael Liu <miliu@protonmail.com>
Copy link
Contributor

@convoliution convoliution left a comment

Choose a reason for hiding this comment

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

Nice, thanks again @lsb

I'll have this merged come Monday and start running it through our tests.

@convoliution convoliution merged commit 3a90c13 into VertaAI:master Jul 27, 2021
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.

None yet

2 participants