-
Notifications
You must be signed in to change notification settings - Fork 894
refactor: change template archive extraction to be on provisioner #9264
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
Changes from 10 commits
935719c
a29592a
1f0efb4
2be6cf0
39d6065
e39b8a2
d92608e
0412773
83deae6
d1a9b2a
8d7261f
ef1820f
96e1e64
2805dda
9762158
cf8a48b
3d7b6a8
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 |
---|---|---|
|
@@ -75,9 +75,9 @@ func TestWorkspaceAgent(t *testing.T) { | |
user := coderdtest.CreateFirstUser(t, client) | ||
version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ | ||
Parse: echo.ParseComplete, | ||
ProvisionApply: []*proto.Provision_Response{{ | ||
Type: &proto.Provision_Response_Complete{ | ||
Complete: &proto.Provision_Complete{ | ||
ProvisionApply: []*proto.Response{{ | ||
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 can see that this PR does a lot of renaming. Is it possible to extract them to a separate PR? Maybe it could shrink this PR a bit. 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. It's not really possible to put in a separate PR, since the protocol changes are fundamental, and without renames nothing builds. I've split it out into different commits to reduce the noise 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 admit that I focus mainly on changes in the CLI package like:
but if these are strongly coupled with the protocol, then please ignore the comment. |
||
Type: &proto.Response_Apply{ | ||
Apply: &proto.ApplyComplete{ | ||
Resources: []*proto.Resource{{ | ||
Name: "somename", | ||
Type: "someinstance", | ||
|
@@ -127,9 +127,9 @@ func TestWorkspaceAgent(t *testing.T) { | |
user := coderdtest.CreateFirstUser(t, client) | ||
version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ | ||
Parse: echo.ParseComplete, | ||
ProvisionApply: []*proto.Provision_Response{{ | ||
Type: &proto.Provision_Response_Complete{ | ||
Complete: &proto.Provision_Complete{ | ||
ProvisionApply: []*proto.Response{{ | ||
Type: &proto.Response_Apply{ | ||
Apply: &proto.ApplyComplete{ | ||
Resources: []*proto.Resource{{ | ||
Name: "somename", | ||
Type: "someinstance", | ||
|
@@ -179,9 +179,9 @@ func TestWorkspaceAgent(t *testing.T) { | |
user := coderdtest.CreateFirstUser(t, client) | ||
version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ | ||
Parse: echo.ParseComplete, | ||
ProvisionApply: []*proto.Provision_Response{{ | ||
Type: &proto.Provision_Response_Complete{ | ||
Complete: &proto.Provision_Complete{ | ||
ProvisionApply: []*proto.Response{{ | ||
Type: &proto.Response_Apply{ | ||
Apply: &proto.ApplyComplete{ | ||
Resources: []*proto.Resource{{ | ||
Name: "somename", | ||
Type: "someinstance", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,6 @@ import ( | |
"github.com/prometheus/client_golang/prometheus" | ||
"github.com/prometheus/client_golang/prometheus/collectors" | ||
"github.com/prometheus/client_golang/prometheus/promhttp" | ||
"github.com/spf13/afero" | ||
"go.opentelemetry.io/otel/trace" | ||
"golang.org/x/mod/semver" | ||
"golang.org/x/oauth2" | ||
|
@@ -1304,7 +1303,11 @@ func newProvisionerDaemon( | |
defer wg.Done() | ||
defer cancel() | ||
|
||
err := echo.Serve(ctx, afero.NewOsFs(), &provisionersdk.ServeOptions{Listener: echoServer}) | ||
err := echo.Serve(ctx, &provisionersdk.ServeOptions{ | ||
Listener: echoServer, | ||
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. missing Logger here? |
||
WorkDirectory: workDir, | ||
Logger: logger.Named("echo"), | ||
}) | ||
if err != nil { | ||
select { | ||
case errCh <- err: | ||
|
@@ -1336,10 +1339,11 @@ func newProvisionerDaemon( | |
|
||
err := terraform.Serve(ctx, &terraform.ServeOptions{ | ||
ServeOptions: &provisionersdk.ServeOptions{ | ||
Listener: terraformServer, | ||
Listener: terraformServer, | ||
Logger: logger.Named("terraform"), | ||
WorkDirectory: workDir, | ||
}, | ||
CachePath: tfDir, | ||
Logger: logger.Named("terraform"), | ||
Tracer: tracer, | ||
}) | ||
if err != nil && !xerrors.Is(err, context.Canceled) { | ||
|
@@ -1366,7 +1370,6 @@ func newProvisionerDaemon( | |
UpdateInterval: time.Second, | ||
ForceCancelInterval: cfg.Provisioner.ForceCancelInterval.Value(), | ||
Provisioners: provisioners, | ||
WorkDirectory: workDir, | ||
TracerProvider: coderAPI.TracerProvider, | ||
Metrics: &metrics, | ||
}), nil | ||
|
Uh oh!
There was an error while loading. Please reload this page.