Skip to content

Conversation

@wineee
Copy link
Member

@wineee wineee commented May 13, 2025

log: when kwin failure, we should try to restart kwin, shouldn't showdown dde session

Summary by Sourcery

Prevent dde session shutdown on KWin failure by removing the shutdown target and enabling automatic restart

Bug Fixes:

  • Do not trigger dde-session-shutdown.target when KWin fails

Enhancements:

  • Use systemd Restart directive to restart KWin on failure

log: when kwin failure, we should try to restart kwin, shouldn't
showdown dde session
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @wineee - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@sourcery-ai
Copy link

sourcery-ai bot commented May 13, 2025

Reviewer's Guide

The PR updates the dde-session@x11 systemd unit to decouple kwin failures from triggering a full session shutdown, by removing its shutdown target dependency and adding an automatic restart policy for kwin.

File-Level Changes

Change Details Files
Removed shutdown target dependency from the session unit
  • Deleted PartOf=dde-session-shutdown.target
  • Removed Before=dde-session-shutdown.target
  • Cleared WantedBy=dde-session-shutdown.target
systemd/dde-session-pre.target.wants/dde-session@x11.service
Enabled automatic restart on kwin failure
  • Added Restart=on-failure
  • Set RestartSec=5s for retry delay
systemd/dde-session-pre.target.wants/dde-session@x11.service

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@deepin-ci-robot
Copy link

deepin pr auto review

代码审查意见:

  1. Changelog 格式

    • 在新的 changelog 条目中,建议添加更多的详细信息,比如修复了什么具体问题,以及这个修复如何影响用户。例如:
      * fix: 当 KWin 失败时,不再尝试启动 dde-session-shutdown 服务
      
  2. Service 文件修改

    • 移除了 OnFailure=dde-session-shutdown.targetOnFailureJobMode=replace 这两行,这可能会影响系统的故障处理机制。需要确认这一改动是否符合预期,并且是否有替代的故障处理机制。
  3. 注释

    • 在移除的注释中,建议保留对 OnFailureOnFailureJobMode 的解释,以便其他开发者理解这一改动的原因。
  4. 代码维护

    • 如果这个改动是为了修复一个特定的 bug,建议在代码中添加相应的注释,说明为什么需要这样做,以及这个改动如何解决该 bug。
  5. 测试

    • 在进行这样的改动之前,建议进行充分的测试,确保新的故障处理机制能够正确工作,并且不会引入新的问题。
  6. 文档更新

    • 如果这个改动会影响用户的使用,建议更新相关的文档,让用户了解新的故障处理机制。

综合以上意见,建议在提交代码前进行充分的测试和文档更新,并确保代码的改动符合预期的功能需求。

@github-actions
Copy link

TAG Bot

TAG: 1.99.16
EXISTED: no
DISTRIBUTION: unstable

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: fly602, wineee

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@fly602 fly602 merged commit 59b68b3 into linuxdeepin:master May 15, 2025
15 of 18 checks passed
@wineee wineee deleted the kwin branch May 15, 2025 04:30
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.

3 participants