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

DYN-6350 add request timeout for notification service #14564

Conversation

Enzo707
Copy link
Contributor

@Enzo707 Enzo707 commented Nov 2, 2023

Purpose

This PR is for setting request timeOut for notification service

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated
  • This PR contains no files larger than 50 MB

Release Notes

Set a timeOut value of 100 in Dynamo Preference Settings and apply that configuration on notification service request.

Reviewers

@QilongTang

FYIs

@avidit

@Enzo707
Copy link
Contributor Author

Enzo707 commented Nov 2, 2023

@QilongTang I couldn't find where the packageManager request is, would you mind pointing it out to me? Thanks

@saintentropy
Copy link
Contributor

YAY!

@mjkkirschner
Copy link
Member

@QilongTang I couldn't find where the packageManager request is, would you mind pointing it out to me? Thanks

timeouts for package manager requests are already handled by the package manager client library:
https://github.com/search?q=repo%3ADynamoDS%2FPackageManagerClient%20timeout&type=code

@Enzo707
Copy link
Contributor Author

Enzo707 commented Nov 3, 2023

@QilongTang @mjkkirschner I realized that the default timeOut already is 100 seconds, so what would be a suitable value to set? Thanks

@QilongTang
Copy link
Contributor

@QilongTang @mjkkirschner I realized that the default timeOut already is 100 seconds, so what would be a suitable value to set? Thanks

Sorry what do you mean?

@Enzo707
Copy link
Contributor Author

Enzo707 commented Nov 3, 2023

@QilongTang @mjkkirschner I realized that the default timeOut already is 100 seconds, so what would be a suitable value to set? Thanks

Sorry what do you mean?

@QilongTang It seems like .net requests already has 100sec timeOut by default. That is the same value we want to set, right?

@QilongTang
Copy link
Contributor

@QilongTang @mjkkirschner I realized that the default timeOut already is 100 seconds, so what would be a suitable value to set? Thanks

Sorry what do you mean?

@QilongTang It seems like .net requests already has 100sec timeOut by default. That is the same value we want to set, right?

If you check the documentation, the unit for this property is millisecond, so default value is 100,000 (100s) which is different than what we are setting here. After checking the link @mjkkirschner sent, I would like to be consistent here so let's set it to 300 like the other Repo config. Thanks! Let me know if you have more questions.

@Enzo707
Copy link
Contributor Author

Enzo707 commented Nov 3, 2023

@QilongTang @mjkkirschner I realized that the default timeOut already is 100 seconds, so what would be a suitable value to set? Thanks

Sorry what do you mean?

@QilongTang It seems like .net requests already has 100sec timeOut by default. That is the same value we want to set, right?

If you check the documentation, the unit for this property is millisecond, so default value is 100,000 (100s) which is different than what we are setting here. After checking the link @mjkkirschner sent, I would like to be consistent here so let's set it to 300 like the other Repo config. Thanks! Let me know if you have more questions.

@QilongTang if we set a timeOut of 300 milliseconds the NotificationCenter component it's not rendering

@QilongTang
Copy link
Contributor

hi @Enzo707 Would you experiment it and see what would be a proper value for you at least? We can also do some googling together to see the best option here

@Enzo707
Copy link
Contributor Author

Enzo707 commented Nov 3, 2023

hi @Enzo707 Would you experiment it and see what would be a proper value for you at least? We can also do some googling together to see the best option here

Sure, let me see if I can find a way

@QilongTang QilongTang added this to the 3.0 milestone Nov 8, 2023
@@ -908,6 +913,7 @@ public PreferenceSettings()
ReadNotificationIds = new List<string>();
DynamoPlayerFolderGroups = new List<DynamoPlayerFolderGroup>();
backupLocation = string.Empty;
NotificationsDefaultTimeOut = 10000;
Copy link
Contributor

Choose a reason for hiding this comment

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

hi @Enzo707 Based on my previous comment, would you move this to https://github.com/DynamoDS/Dynamo/blob/master/src/DynamoCore/Configuration/Configurations.cs#L14? and not use a property on the current class?

Copy link
Contributor

@QilongTang QilongTang Nov 8, 2023

Choose a reason for hiding this comment

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

I dont think we need customers to set this value (as would be the result of current change) so a const value in internal config seems enough to me

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, no problem

Copy link
Contributor

Choose a reason for hiding this comment

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

Does it make sense to add NotificationsDefaultTimeOut in Notifications.dll.config so that advanced user will be able to customize the value?

Copy link
Contributor

Choose a reason for hiding this comment

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

hi @avidit It may make sense to implement this for all network-related features and expose it in preferences as a whole. I do not see a strong need for our customer to customize the threshold for notifications feature alone. Once the no-network mode has been fully tested and introduced, I think it would put us in a better situation to check network related settings.

/// <summary>
/// Request timeOut for notifications service
/// </summary>
public const int NotificationsDefaultTimeOut = 10000;
Copy link
Contributor

Choose a reason for hiding this comment

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

Ruby defaults to 60 seconds, and .NET defaults to 100s I think the current value is a good one for time saving purpose but not overly aggresive

@QilongTang QilongTang merged commit 9df196d into DynamoDS:master Nov 10, 2023
17 checks passed
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.

6 participants