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: 支持配置文件恢复 --story=74835198 #2960

Merged

Conversation

Ambition9186
Copy link
Contributor

No description provided.

@Ambition9186 Ambition9186 force-pushed the feature/config_item_recovery branch 4 times, most recently from 51df6ae to 1ce4a21 Compare February 26, 2024 09:42
@@ -47,7 +50,8 @@ func (s *Service) CreateConfigItem(ctx context.Context, req *pbds.CreateConfigIt
}
// validate in table config_items
if _, err := s.dao.ConfigItem().GetByUniqueKey(grpcKit, req.ConfigItemAttachment.BizId,
req.ConfigItemAttachment.AppId, req.ConfigItemSpec.Name, req.ConfigItemSpec.Path); err == nil {
req.ConfigItemAttachment.AppId, req.ConfigItemSpec.Name, req.ConfigItemSpec.Path); err == nil &&
errors.Is(err, gorm.ErrRecordNotFound) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

err == nil 后面的 && 无效

}

if commit.ID == releaseCi.CommitID {
return nil, errors.New("It's already the latest version")
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里不用判断

@Ambition9186 Ambition9186 force-pushed the feature/config_item_recovery branch from 1ce4a21 to 2e80254 Compare February 27, 2024 06:33
}

commitID := []uint32{}
contextID := []uint32{}
Copy link
Collaborator

Choose a reason for hiding this comment

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

应该是 contentID

@Ambition9186 Ambition9186 force-pushed the feature/config_item_recovery branch from 2e80254 to a234d65 Compare February 28, 2024 02:51
@AlkaidChan AlkaidChan merged commit fcd1d2b into TencentBlueKing:master Feb 28, 2024
10 of 11 checks passed
wenxinlee2015 added a commit that referenced this pull request Feb 28, 2024
* github-bk-bcs/master:
  feat: 支持配置文件恢复以及撤回 (#2960)
  feat: get tmpl rev with signature --task=74871191 (#2983)
  fix #2967 (#2978)
  fix: 修复导入kv时针对转义的json字符串做处理 (#2982)
@Ambition9186 Ambition9186 deleted the feature/config_item_recovery branch April 29, 2024 03:00
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.

2 participants