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

feat: cache in academic scores #175

Merged
merged 6 commits into from
Feb 12, 2025
Merged

Conversation

jiuxia211
Copy link
Contributor

@jiuxia211 jiuxia211 commented Feb 8, 2025

自查 PR 结构

  • PR 标题符合这个格式: <type>(optional scope): <description>

  • 此 PR 标题的描述以用户为导向,足够清晰,其他人可以理解。

  • 我已经对所有 commit 提供了签名(GPG 密钥签名、SSH 密钥签名)

  • 这个 PR 属于强制变更/破坏性更改

如果是,请在 PR 标题中添加 BREAKING CHANGE 前缀,并在 PR 描述中详细说明。

这个 PR 的类型是什么?

这个 PR 做了什么 / 我们为什么需要这个 PR?

获取成绩接口 引入了有效期为 5 分钟的缓存

(可选)这个 PR 解决了哪个/些 issue?

对 Reviewer 预留的一些提醒

@jiuxia211 jiuxia211 requested review from mutezebra, ozline and a team as code owners February 8, 2025 20:04
Copy link

codecov bot commented Feb 8, 2025

Codecov Report

Attention: Patch coverage is 30.50847% with 41 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/academic/handler.go 0.00% 14 Missing ⚠️
pkg/cache/academic/get_scores.go 0.00% 10 Missing ⚠️
pkg/cache/academic/set_scores.go 0.00% 9 Missing ⚠️
pkg/cache/academic/academic.go 0.00% 4 Missing ⚠️
cmd/academic/main.go 0.00% 3 Missing ⚠️
pkg/cache/cache.go 0.00% 1 Missing ⚠️
@@           Coverage Diff            @@
##            main    #175      +/-   ##
========================================
- Coverage   3.23%   3.23%   -0.01%     
========================================
  Files        200     203       +3     
  Lines      41235   41270      +35     
========================================
+ Hits        1336    1337       +1     
- Misses     39822   39854      +32     
- Partials      77      79       +2     
Flag Coverage Δ
unittest 3.23% <30.50%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
api/router/api/api.go 0.00% <ø> (ø)
internal/academic/service/get_scores.go 85.00% <100.00%> (+12.27%) ⬆️
internal/academic/service/service.go 100.00% <100.00%> (ø)
kitex_gen/paper/paper.go 0.00% <ø> (ø)
kitex_gen/paper/paperservice/client.go 0.00% <ø> (ø)
kitex_gen/paper/paperservice/paperservice.go 34.93% <ø> (ø)
kitex_gen/paper/paperservice/server.go 0.00% <ø> (ø)
pkg/cache/cache.go 0.00% <0.00%> (ø)
cmd/academic/main.go 0.00% <0.00%> (ø)
pkg/cache/academic/academic.go 0.00% <0.00%> (ø)
... and 3 more

... and 3 files with indirect coverage changes

@jiuxia211
Copy link
Contributor Author

这个test真的是有点抽象,本地和云端的结果不一致,并且都有小概率产生莫名其妙的错误

@mutezebra
Copy link
Member

这个test真的是有点抽象,本地和云端的结果不一致,并且都有小概率产生莫名其妙的错误

昨天在 domtok 也有一样的问题, 重新跑了一遍 test 又没问题了

@jiuxia211 jiuxia211 merged commit 9316b85 into west2-online:main Feb 12, 2025
5 of 6 checks passed
@jiuxia211 jiuxia211 deleted the academic branch February 16, 2025 15:40
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