-
Notifications
You must be signed in to change notification settings - Fork 962
feat(coderd): add support for external agents to API's and provisioner #19286
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
base: kacpersaw/feat-coder-attach-database
Are you sure you want to change the base?
feat(coderd): add support for external agents to API's and provisioner #19286
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
b641ffe
to
07a9c42
Compare
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.
Proto changes look fine to me 👍
c012284
to
63fefbb
Compare
60cccc2
to
0cf5381
Compare
t.Run("OK Linux", func(t *testing.T) { | ||
t.Parallel() | ||
client := coderdtest.New(t, nil) | ||
script, err := client.InitScript(context.Background(), "linux", "amd64") |
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 should make one of these arm64
for variety, and also assert that the string /bin/coder-OS-ARCH[.exe]
shows up
63fefbb
to
6033188
Compare
4e94ed6
to
5a0bf15
Compare
@@ -223,6 +223,7 @@ func Workspaces(ctx context.Context, db database.Store, query string, page coder | |||
Valid: values.Has("outdated"), | |||
} | |||
filter.HasAITask = parser.NullableBoolean(values, sql.NullBool{}, "has-ai-task") |
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.
Can you also file a ticket to fix has-ai-task
?
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.
Message: "Workspace does not have an external agent.", | ||
}) | ||
return | ||
} |
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 good but I still think the specific agent should be checked as well.
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.
- tests
coderd/coderd.go
Outdated
@@ -180,6 +180,8 @@ type Options struct { | |||
// Entitlements can come from the enterprise caller if enterprise code is | |||
// included. | |||
Entitlements *entitlements.Set | |||
// HasLicense indicates if a license is installed. |
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 should just be a field on entitlements.Set if possible.
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.
Just minor additions to my previous comments
6033188
to
9e885fe
Compare
5a0bf15
to
ed93d09
Compare
enterprise/coderd/workspaceagents.go
Outdated
|
||
found := false | ||
for _, resource := range resources { | ||
if resource.Type == "coder_external_agent" && resource.Name == agentName { |
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.
Wouldn't it be better to see if the agent's parent resource ID is a coder_external_agent
?
…rm resource references
This pull request introduces support for external workspace management, allowing users to register and manage workspaces that are provisioned and managed outside of the Coder.
Depends on: coder/terraform-provider-coder#424