-
Notifications
You must be signed in to change notification settings - Fork 451
refactor(extensions/podman): handle notifications in specific class #13301
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
Conversation
Signed-off-by: Simon Rey <sfbrey+eqqe@gmail.com>
📝 WalkthroughWalkthroughThis change refactors the notification handling logic within the Podman extension by centralizing the disposal and state-resetting of setup notifications into a new Estimated code review effort2 (~20 minutes) Possibly related PRs
Suggested labels
Suggested reviewers
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
extensions/podman/packages/extension/src/extension.spec.tsOops! Something went wrong! :( ESLint: 9.31.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'svelte-eslint-parser' imported from /eslint.config.mjs 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧠 Learnings (1)extensions/podman/packages/extension/src/extension.spec.ts (1)Learnt from: benoitf 🧬 Code Graph Analysis (1)extensions/podman/packages/extension/src/extension.spec.ts (1)
🧰 Additional context used🧠 Learnings (1)extensions/podman/packages/extension/src/extension.spec.ts (1)Learnt from: benoitf 🧬 Code Graph Analysis (1)extensions/podman/packages/extension/src/extension.spec.ts (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
🔇 Additional comments (1)
✨ 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:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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
CodeRabbit Configuration File (
|
Signed-off-by: Simon Rey <sfbrey+eqqe@gmail.com>
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.
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
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.
IMO this part of the code is easily broken since we've had issues in the past with notifications not disposing correctly.
The code LGTM, but I'd feel more comfortable if tests were added since the logic of shouldNotifySetup
has been moved around.
@cdrage thanks for your review! I already added some tests in previous sub issues associated PRs: #13144 -> https://github.com/podman-desktop/podman-desktop/pull/13140/files Let me know if you think it still misses coverage on a set of lines? Edit: looking at https://app.codecov.io/gh/podman-desktop/podman-desktop/blob/main/extensions%2Fpodman%2Fpackages%2Fextension%2Fsrc%2Fextension.ts, it seems that lines
|
…uninstalled on Linux Signed-off-by: Simon Rey <sfbrey+eqqe@gmail.com>
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.
Thanks!
Tested on macOS m1 and functionality still worked.
LGTM.
What does this PR do?
This PR moves code specific to notification management in podman extension to the newly created class. This is too help keeping the extension file code short.
Screenshot / video of UI
What issues does this PR fix or reference?
Partial fixes of #13250
How to test this PR?