Skip to content
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

fix: 等待 2 分钟后再触发 registry_update #197

Merged
merged 5 commits into from
Jan 29, 2024
Merged

Conversation

eya46
Copy link
Contributor

@eya46 eya46 commented Jan 29, 2024

先处理pr再触发registry更新

有时已经在进行商店更新,但是pr还未合并,nonebot仓库的{module_name}.json未写入新的插件信息,从而导致测试失败
如果没有其它pr触发,就无法写入到 nonebot/registry,导致丢失插件

https://github.com/nonebot/registry/actions/runs/7675902162/job/20922746791

...
  File "/home/runner/work/registry/registry/src/utils/store_test/store.py", line 96, in test_plugins
    test_plugins = [(key, self._store_plugins[key])]
KeyError: 'nonebot-plugin-nezha:nonebot_plugin_nezha'

先处理pr再触发registry更新
@he0119
Copy link
Member

he0119 commented Jan 29, 2024

诶,不对啊,handle_pr_close 本来就是 pr 关闭时才会运行的。这段代码运行时,PR 已经合并。所以大概率还是缓存问题吧。

我突然想到这里是不是可以设置什么 no-cache 之类的?

curl -sSL https://raw.githubusercontent.com/nonebot/registry/results/results.json -o plugin_test/store/previous_results.json

@he0119 he0119 changed the title Update def handle_pr_close fix: registry update 报错 KeyError Jan 29, 2024
@eya46
Copy link
Contributor Author

eya46 commented Jan 29, 2024

艹,确实,PullRequestClosed,太怪了

Copy link

codecov bot commented Jan 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7ede4f5) 97.42% compared to head (1cc3537) 97.42%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #197   +/-   ##
=======================================
  Coverage   97.42%   97.42%           
=======================================
  Files          17       17           
  Lines        1009     1011    +2     
=======================================
+ Hits          983      985    +2     
  Misses         26       26           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@he0119 he0119 enabled auto-merge (squash) January 29, 2024 13:51
@he0119 he0119 disabled auto-merge January 29, 2024 14:12
@he0119 he0119 changed the title fix: registry update 报错 KeyError fix: 等待 2 分钟后再触发 registry_update Jan 29, 2024
@he0119 he0119 merged commit 4de9b12 into nonebot:main Jan 29, 2024
7 checks passed
@he0119 he0119 added the bug Something isn't working label Jan 29, 2024
@eya46 eya46 deleted the patch-1 branch January 30, 2024 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants