Skip to content

[WIP] [BUG] 用默认的demo无法跑通,无法获取到key #341

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Jul 25, 2025

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original issue description:

请简单描述bug的场景
用默认的demo无法跑通,无法获取到key

如何重现
1、使用默认的demo,修改demo的地址为我的域名、key、appid
2、提示能正常连接(即便我给的key是错误的,比如XXX,依然提示正常链接)
3、提示找不到key(实际上我怀疑压根没连上)

截图

func main() {
	c := &config.AppConfig{
		AppID:          "xx-soc",
		Cluster:        "dev",
		IP:             "https://apollo-conf.xxxx.com",
		NamespaceName:  "soc_database",
		IsBackupConfig: false,
		Secret:         "yy",      ##secret是apollo的应用里的管理秘钥里的DEVkey,但我改成yy依然提示连接成功
	}

	client, _ := agollo.StartWithConfig(func() (*config.AppConfig, error) {
		return c, nil
	})
	fmt.Println("Apollo configuration initialized successfully")

Agollo 版本 :

  • 当前最新版本,刚下的

日志信息

go run .\test_apollo_namespaces.go
=== 测试Apollo中所有namespace的配置 ===
Apollo连接参数:
  AppID: xx-soc
  Cluster: dev
  IP: https://apollo-conf.xxx.com
  Namespaces: soc_database
✓ Apollo客户端启动成功
等待配置加载...

=== 测试namespace: soc_database ===
  ✓ 成功获取namespace soc_database 的缓存
  ✓ 缓存支持Range方法,开始遍历...
    ⚠️  namespace soc_database 中没有找到任何配置项

实际上应该没有连接上,key都是错误的

Fixes #340.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copy link
Contributor

mergify bot commented Jul 25, 2025

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

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.

[BUG] 用默认的demo无法跑通,无法获取到key
2 participants