-
Notifications
You must be signed in to change notification settings - Fork 358
Iris: Fix multiple iris settings calls in communication channels
#10764
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
Iris: Fix multiple iris settings calls in communication channels
#10764
Conversation
WalkthroughThis pull request enhances both the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant RedirectToIrisButtonComponent
participant IrisSettingsService
participant Server
User->>RedirectToIrisButtonComponent: Selects/changes conversation
RedirectToIrisButtonComponent->>IrisSettingsService: getCombinedCourseSettings/courseSettings
alt Cache is valid
IrisSettingsService-->>RedirectToIrisButtonComponent: Return cached settings
else Pending request exists
IrisSettingsService-->>RedirectToIrisButtonComponent: Share pending observable
else No cache or pending request
IrisSettingsService->>Server: HTTP GET settings
Server-->>IrisSettingsService: Responds with settings
IrisSettingsService-->>RedirectToIrisButtonComponent: Return settings, update cache
end
Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (4)
🧰 Additional context used📓 Path-based instructions (1)`src/main/webapp/**/*.ts`: angular_style:https://angular.io/guide/styleguide;methods_in_html:false;lazy_loading:true;code_reuse:true;tests:meaningful;types:PascalCase;enums:PascalC...
🧬 Code Graph Analysis (1)src/main/webapp/app/iris/manage/settings/shared/iris-settings.service.ts (1)
🔇 Additional comments (20)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
End-to-End (E2E) Test Results Summary
|
||||||||||||||||||||||||
End-to-End (E2E) Test Results Summary
|
||||||||||||||||||||||||||||||
HawKhiem
left a comment
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.
Anishyou
left a comment
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.
ahmetsenturk
left a comment
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 lgmt
chuuuun
left a comment
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.




Checklist
General
Client
Motivation and Context
As mentioned in PR#10748 the redirect-to-iris-component fetches the same iris-settings multiple times. This should not happen as it fetches the exact same data from the same REST endpoint. Only one call should be made.
Description
This PR adds two changes.
The first change reduces the calls in the
iris-settings.service.tsby caching all the calls. This is done by first caching pending requests and the caching the fetched settings. The cache save them for 5 minutes to prevent updated settings to not take affect.The second change is in the
redirect-to-iris-button.component.tsby fetching the iris-settings only if the conversation id changes. This fixes multiple requests if metadata changes for the conversations which triggers a new request.With this changes the component now only fetches the settings once.
Disclaimer: If you first test the exercise and then the lecture channels a second request is triggered, because those are different settings that need to be fetched separately.
Steps for Testing
Prerequisites:
Testserver States
You can manage test servers using Helios. Check environment statuses in the environment list. To deploy to a test server, go to the CI/CD page, find your PR or branch, and trigger the deployment.
Review Progress
Code Review
Manual Tests
Test Coverage
Client
Summary by CodeRabbit