-
Notifications
You must be signed in to change notification settings - Fork 2
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
fix: ux behavior on save for anonymous users #453
Conversation
curious if this is upto date as per
|
needs an update, if I remember right |
b5a0a7d
to
231e9ef
Compare
daras_ai_v2/base.py
Outdated
return | ||
|
||
try: | ||
request_state = base64.urlsafe_b64decode(request_state).decode() |
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.
Not a good idea. Better to save the state in db but not actually call the celery task.
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.
but for anon users, we won't have their real uid
until they login.
are you suggesting that we create a run without a uid
, and when the user comes back with SUBMIT_AFTER_LOGIN_Q
, we then update the uid
and run?
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.
we generate a firebase user as soon as you submit, this should do the same thing
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.
for anon users who come back with an existing account, we would have 2 different uids.
i fixed this case by setting the uid of the unqueued run when user comes back. i added a concurrency check there too so that we don't queue the same run twice.
this would require more work than I had thought. right now it doesn't trigger a form submit - all javascript. |
fixed the rest, other than the Copy Link fix. i'll need to release gooey-gui and update version for that. |
You can execute js on a python button I believe
|
done |
… the server first" This reverts commit fdee7fc.
…ack to Python caller
…ndering copy link vs share button
I get this error when I try to press the options button as a fresh anonymous user
|
).update(run_status=STARTING_STATE, uid=self.request.user.uid) | ||
if updated_count >= 1: | ||
# updated now | ||
self.dump_state_to_sr(self._get_validated_state(), self.current_sr) |
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.
not sure why this is needed here?
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.
ah, good catch. i think it is leftover from the earlier hack where the state was carried over without creating a saved run. thanks!
I can still repro this in prod:
|
fixed in #482 with cause was that we updated |
this also broke rate limits fixed in 7fe01cb |
should redirect to login page with next=...
Q/A checklist
You can visualize this using tuna:
To measure import time for a specific library:
To reduce import times, import libraries that take a long time inside the functions that use them instead of at the top of the file:
Legal Boilerplate
Look, I get it. The entity doing business as “Gooey.AI” and/or “Dara.network” was incorporated in the State of Delaware in 2020 as Dara Network Inc. and is gonna need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Dara Network Inc can use, modify, copy, and redistribute my contributions, under its choice of terms.