Conversation
|
Thanks for this PR! Can you check these please: Issue 1 (OTT is computed then thrown away)The code never actually emits the OTT into the URL
url_params = dict(self._url_params) # local copy
token = self.session.api_token
if token:
try:
...
url_params['token'] = resp.json()['ott'] # OTT goes into the local copy
except Exception as e:
logger.warning("Failed to exchange JWT for OTT: %s", e)
from graphistry.validate.validate_collections import normalize_collections_url_params
url_params = normalize_collections_url_params(self._url_params, ...) # <-- whoops
viz_url = self._pygraphistry._viz_url(info, url_params)That last line passes The fix may be applying the OTT after normalize so nothing downstream can drop it, something like: url_params = normalize_collections_url_params(self._url_params, validate=validate_mode, warn=warn)
token = self.session.api_token
if token:
try:
...
url_params['token'] = resp.json()['ott']
except Exception as e:
logger.warning("Failed to exchange JWT for OTT: %s", e)Issue 2 (tests don't actually test the feature)
I would suggest this addition: url = g.plot(render="url", as_files=False, validate=False, warn=False, memoize=False)
assert "token=test-ott-token" in urlOther minor issues
|
aucahuasi
left a comment
There was a problem hiding this comment.
Please check:
#985 (comment)
Uh oh!
There was an error while loading. Please reload this page.