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-7101 Add machines in org count to fragments APIs #596

Merged
merged 5 commits into from
Dec 9, 2024
Merged
Changes from 4 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
10 changes: 10 additions & 0 deletions proto/viam/app/v1/app.proto
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,13 @@ enum FragmentErrorType {
FRAGMENT_ERROR_TYPE_CYCLE_DETECTED = 4;
}

message FragmentUsage {
int32 fragment_id = 1;
int64 organizations = 2;
int64 machines = 3;
int64 machines_in_current_org = 4;
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the full set of stats that we need? the fragment message currently reports robot_part_count but the scope designs show a "machines deployment" count?

Copy link
Member

@michaellee1019 michaellee1019 Dec 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry yeah I included extras in my example proto. I think this is the fields needed for the initial scope. The two existing fields in the existing Fragment proto are renamed and one field added:

message FragmentUsage {
  int64 total_organizations = 1; // (was organization_count)
  int64 total_machines = 2;  // (was robot_part_count)
  int64 current_organization_machines = 3;
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is total machines a different number than robot part count?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we get to decide, but I'd say "yes, let's finally do machines instead of parts." But we can bail out on that and continue to do parts if writing the logic gets too hairy

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 to machines!


message ResolvedFragment {
string fragment_id = 1;
google.protobuf.Struct resolved_config = 2;
Expand All @@ -854,14 +861,17 @@ message ListFragmentsRequest {

message ListFragmentsResponse {
repeated Fragment fragments = 1;
repeated FragmentUsage fragment_usages = 2;
}

message GetFragmentRequest {
string id = 1;
string current_organization_id = 2;
}

message GetFragmentResponse {
Fragment fragment = 1;
FragmentUsage fragment_usage = 2;
}

message CreateFragmentRequest {
Expand Down
Loading