-
Notifications
You must be signed in to change notification settings - Fork 75
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
APP-7267 APP-7269 Add version support to GetFragment #610
base: main
Are you sure you want to change the base?
Changes from 1 commit
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 |
---|---|---|
|
@@ -190,6 +190,9 @@ service AppService { | |
// Gets a single fragment | ||
rpc GetFragment(GetFragmentRequest) returns (GetFragmentResponse); | ||
|
||
// Gets usage for a fragment across versions | ||
rpc GetFragmentUsage(GetFragmentUsageRequest) returns (GetFragmentUsageResponse); | ||
|
||
// Creates a fragment | ||
rpc CreateFragment(CreateFragmentRequest) returns (CreateFragmentResponse); | ||
|
||
|
@@ -813,6 +816,7 @@ message Fragment { | |
FragmentVisibility visibility = 12; | ||
// latest timestamp when fragment was updated | ||
google.protobuf.Timestamp last_updated = 13 [(tagger.v1.tags) = "bson:\"last_updated_at\""]; | ||
string revision = 14; | ||
} | ||
|
||
message FragmentHistoryEntry { | ||
|
@@ -822,6 +826,18 @@ message FragmentHistoryEntry { | |
AuthenticatorInfo edited_by = 4 [(tagger.v1.tags) = "bson:\"edited_by\" json:\"edited_by\""]; | ||
} | ||
|
||
message FragmentRevision { | ||
string revision = 1; | ||
google.protobuf.Timestamp created_at = 2; | ||
} | ||
|
||
message FragmentTag { | ||
string tag = 1; | ||
string revision = 2; | ||
google.protobuf.Timestamp created_at = 3; | ||
google.protobuf.Timestamp updated_at = 4; | ||
} | ||
|
||
enum FragmentVisibility { | ||
FRAGMENT_VISIBILITY_UNSPECIFIED = 0; | ||
FRAGMENT_VISIBILITY_PRIVATE = 1; | ||
|
@@ -843,11 +859,13 @@ enum FragmentErrorType { | |
FRAGMENT_ERROR_TYPE_CYCLE_DETECTED = 4; | ||
} | ||
|
||
// Cached fragment usage statistics | ||
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. Do we want to add a comment here about how this will either be tag usages or revision usages? 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. updated! |
||
message FragmentUsage { | ||
string fragment_id = 1; | ||
int32 organizations = 2; | ||
int32 machines = 3; | ||
int32 machines_in_current_org = 4; | ||
string version = 5; | ||
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. should this be optional? or should we establish 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 like 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. +1 to optional. |
||
} | ||
|
||
message ResolvedFragment { | ||
|
@@ -870,11 +888,22 @@ message ListFragmentsResponse { | |
message GetFragmentRequest { | ||
string id = 1; | ||
string current_organization_id = 2; | ||
optional string version = 3; | ||
} | ||
|
||
message GetFragmentResponse { | ||
Fragment fragment = 1; | ||
FragmentUsage fragment_usage = 2; | ||
repeated FragmentRevision revisions = 3; | ||
ehhong marked this conversation as resolved.
Show resolved
Hide resolved
|
||
repeated FragmentTag tags = 4; | ||
} | ||
|
||
message GetFragmentUsageRequest { | ||
string fragment_id = 1; | ||
} | ||
|
||
message GetFragmentUsageResponse { | ||
repeated FragmentUsage version_usages = 1; | ||
} | ||
|
||
message CreateFragmentRequest { | ||
|
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.
UI is not using these fields in latest design; given there's some quirks around trying to store this data, let's ditch it from the response