-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Only fetch bookmarks when the license allows to use them #8616
base: main
Are you sure you want to change the base?
Conversation
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.
Code change looks good, but CI fails. Can you please take a look?
/update-branch |
@yasserfaraazkhan The tests for this is just making sure the bookmarks are working as they should, changes in the license are properly handled, and that on unlicensed servers you don't get in the log errors on every channel switch about not having a license for bookmarks. |
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.
Wondering about the IsLicense thing.
if (!bookmarksEnabled) { | ||
const license = await getLicense(database); | ||
|
||
if (!bookmarksEnabled || license?.IsLicensed !== 'true') { |
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.
Why
IsLicensed !== `true`
means that we should not enabled bookmark? Perhaps an explanation via comment is necessary 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.
I moved around the variables to clarify the condition.
IsLicensed !== 'true'
means the server is not licensed. And you need a license to use channel bookmarks.
95 % passed just 11 failed |
@yasserfaraazkhan Doesn't look like any of those e2e test are related to this PR. Is it possible they are failing on master? |
ohh no @larkox sorry I didn't give context 😀 I'm manually testing failed ones and some more tests as you suggested. Will update about the PR. |
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.
Summary
On an unlicensed server, on development, we show errors because the bookmarks functionality is not available without a license.
To avoid these errors, we just check the license before fetching the bookmarks (and we do one less unneeded request).
Ticket Link
NONE
Release Note