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

refactor: url service #108

Merged
merged 15 commits into from
Dec 14, 2024
Merged

refactor: url service #108

merged 15 commits into from
Dec 14, 2024

Conversation

FantasyRL
Copy link
Member

@FantasyRL FantasyRL commented Nov 24, 2024

一些问题:
下载apk重定向很慢
testSetting(/api/test)这个接口逻辑和get_setting基本一致
setcloud不能直接调试,因为格式是不正确的不能解析,apifox没有自动加换行符,我觉得不如传文件更好点

@FantasyRL FantasyRL linked an issue Nov 24, 2024 that may be closed by this pull request
@FantasyRL FantasyRL closed this Nov 27, 2024
@FantasyRL FantasyRL deleted the not_main branch November 27, 2024 01:34
@FantasyRL FantasyRL reopened this Nov 27, 2024
Copy link

codecov bot commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 2.75358% with 3461 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
kitex_gen/common/common.go 0.00% 1098 Missing ⚠️
kitex_gen/common/k-common.go 0.00% 765 Missing ⚠️
kitex_gen/version/versionservice/versionservice.go 9.89% 263 Missing and 1 partial ⚠️
api/handler/api/version_service.go 0.00% 226 Missing ⚠️
internal/version/handler.go 0.00% 110 Missing ⚠️
internal/version/service/get_setting.go 0.00% 110 Missing ⚠️
api/handler/custom/url_service.go 0.00% 106 Missing ⚠️
api/rpc/url.go 0.00% 105 Missing ⚠️
pkg/upyun/url.go 0.00% 76 Missing ⚠️
kitex_gen/common/commonservice/commonservice.go 27.88% 74 Missing and 1 partial ⚠️
... and 30 more
@@           Coverage Diff            @@
##            main    #108      +/-   ##
========================================
- Coverage   3.67%   2.51%   -1.16%     
========================================
  Files        144     179      +35     
  Lines      22478   36672   +14194     
========================================
+ Hits         825     923      +98     
- Misses     21616   35709   +14093     
- Partials      37      40       +3     
Flag Coverage Δ
unittest 2.51% <2.75%> (-1.16%) ⬇️

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

Files with missing lines Coverage Δ
cmd/api/main.go 0.00% <ø> (ø)
internal/launch_screen/service/create_image.go 93.18% <100.00%> (+0.49%) ⬆️
internal/version/service/download_apk.go 100.00% <100.00%> (ø)
internal/version/service/get_dump.go 100.00% <100.00%> (ø)
kitex_gen/version/k-version.go 0.00% <ø> (ø)
kitex_gen/version/version.go 0.00% <ø> (ø)
config/config.go 0.00% <0.00%> (ø)
api/handler/api/user_service.go 0.00% <0.00%> (ø)
api/rpc/init.go 0.00% <0.00%> (ø)
pkg/utils/check_pwd.go 0.00% <0.00%> (ø)
... and 36 more

@FantasyRL FantasyRL marked this pull request as ready for review November 28, 2024 09:44
@FantasyRL FantasyRL requested review from ozline and a team as code owners November 28, 2024 09:44
@penqee
Copy link
Contributor

penqee commented Nov 28, 2024

印象里,FZUHelper.html会去请求FZUHelper.css才能呈现完整,这个应该没问题吧

penqee
penqee previously approved these changes Nov 28, 2024
@FantasyRL
Copy link
Member Author

印象里,FZUHelper.html会去请求FZUHelper.css才能呈现完整,这个应该没问题吧

有问题,还有这事

@jiuxia211
Copy link
Contributor

印象里,FZUHelper.html会去请求FZUHelper.css才能呈现完整,这个应该没问题吧

有问题,还有这事

其实只要保证请求FZUHelper.css得到接口能正确访问就没问题

@jiuxia211
Copy link
Contributor

修一下ci和冲突

# Conflicts:
#	api/handler/api/url_service.go
#	api/model/api/api.go
#	cmd/api/main.go
#	config/config.example.yaml
#	config/types.go
#	go.mod
#	go.sum
#	pkg/constants/constants.go
#	pkg/errno/default.go
@ozline
Copy link
Member

ozline commented Dec 2, 2024

用 gpt 补几个测试吧,这样ci 不至于难看,而且后面也不用再补了,格式可以仿造其他的 test

# Conflicts:
#	api/router/api/api.go
#	api/router/api/middleware.go
#	idl/api.thrift
@FantasyRL
Copy link
Member Author

感觉时间不是很够补完,我先去看数逻了

penqee
penqee previously approved these changes Dec 6, 2024
idl/api.thrift Outdated
FZUHelperHTMLResponse FZUHelperHTML(1: FZUHelperHTMLRequest req) (api.get="/api/v1/url/onekey/fzu-helper.html")
UserAgreementHTMLResponse UserAgreementHTML(1: UserAgreementHTMLRequest req) (api.get="/api/v1/url/onekey/user-agreement.html")
service CommonService {
GetCSSResponse GetCSS(1:GetCSSRequest req)(api.get="/api/v2/common/FZUHelper.css"),
Copy link
Member

Choose a reason for hiding this comment

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

这些静态资源的获取可以考虑成 /static 下面,然后文件的命名最好小写吧

Copy link
Member Author

Choose a reason for hiding this comment

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

这些现在都是直接请求upyun的,因为在容器里搞静态资源感觉并不是很优雅

Copy link
Member

Choose a reason for hiding this comment

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

还有 url 最好不要出现大写

@ozline
Copy link
Member

ozline commented Dec 7, 2024

这个pr目前还有什么没做掉的吗?

@jiuxia211
Copy link
Contributor

这个pr目前还有什么没做掉的吗?

把模块名url 改成 version

# Conflicts:
#	.gitignore
#	api/handler/api/url_service.go
#	cmd/api/main.go
#	config/config.example.yaml
#	config/config.go
#	config/types.go
#	pkg/constants/constants.go
@jiuxia211 jiuxia211 merged commit 9adae81 into west2-online:main Dec 14, 2024
6 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.

refactor the url module
5 participants