Skip to content

Commit

Permalink
Fix a bug in client archive_project method and fix lint in grpc auth (#…
Browse files Browse the repository at this point in the history
…1396)

* fix a bug in client archieve_project method and fix lint in grpc auth

Signed-off-by: Rand Xie <rand.xie@robinhood.com>

* remove __init__

Signed-off-by: Rand Xie <rand.xie@robinhood.com>
  • Loading branch information
randxie authored Mar 18, 2021
1 parent b7594aa commit f9c99ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sdk/python/feast/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def archive_project(self, project):
)
else:
try:
self._core_service_stub.ArchiveProject(
self._core_service.ArchiveProject(
ArchiveProjectRequest(name=project),
timeout=self._config.getint(opt.GRPC_CONNECTION_TIMEOUT),
metadata=self._get_grpc_metadata(),
Expand Down
4 changes: 2 additions & 2 deletions sdk/python/feast/grpc/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ def _refresh_token(self, config: Config):
import requests

headers_token = {"content-type": "application/json"}
data_token = {
data_token_dict = {
"grant_type": config.get(opt.OAUTH_GRANT_TYPE),
"client_id": config.get(opt.OAUTH_CLIENT_ID),
"client_secret": config.get(opt.OAUTH_CLIENT_SECRET),
"audience": config.get(opt.OAUTH_AUDIENCE),
}
data_token = json.dumps(data_token)
data_token = json.dumps(data_token_dict)
response_token = requests.post(
config.get(opt.OAUTH_TOKEN_REQUEST_URL),
headers=headers_token,
Expand Down

0 comments on commit f9c99ca

Please sign in to comment.