Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Commit aadf2e3

Browse files
✨ Add new Issue model to APIs (#1268)
1 parent 3b3ff9f commit aadf2e3

File tree

3 files changed

+111
-0
lines changed

3 files changed

+111
-0
lines changed

docs/docs/api/platform-api.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050

5151

5252

53+
5354

5455

5556
### api.v1.capsule.Service
@@ -5021,6 +5022,77 @@ The rollout model.
50215022

50225023

50235024

5025+
<a name="model_issue-proto"></a>
5026+
5027+
## model/issue.proto
5028+
5029+
5030+
5031+
<a name="model-Issue"></a>
5032+
5033+
### Issue
5034+
5035+
5036+
5037+
| Field | Type | Label | Description |
5038+
| ----- | ---- | ----- | ----------- |
5039+
| issue_id | [string](#string) | | |
5040+
| type | [string](#string) | | |
5041+
| created_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
5042+
| updated_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
5043+
| stale_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
5044+
| closed_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
5045+
| reference | [Reference](#model-Reference) | | |
5046+
| message | [string](#string) | | |
5047+
| level | [Level](#model-Level) | | |
5048+
| count | [uint32](#uint32) | | |
5049+
5050+
5051+
5052+
5053+
5054+
5055+
<a name="model-Reference"></a>
5056+
5057+
### Reference
5058+
5059+
5060+
5061+
| Field | Type | Label | Description |
5062+
| ----- | ---- | ----- | ----------- |
5063+
| project_id | [string](#string) | | |
5064+
| capsule_id | [string](#string) | | |
5065+
| environment_id | [string](#string) | | |
5066+
| rollout_id | [uint64](#uint64) | | |
5067+
| instance_id | [string](#string) | | |
5068+
5069+
5070+
5071+
5072+
5073+
5074+
5075+
5076+
<a name="model-Level"></a>
5077+
5078+
### Level
5079+
5080+
5081+
| Name | Number | Description |
5082+
| ---- | ------ | ----------- |
5083+
| LEVEL_UNSPECIFIED | 0 | |
5084+
| LEVEL_INFORMATIVE | 1 | |
5085+
| LEVEL_MINOR | 2 | |
5086+
| LEVEL_MAJOR | 3 | |
5087+
| LEVEL_CRITICAL | 4 | |
5088+
5089+
5090+
5091+
5092+
5093+
5094+
5095+
50245096
<a name="api_v1_capsule_status-proto"></a>
50255097

50265098
## api/v1/capsule/status.proto
@@ -5185,6 +5257,7 @@ The rollout model.
51855257
| interfaces | [InterfaceStatus](#api-v1-capsule-InterfaceStatus) | repeated | |
51865258
| config_files | [ConfigFileStatus](#api-v1-capsule-ConfigFileStatus) | repeated | |
51875259
| cron_jobs | [CronJobStatus](#api-v1-capsule-CronJobStatus) | repeated | |
5260+
| issues | [model.Issue](#model-Issue) | repeated | List of all issues associated to the Capsule, include those of the current rollout. The list does not include instance-level issues. |
51885261

51895262

51905263

proto/rig/api/v1/capsule/status.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ syntax = "proto3";
22

33
package api.v1.capsule;
44

5+
import "model/issue.proto";
56
import "api/v1/capsule/change.proto";
67
import "operator/api/v1/pipeline/object_status.proto";
78

@@ -14,6 +15,9 @@ message Status {
1415
repeated InterfaceStatus interfaces = 6;
1516
repeated ConfigFileStatus config_files = 7;
1617
repeated CronJobStatus cron_jobs = 8;
18+
// List of all issues associated to the Capsule, include those of the current
19+
// rollout. The list does not include instance-level issues.
20+
repeated model.Issue issues = 9;
1721
}
1822

1923
message CapsuleStatus {

proto/rig/model/issue.proto

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
syntax = "proto3";
2+
3+
package model;
4+
5+
import "google/protobuf/timestamp.proto";
6+
7+
enum Level {
8+
LEVEL_UNSPECIFIED = 0;
9+
LEVEL_INFORMATIVE = 1;
10+
LEVEL_MINOR = 2;
11+
LEVEL_MAJOR = 3;
12+
LEVEL_CRITICAL = 4;
13+
}
14+
15+
message Issue {
16+
string issue_id = 1;
17+
string type = 2;
18+
google.protobuf.Timestamp created_at = 3;
19+
google.protobuf.Timestamp updated_at = 4;
20+
google.protobuf.Timestamp stale_at = 5;
21+
google.protobuf.Timestamp closed_at = 11;
22+
Reference reference = 6;
23+
string message = 7;
24+
Level level = 8;
25+
uint32 count = 9;
26+
}
27+
28+
message Reference {
29+
string project_id = 1;
30+
string capsule_id = 2;
31+
string environment_id = 3;
32+
uint64 rollout_id = 4;
33+
string instance_id = 5;
34+
}

0 commit comments

Comments
 (0)