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

APP-7267 APP-7269 Add version support to GetFragment #610

Merged
merged 3 commits into from
Jan 31, 2025
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions proto/viam/app/v1/app.proto
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,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 {
Expand All @@ -825,6 +826,16 @@ message FragmentHistoryEntry {
google.protobuf.Struct config = 6 [(tagger.v1.tags) = "bson:\"config\" json:\"config\""];
}

message FragmentRevision {
string revision = 1;
google.protobuf.Timestamp created_at = 2;
}

message FragmentTag {
string tag = 1;
string revision = 2;
}

enum FragmentVisibility {
FRAGMENT_VISIBILITY_UNSPECIFIED = 0;
FRAGMENT_VISIBILITY_PRIVATE = 1;
Expand All @@ -846,11 +857,13 @@ enum FragmentErrorType {
FRAGMENT_ERROR_TYPE_CYCLE_DETECTED = 4;
}

// Cached fragment usage statistics
Copy link
Contributor

@anjinai anjinai Jan 9, 2025

Choose a reason for hiding this comment

The 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?

Copy link
Member Author

Choose a reason for hiding this comment

The 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;
optional string version = 5; // revision or tag
}

message ResolvedFragment {
Expand All @@ -873,11 +886,14 @@ message ListFragmentsResponse {
message GetFragmentRequest {
string id = 1;
string current_organization_id = 2;
optional string version = 3; // revision or tag
}

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 CreateFragmentRequest {
Expand Down
Loading