-
Notifications
You must be signed in to change notification settings - Fork 74
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-3604 build endpoints for external oauth and repos #544
Conversation
// git repo in owner/repository form | ||
string repo = 5; | ||
// email of the viam user who created this | ||
string viam_user = 6; |
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.
Will it be an issue if the viam user is deleted?
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.
this is just for tracking history; the authorization is done through the OAuth app link, which is permissioned per viam org
proto/viam/app/build/v1/build.proto
Outdated
@@ -83,3 +99,74 @@ message ListJobsResponse { | |||
// jobs is ordered by (build start time, alphabetical platform). | |||
repeated JobInfo jobs = 1; | |||
} | |||
|
|||
message RepoLink { | |||
string app_link_id = 1; |
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.
Is this an Id from GH?
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.
if it is, can we call oauth_app_link id or something? so it's a bit more clear where it comes from
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.
yup way clearer, done in 33c41a0
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.
🚀
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.
I have low context, but in isolation, these seem good
// list of org public namespace (where available) or org UUIDs attached to the external app | ||
repeated string org_id_or_ns = 4; |
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.
To support one user attaching multiple orgs to the same app?
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.
yes -- main motivation for this was our internal use pattern
proto/viam/app/build/v1/build.proto
Outdated
// public namespace of the module | ||
optional string namespace = 3; |
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.
[probably worth discussing] Why is associating the namespace necessary for this message (same for AppLink)?
I worry that this will mean that will add a lot more logic & edge cases for module transfers from org to org.
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.
this is populated in the downstream direction so that CLI output is user-readable; it's not stored in the DB and it's not used in the request. I'll edit the docstring to say this
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.
SGTM
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Pranav Puranam <pranav.puranam@gmail.com>
* main: (22 commits) DATA-3094: Add CLI args to SubmitCustomTrainingJobRequest (#550) bump min golang version (#548) DATA-3054: Added UpdateBoundingBox (#547) RSDK-8595 update docs with new behavior (#546) APP-3604 build endpoints for external oauth and repos (#544) add last updated to fragment proto (#540) APP-5851: Add optional visibility field to `CreateFragmentRequest` (#543) APP-5314 - add dates and limit to GetRobotPartLogsRequest (#538) RSDK-7903 Add unhealthy state and error field (#539) RSDK-8381 add viam server version to API (#537) [APP-5417]: Undo APP-5417 (#536) [APP-5417]: Accommodate pagination for GetRobotPartHistory in api (#535) Data 2816/get training job logs (#534) DATA-2792 - Add URL to UpdateRegistryItemRequest, but make it optional (#532) RSDK-8228 Add config status to machine status API (#531) Add revision field to config (#530) [APP-5420] Add ListMachineFragments request and response (#525) [APP-5400]: Add GetFragmentHistory proto (#524) RSDK-7899 Add MachineStatus to RobotService (#527) RSDK-8083: add LogPatternConfig field to RobotConfig API (#526) ...
* main: (22 commits) DATA-3094: Add CLI args to SubmitCustomTrainingJobRequest (#550) bump min golang version (#548) DATA-3054: Added UpdateBoundingBox (#547) RSDK-8595 update docs with new behavior (#546) APP-3604 build endpoints for external oauth and repos (#544) add last updated to fragment proto (#540) APP-5851: Add optional visibility field to `CreateFragmentRequest` (#543) APP-5314 - add dates and limit to GetRobotPartLogsRequest (#538) RSDK-7903 Add unhealthy state and error field (#539) RSDK-8381 add viam server version to API (#537) [APP-5417]: Undo APP-5417 (#536) [APP-5417]: Accommodate pagination for GetRobotPartHistory in api (#535) Data 2816/get training job logs (#534) DATA-2792 - Add URL to UpdateRegistryItemRequest, but make it optional (#532) RSDK-8228 Add config status to machine status API (#531) Add revision field to config (#530) [APP-5420] Add ListMachineFragments request and response (#525) [APP-5400]: Add GetFragmentHistory proto (#524) RSDK-7899 Add MachineStatus to RobotService (#527) RSDK-8083: add LogPatternConfig field to RobotConfig API (#526) ...
What changed
Why
Linking our build service to source control / CI is currently bad; it's super unintuitive and doesn't work with private repos. These endpoints let us use native oauth tools provided by git hosts for something closer to one-click setup. (no more yamls! no need to set up viam credentials).
Note the new endpoints are experimental (the entire build service is still marked as 'subject to change'). They don't work yet and should only be hit by the viam CLI, not external users.