Skip to content

chore: remove unused network connection sync interfaces#1147

Merged
xionglinlin merged 1 commit into
linuxdeepin:masterfrom
xionglinlin:fix/364749
Jun 16, 2026
Merged

chore: remove unused network connection sync interfaces#1147
xionglinlin merged 1 commit into
linuxdeepin:masterfrom
xionglinlin:fix/364749

Conversation

@xionglinlin

@xionglinlin xionglinlin commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

The NetworkGetConnections and NetworkSetConnections D-Bus methods were deprecated and no longer used by any caller. This commit removes the entire network connection sync implementation including:

  1. The D-Bus method registrations for NetworkGetConnections and NetworkSetConnections
  2. The network.go file containing the sync logic for reading/writing NetworkManager connection files
  3. The associated test file network_test.go
  4. The network connection data structures and utilities in common/dsync/ network.go
  5. The reloadConnections helper function and related NetworkManager D- Bus constants from utils.go

These interfaces were originally used by the network synchronization feature between the system daemon and deepin-sync tool, which has been moved to other components. Removing unused code reduces maintenance burden and binary size.

Influence:

  1. Verify the system daemon still starts and exports D-Bus methods correctly
  2. Run unit tests to ensure no compilation or test failures
  3. Confirm no other components or tools depend on these removed interfaces
  4. Verify system network management functionality is unaffected

chore: 删除未使用的网络连接同步接口

NetworkGetConnections和NetworkSetConnections这两个D-Bus方法已被弃用且没 有任何调用者。本次提交移除了整个网络连接同步的实现,包括:

  1. NetworkGetConnections和NetworkSetConnections的D-Bus方法注册
  2. network.go文件中读写NetworkManager连接文件的同步逻辑
  3. 相关的测试文件network_test.go
  4. common/dsync/network.go中的网络连接数据结构和工具函数
  5. utils.go中的reloadConnections辅助函数及相关NetworkManager D-Bus常量

这些接口最初用于系统守护进程和deepin-sync工具之间的网络同步功能,现已迁
移到其他组件。删除未使用的代码可以减少维护负担和二进制大小。

Influence:

  1. 验证系统守护进程仍能正常启动并导出D-Bus方法
  2. 运行单元测试,确保编译和测试无失败
  3. 确认没有其他组件或工具依赖这些已删除的接口
  4. 验证系统网络管理功能不受影响

PMS: BUG-364749 BUG-364745
Change-Id: I6e12c694f177d96eb1fb74e902904d128051bc9a

Summary by Sourcery

Remove deprecated network connection synchronization interfaces and related NetworkManager integration from the system daemon.

Enhancements:

  • Drop NetworkGetConnections and NetworkSetConnections D-Bus methods from the system daemon API.
  • Remove legacy network connection synchronization logic and data structures, including associated tests and dsync utilities.
  • Delete unused NetworkManager ReloadConnections helper and constants from the daemon utilities.
  • Update system daemon utils copyright header years.

The NetworkGetConnections and NetworkSetConnections D-Bus methods were
deprecated and no longer used by any caller. This commit removes the
entire network connection sync implementation including:

1. The D-Bus method registrations for NetworkGetConnections and
NetworkSetConnections
2. The network.go file containing the sync logic for reading/writing
NetworkManager connection files
3. The associated test file network_test.go
4. The network connection data structures and utilities in common/dsync/
network.go
5. The reloadConnections helper function and related NetworkManager D-
Bus constants from utils.go

These interfaces were originally used by the network synchronization
feature between the system daemon and deepin-sync tool, which has been
moved to other components. Removing unused code reduces maintenance
burden and binary size.

Influence:
1. Verify the system daemon still starts and exports D-Bus methods
correctly
2. Run unit tests to ensure no compilation or test failures
3. Confirm no other components or tools depend on these removed
interfaces
4. Verify system network management functionality is unaffected

chore: 删除未使用的网络连接同步接口

NetworkGetConnections和NetworkSetConnections这两个D-Bus方法已被弃用且没
有任何调用者。本次提交移除了整个网络连接同步的实现,包括:

1. NetworkGetConnections和NetworkSetConnections的D-Bus方法注册
2. network.go文件中读写NetworkManager连接文件的同步逻辑
3. 相关的测试文件network_test.go
4. common/dsync/network.go中的网络连接数据结构和工具函数
5. utils.go中的reloadConnections辅助函数及相关NetworkManager D-Bus常量

这些接口最初用于系统守护进程和deepin-sync工具之间的网络同步功能,现已迁
移到其他组件。删除未使用的代码可以减少维护负担和二进制大小。

Influence:
1. 验证系统守护进程仍能正常启动并导出D-Bus方法
2. 运行单元测试,确保编译和测试无失败
3. 确认没有其他组件或工具依赖这些已删除的接口
4. 验证系统网络管理功能不受影响

PMS: BUG-364749 BUG-364745
Change-Id: I6e12c694f177d96eb1fb74e902904d128051bc9a
@sourcery-ai

sourcery-ai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR removes the deprecated network connection synchronization feature from dde-system-daemon, including D-Bus methods, NetworkManager sync helpers, and associated data structures/tests, leaving only the remaining daemon and backlight helper logic intact.

File-Level Changes

Change Details Files
Remove NetworkManager reload helper and related D-Bus constants from the system daemon utilities.
  • Delete nmService/nmSettingsPath/nmSettingsIFC and methodNMReloadConns constants that wrapped NetworkManager Settings.ReloadConnections
  • Remove global nmSettingsObj cache and newSettingsBus() helper for obtaining the NetworkManager Settings bus object
  • Remove reloadConnections() function that called NetworkManager's ReloadConnections and handled success state
  • Keep utils.go focused on backlight helper startup, with only dbus import retained
bin/dde-system-daemon/utils.go
Unregister deprecated network connection sync D-Bus methods from the daemon.
  • Remove NetworkGetConnections method entry from Daemon.GetExportedMethods() so it is no longer exported on D-Bus
  • Remove NetworkSetConnections method entry and its input argument definition from the exported methods list
bin/dde-system-daemon/exported_methods_auto.go
Delete the system daemon-side implementation and tests for network connection synchronization.
  • Remove network.go which contained logic for reading/writing NetworkManager connection files and handling sync requests
  • Remove network_test.go which tested the network sync behavior and related logic
bin/dde-system-daemon/network.go
bin/dde-system-daemon/network_test.go
Drop shared data structures and utilities used for network sync in the common dsync package.
  • Remove common/dsync/network.go which defined the network connection data types and helper functions shared with the sync tooling
common/dsync/network.go

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

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - 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
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: caixr23, xionglinlin

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

@xionglinlin xionglinlin merged commit bf654b3 into linuxdeepin:master Jun 16, 2026
18 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