Skip to content

Conversation

@yixinshark
Copy link
Contributor

@yixinshark yixinshark commented Jun 24, 2025

need luanch dde-lock,becase dde-lock need listen sessionActived.

Log: as title
Pms: BUG-321333

Summary by Sourcery

Bug Fixes:

  • Start dde-lock.service when unlocking in quick login mode to ensure sessionActive events are handled correctly.

need luanch dde-lock,becase dde-lock need listen sessionActived.

Log: as title
Pms: BUG-321333
@sourcery-ai
Copy link

sourcery-ai bot commented Jun 24, 2025

Reviewer's Guide

This PR ensures that dde-lock.service is triggered when unlocking sessions in quick login mode by adjusting the systemd unit dependencies in the dde-quick-login@x11.service configuration.

File-Level Changes

Change Details Files
Add dependency on dde-lock.service for quick-login unit
  • Include dde-lock.service in the WantedBy/dde-session-pre.target.wants
  • Adjust After/Wants directives to pull in dde-lock.service before unlocking
systemd/dde-session-pre.target.wants/dde-quick-login@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

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 @yixinshark - I've reviewed your changes and they look great!


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.

@deepin-ci-robot
Copy link

deepin pr auto review

代码审查意见:

  1. 新增配置项的注释

    • 在新增的配置项 SuccessExitStatus=0OnSuccess=dde-lock.service 后面添加注释,解释这些配置项的作用,以便其他开发者理解。
  2. ExecCondition 的逻辑

    • ExecCondition 的逻辑判断中使用了两次 exit 命令,可能会导致服务启动失败。建议检查逻辑是否正确,并确保服务在所有情况下都能正确启动。
  3. 服务依赖关系

    • Wants=org.dde.session.Daemon1.serviceAfter=org.dde.session.Daemon1.service 配置项表明 dde-quick-login@x11.service 依赖于 org.dde.session.Daemon1.service。确保 org.dde.session.Daemon1.servicedde-quick-login@x11.service 启动之前已经启动。
  4. 服务启动条件

    • ExecCondition 中的条件判断使用了环境变量 DDE_QUICKLOGINXDG_SESSION_TYPE,确保这些环境变量在服务启动时已经被正确设置。
  5. 错误处理

    • Restart=on-failure 配置项表明服务在失败时将自动重启,但未指定重启次数和间隔时间。建议明确指定 RestartSecStartLimitBurst 的值,以便更好地控制服务的重启行为。
  6. 代码格式和风格

    • 检查整个文件中是否有统一的代码格式和风格,确保代码的可读性和一致性。
  7. 安全性

    • 确保服务启动时不会执行任何不安全的操作,例如不验证用户输入或执行不受信任的命令。
  8. 日志记录

    • 考虑在服务启动和执行过程中添加日志记录,以便在出现问题时能够快速定位和解决问题。

综上所述,建议在合并代码前进行上述检查,并确保代码的质量、性能和安全性。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

@yixinshark yixinshark merged commit 2bbdc40 into linuxdeepin:master Jun 24, 2025
16 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.

3 participants