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

第二次重构 #43

Merged
merged 79 commits into from
Jan 7, 2024
Merged

第二次重构 #43

merged 79 commits into from
Jan 7, 2024

Conversation

knight42
Copy link
Member

@knight42 knight42 commented Jan 2, 2024

Fix #41

1. Highlights

2. Breaking Changes

2.1 Yukid Configuration

  • log_dir 字段重命名成 repo_logs_dir
  • images_upgrade_interval 字段的类型改成 time.Duration,不再使用 cron,而是通过类似 “1h” 这样的值来指定间隔
  • 增加了 log_file 字段,表示 yukid 的日志文件路径,默认是 /dev/stderr
  • 去掉了 db_name 字段

2.2 Repo Configuration

  • interval 字段重命名成 cron
  • logRotCycle 的默认值从原来的 10 变成 0,影响是如果配置里没有设置这个字段,则不会保存同步的日志文件

3. Misc

  • 使用 goreleaser 来创建 GitHub release 以及上传 binary
  • 使用 dependabot 来自动更新依赖以及用到的 GitHub actions
  • 使用 golangci-lint 来检查代码
  • 添加了 integration test

4. Migration Guide

sed -i.bak ’s/log_dir/repo_logs_dir/’ /etc/yuki/daemon.toml
# 更新 /etc/yuki/daemon.toml 中的 `images_upgrade_interval` 字段

sed -i.bak ’s/interval/cron/‘ /path/to/repo/configs/*.yaml

Signed-off-by: Jian Zeng <[email protected]>
Signed-off-by: Jian Zeng <[email protected]>
Signed-off-by: Jian Zeng <[email protected]>
Signed-off-by: Jian Zeng <[email protected]>
Signed-off-by: Jian Zeng <[email protected]>
Signed-off-by: Jian Zeng <[email protected]>
Signed-off-by: Jian Zeng <[email protected]>
Signed-off-by: Jian Zeng <[email protected]>
Signed-off-by: Jian Zeng <[email protected]>
Signed-off-by: Jian Zeng <[email protected]>
Signed-off-by: Jian Zeng <[email protected]>
Signed-off-by: Jian Zeng <[email protected]>
Signed-off-by: Jian Zeng <[email protected]>
Signed-off-by: Jian Zeng <[email protected]>
@taoky
Copy link
Member

taoky commented Jan 2, 2024

可以在 README 中添加 Migration Guide 吗?这样可以帮助潜在的其他用户迁移。可以假设新版本是 0.4.x?

@knight42
Copy link
Member Author

knight42 commented Jan 2, 2024

可以在 README 中添加 Migration Guide 吗?这样可以帮助潜在的其他用户迁移。可以假设新版本是 0.4.x?

嗯没问题,我加一下

@knight42
Copy link
Member Author

knight42 commented Jan 7, 2024

已更新所有 mirrors 机器,目前未发现异常,先 merge 了。

@knight42 knight42 merged commit 47ece57 into master Jan 7, 2024
3 checks passed
@knight42 knight42 deleted the refactor branch January 7, 2024 05:41
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.

重构 为 yukid 添加设置启动的容器中 /tmp 挂载到 tmpfs 的功能
2 participants