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: 模板文件支持展示最新部署及版本列表兼容非语义化版本 #3517

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

LidolLxf
Copy link
Contributor

feat: 模板文件支持展示最新部署及版本列表兼容非语义化版本

@tencentblueking-adm
Copy link

tencentblueking-adm commented Sep 13, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@adevjoe adevjoe left a comment

Choose a reason for hiding this comment

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

lint 问题处理一下

@@ -279,12 +279,16 @@ func (t *TemplateAction) Create(ctx context.Context, req *clusterRes.CreateTempl
VersionMode: 0,
Version: req.GetVersion(),
IsDraft: req.GetIsDraft(),
LatestVersion: req.GetVersion(),
Copy link
Contributor

Choose a reason for hiding this comment

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

改成 LatestDeployVersion

Copy link
Contributor

Choose a reason for hiding this comment

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

部署人改成 LatestDeployer

@@ -212,6 +226,11 @@ func (t *TemplateVersionAction) Create(ctx context.Context, req *clusterRes.Crea
}

userName := ctxkey.GetUsernameFromCtx(ctx)
// 更新最新版本及部署人
updateTemplate := entity.M{
"latestVersion": req.Version,
Copy link
Contributor

Choose a reason for hiding this comment

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

db 字段名相应调整

@@ -31,6 +31,7 @@ type TemplateVersion struct {
CreateAt int64 `json:"createAt" bson:"createAt"`
Latest bool `json:"latest" bson:"-"` // 是否是最新版本,不存储在数据库
Draft bool `json:"draft" bson:"-"`
LatestVersion string `json:"latestVersion" bson:"-"`
Copy link
Contributor

Choose a reason for hiding this comment

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

LatestDeployVersion

Copy link
Contributor

Choose a reason for hiding this comment

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

这里没添加部署人

@@ -212,6 +229,11 @@ func (t *TemplateVersionAction) Create(ctx context.Context, req *clusterRes.Crea
}

userName := ctxkey.GetUsernameFromCtx(ctx)
// 更新最新版本及部署人
updateTemplate := entity.M{
Copy link
Contributor

Choose a reason for hiding this comment

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

这里是部署版本,不是最新版本,只在部署是更新 latestDeployVersionlatestDeployer

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