--bug=160690000 fix: support project and environment for services and templates#616
Conversation
f151518 to
cbd08f4
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f1515182c0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| bool all = 7 | ||
| [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { description: "是否获取所有", default: "false" }]; |
There was a problem hiding this comment.
This reuses field tag 7, which was uint32 env_id in the previous ListAppsRestReq, as bool all. Any gRPC client or persisted request built from the old proto that sends env_id will now be decoded as all=true, and environment filtering can no longer be represented on this message; protobuf tags should not be reused for different types or meanings. Keep/reserve env_id = 7 and assign all a new tag.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
都是新增的,不存在以上问题
| } | ||
| } | ||
|
|
||
| apps, err := s.dao.App().ListAppsByIDs(kt, req.BizId, req.ProjectId, appIDs) |
There was a problem hiding this comment.
Forward project_id when listing app template sets
When the project/env HTTP route for ListAppTemplateSets goes through config-server, cmd/config-server/service/template_set.go still builds the data-service request with only BizId and AppId, so this new lookup receives req.ProjectId == 0. Because ListAppsByIDs filters by ProjID, it returns no apps and appEnvMap stays empty, causing the newly added TemplateSet.env_id to be 0 for all template sets returned through that config API path.
Useful? React with 👍 / 👎.
cbd08f4 to
9951ae7
Compare
| for _, one := range s { | ||
| result = append(result, PbTemplateSet(one)) | ||
| pb := PbTemplateSet(one) | ||
| // 一个模板绑定的所有 App 属于同一个环境, |
There was a problem hiding this comment.
模版绑定的 app 应该可能是不同环境的?所有环境的app都能使用同一个模版
9951ae7 to
bec8966
Compare
bec8966 to
fcff30f
Compare
No description provided.