Skip to content

fix: remove duplicate imports in component/notify test file causing build failure#356

Merged
zouyx merged 6 commits into
developfrom
copilot/create-release-v500
Mar 14, 2026
Merged

fix: remove duplicate imports in component/notify test file causing build failure#356
zouyx merged 6 commits into
developfrom
copilot/create-release-v500

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 14, 2026

component/notify/componet_notify_test.go had two duplicate imports left over from the v4→v5 module path migration, causing the package to fail to compile:

  • . "github.com/tevid/gohamcrest" imported twice → all exported symbols (Assert, Equal, BaseMatcher, etc.) redeclared in block
  • github.com/apolloconfig/agollo/v5/cluster/roundrobin imported twice (once named, once as _)

Changes

  • component/notify/componet_notify_test.go: deduplicate the import block — remove the second . "github.com/tevid/gohamcrest" and the redundant blank _ roundrobin import
Original prompt

用develop发布v5.0.0版本,需要创建release分支和release内容,你需要自己加进去


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Mar 14, 2026

感谢您提出Pull Request,我会尽快Review。我会在1-2日内进行查看或者回复,如果遇到节假日可能会处理较慢,敬请谅解。

Co-authored-by: zouyx <3828072+zouyx@users.noreply.github.com>
Copilot AI changed the title [WIP] Create release branch for version 5.0.0 release: bump module to v5.0.0 Mar 14, 2026
Copilot AI requested a review from zouyx March 14, 2026 13:17
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Mar 14, 2026

这个 PR 发生了冲突. @Copilot 是否能帮忙修复呢? 🙏

@zouyx zouyx closed this Mar 14, 2026
@zouyx zouyx reopened this Mar 14, 2026
@zouyx zouyx marked this pull request as ready for review March 14, 2026 13:38
Copilot AI review requested due to automatic review settings March 14, 2026 13:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR promotes the repository to a new major Go module version (v5) by updating the module path and rewriting internal import paths accordingly, along with updating documentation and adding a changelog for the v5.0.0 release.

Changes:

  • Update go.mod module path to github.com/apolloconfig/agollo/v5
  • Rewrite internal Go imports from /v4 to /v5 across the codebase
  • Update README installation/usage snippets and add a CHANGELOG.md for v5.0.0

Reviewed changes

Copilot reviewed 59 out of 59 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
go.mod Bumps module path to /v5 (major version module convention).
client.go Updates internal imports to /v5.
client_test.go Updates internal imports to /v5 (note: redundant duplicate blank import flagged).
start.go Updates internal imports to /v5.
start_test.go Updates internal imports to /v5.
mock_server_test.go Updates internal imports to /v5.
agcache/memory/memory.go Updates internal imports to /v5.
agcache/memory/memory_test.go Updates internal imports to /v5.
cluster/load_balance.go Updates internal imports to /v5.
cluster/roundrobin/round_robin.go Updates internal imports to /v5.
cluster/roundrobin/round_robin_test.go Updates internal imports to /v5.
component/common.go Updates internal imports to /v5.
component/common_test.go Updates internal imports to /v5.
component/notify/componet_notify.go Updates internal imports to /v5.
component/notify/change_event_test.go Updates internal imports to /v5 (note: redundant blank imports flagged).
component/remote/abs.go Updates internal imports to /v5.
component/remote/async.go Updates internal imports to /v5.
component/remote/async_test.go Updates internal imports to /v5.
component/remote/remote.go Updates internal imports to /v5.
component/remote/sync.go Updates internal imports to /v5.
component/remote/sync_test.go Updates internal imports to /v5.
component/serverlist/sync.go Updates internal imports to /v5.
component/serverlist/sync_test.go Updates internal imports to /v5.
env/app_config.go Updates internal imports to /v5.
env/app_config_test.go Updates internal imports to /v5.
env/config/apollo_config.go Updates internal imports to /v5.
env/config/apollo_config_test.go Updates internal imports to /v5.
env/config/config.go Updates internal imports to /v5.
env/config/config_test.go Updates internal imports to /v5.
env/config/json/json_config.go Updates internal imports to /v5.
env/config/json/json_config_test.go Updates internal imports to /v5.
env/file/file_handler.go Updates internal imports to /v5.
env/file/json/json.go Updates internal imports to /v5.
env/file/json/json_test.go Updates internal imports to /v5.
env/file/json/raw.go Updates internal imports to /v5.
env/file/json/raw_test.go Updates internal imports to /v5.
env/server/server.go Updates internal imports to /v5.
env/server/server_test.go Updates internal imports to /v5.
extension/cache.go Updates internal imports to /v5.
extension/cache_test.go Updates internal imports to /v5.
extension/file.go Updates internal imports to /v5.
extension/file_test.go Updates internal imports to /v5.
extension/format_parser.go Updates internal imports to /v5.
extension/format_parser_test.go Updates internal imports to /v5.
extension/load_balance.go Updates internal imports to /v5.
extension/load_balance_test.go Updates internal imports to /v5.
extension/sign.go Updates internal imports to /v5.
protocol/http/request.go Updates internal imports to /v5.
protocol/http/request_test.go Updates internal imports to /v5.
storage/event_dispatch.go Updates internal imports to /v5.
storage/repository.go Updates internal imports to /v5.
storage/repository_test.go Updates internal imports to /v5 (note: redundant blank import flagged).
utils/parse/yaml/parser.go Updates internal imports to /v5.
utils/parse/yaml/parser_test.go Updates internal imports to /v5.
utils/parse/yml/parser.go Updates internal imports to /v5.
utils/parse/yml/parser_test.go Updates internal imports to /v5.
README.md Updates install/import examples to /v5.
README_CN.md Updates install/import examples to /v5.
CHANGELOG.md Adds v5.0.0 changelog entry and migration guidance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +24 to +28
"github.com/apolloconfig/agollo/v5/agcache/memory"
_ "github.com/apolloconfig/agollo/v5/agcache/memory"
"github.com/apolloconfig/agollo/v5/env"
"github.com/apolloconfig/agollo/v5/env/config"
_ "github.com/apolloconfig/agollo/v5/env/file/json"
Comment thread component/notify/change_event_test.go Outdated
Comment thread go.mod
Comment on lines +1 to 3
module github.com/apolloconfig/agollo/v5

go 1.20
Comment thread client_test.go Outdated
Co-authored-by: zouyx <3828072+zouyx@users.noreply.github.com>
Copilot AI changed the title release: bump module to v5.0.0 fix: remove duplicate imports in component/notify test file causing build failure Mar 14, 2026
Copilot AI requested a review from zouyx March 14, 2026 13:44
zouyx and others added 2 commits March 14, 2026 21:56
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@zouyx zouyx merged commit d3d00b4 into develop Mar 14, 2026
4 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