Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Tray AYON: Connection timeout and update validations #6194

Closed
wants to merge 15 commits into from

Conversation

iLLiCiTiT
Copy link
Member

Changelog Description

Tray tool can validate if is required update of AYON bundle and asks to relogin if user credentials are not valid.

Additional info

The validation happens once per 5 minutes. The credentials check happens withing it. It is still not possible to re-login when inside host and the validation happens only once a 5 minutes, but better than nothing. The update dialog is shown only in production or staging mode.

Possible enhancements in this PR

Maybe we should show information dialog "Your credentials are not valid anymore. Please close all applications and login again." before the login dialog is showed.

Testing notes:

Updates detection

  1. Start tray in production
  2. Change production bundle on server
  3. Wait 5 minutes
  4. An dialog with restart request should show up

Relogin

  1. Start tray
  2. Shotdown your server
  3. After 5 minutes a login dialog should be shown

@ynbot ynbot added size/L Denotes a PR changes 1000-1499 lines, ignoring general files type: enhancement Enhancements to existing functionality labels Feb 2, 2024
@BigRoy
Copy link
Collaborator

BigRoy commented Feb 2, 2024

Maybe we should show information dialog "Your credentials are not valid anymore. Please close all applications and login again." before the login dialog is showed.

Out of curiosity - when does this occur? Say someone leaves a scene open over the weekend, do they run into this?


Also, if say the artist 'ignores' that there's a new version available (like, can they cancel a restart?) does that mean that after another five minutes it directly starts showing the pop-up again? Or should it be a dialog that does something like "Remind me in [ ] (enter here) minutes." where the default is five so they are aware they will be notified.

Or is it that when 'ignored' once that you won't get notification about that version again?

@m-u-r-p-h-y
Copy link
Member

Out of curiosity - when does this occur? Say someone leaves a scene open over the weekend, do they run into this?

not only over weekend but even leaving running DCC (Nuke for example) overnight and in the morning you want to continue working and you are suddenly stuck with a nonworking system unable to even save your scene.

@BigRoy
Copy link
Collaborator

BigRoy commented Feb 2, 2024

Out of curiosity - when does this occur? Say someone leaves a scene open over the weekend, do they run into this?

not only over weekend but even leaving running DCC (Nuke for example) overnight and in the morning you want to continue working and you are suddenly stuck with a nonworking system unable to even save your scene.

Ah yes, that does sound critical - the way I understand this PR still doesn't solve that. It just tells you that your stuff is now broken?

@iLLiCiTiT
Copy link
Member Author

where the default is five so they are aware they will be notified.

Reused same dialog from OpenPype, will show after 5 minutes again. Won't change in this PR.

not only over weekend but even leaving running DCC (Nuke for example) overnight and in the morning you want to continue working and you are suddenly stuck with a nonworking system unable to even save your scene.

Just to be sure, this won't be fixed by this PR.

@m-u-r-p-h-y m-u-r-p-h-y added the sponsored Client endorsed or requested label Feb 2, 2024
@BigRoy
Copy link
Collaborator

BigRoy commented Feb 2, 2024

Reused same dialog from OpenPype, will show after 5 minutes again. Won't change in this PR.

I see - we have our OpenPype timer set much higher. I think four or six hours. Is this possible here too?

@iLLiCiTiT
Copy link
Member Author

iLLiCiTiT commented Feb 2, 2024

I see - we have our OpenPype timer set much higher. I think four or six hours. Is this possible here too?

No, but I can add setting for that. In that case I should create another timer to check the valid credentials more often. Maybe in future PRs. We need this PR as soon as possible.

@LiborBatek
Copy link
Member

@BigRoy I can also think about occasions when user/artist just keep running Tray app for days without restarting it anytime...u need sort of check if new bundle aka addons exists on the Server. This is one of the possible ways to do it and should work fine.

Most of the times it would only happen when starting the work in the morning (after Ayons update of server packages) when TDs being sensible about updating of the Ayon pipeline :)

However I do agree that 5 mins interval being quite often would be interesting to test it when hundreds of users connected :)

Copy link
Member

@LiborBatek LiborBatek left a comment

Choose a reason for hiding this comment

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

Works as expected...

Test 01 (Bundle change on the server):

Screenshot 2024-02-08 104156

Test 02 (Server down):

Screenshot 2024-02-08 110007

@BigRoy
Copy link
Collaborator

BigRoy commented Feb 8, 2024

Works as expected...

Test 01 (Bundle change on the server):
Screenshot 2024-02-08 104156

Test 02 (Server down):
Screenshot 2024-02-08 110007

Is it odd that the second screenshot's dialog doesn't allow you to confirm? :)

However I do agree that 5 mins interval being quite often would be interesting to test it when hundreds of users connected

That too. But to me it's mostly that a user might just be finishing something now - and they don't want to restart all their applications NOW but maybe later today. But now they'd be prompted every five minutes if they click away the dialog to continue. It just feels a bit too frequent, no show-stopper. But definitely frequent.

@BigRoy
Copy link
Collaborator

BigRoy commented Feb 12, 2024

Can we close this PR now in favor of ynput/ayon-core#28 or are there still reasons to merge these into OpenPype as well?

@mkolar
Copy link
Member

mkolar commented Feb 15, 2024

Can we close this PR now in favor of ynput/ayon-core#28 or are there still reasons to merge these into OpenPype as well?

@iLLiCiTiT that's very good question.

@iLLiCiTiT
Copy link
Member Author

Yes we can. Closing.

@iLLiCiTiT iLLiCiTiT closed this Feb 15, 2024
@ynbot ynbot added this to the next-patch milestone Feb 15, 2024
@jakubjezek001 jakubjezek001 removed this from the next-patch milestone Feb 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
port to AYON size/L Denotes a PR changes 1000-1499 lines, ignoring general files sponsored Client endorsed or requested target: AYON type: enhancement Enhancements to existing functionality
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants