-
Notifications
You must be signed in to change notification settings - Fork 344
Add deployment chain model #2790
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
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| // Copyright 2021 The PipeCD Authors. | ||
| // | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| syntax = "proto3"; | ||
|
|
||
| package pipe.model; | ||
| option go_package = "github.com/pipe-cd/pipe/pkg/model"; | ||
|
|
||
| import "validate/validate.proto"; | ||
| import "pkg/model/application.proto"; | ||
| import "pkg/model/common.proto"; | ||
|
|
||
| message DeploymentChain { | ||
| // The generated unique identifier. | ||
| string id = 1 [(validate.rules).string.min_len = 1]; | ||
| // The ID of the project this environment belongs to. | ||
| string project_id = 2 [(validate.rules).string.min_len = 1]; | ||
| // Deployment node contains all configuration required to perform deployment(s) | ||
| repeated DeploymentNode nodes = 3; | ||
|
khanhtc1202 marked this conversation as resolved.
Outdated
|
||
| // Unix time when all the applications in this chain are deployed. | ||
| int64 completed_at = 100 [(validate.rules).int64.gte = 0]; | ||
| // Unix time when the deployment chain is created. | ||
| int64 created_at = 101 [(validate.rules).int64.gt = 0]; | ||
| // Unix time of the last time when the deployment chain is updated. | ||
| int64 updated_at = 102 [(validate.rules).int64.gt = 0]; | ||
| } | ||
|
|
||
| message DeploymentNode { | ||
|
khanhtc1202 marked this conversation as resolved.
Outdated
|
||
| // List of applications which should be deployed at the same time in chain. | ||
| repeated Application applications = 1; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we have to think about this field.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Btw, in the case of storing the application list, how can we have the status (info) of actually triggered deployments to show in the web console at the "Chains" tab?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I get your point 👍 Since the name of this model is
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for your valuable comment 🙏 Addressed by 668b664
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Actually, I still don't see a clear path for triggering all deployments from the first piped since some applications could be handled by other piped. I think it is hard to find out a perfect one at this time. So I am ok to merge this PR now and we can update the model if needed later. |
||
| // Control whether to start to deploy applications in this node or not. | ||
| bool runnable = 2; | ||
| // Unix time when the deployment chain node is started. | ||
| int64 started_at = 100 [(validate.rules).int64.gte = 0]; | ||
| // Unix time when all the applications in this chain node are deployed. | ||
| int64 completed_at = 101 [(validate.rules).int64.gte = 0]; | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
.at the end.