- Notifications
You must be signed in to change notification settings - Fork1.1k
chore: track terraform modules in telemetry#15450
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
0f713ed82c8a3c307a57e2ae16fc7f2f155863235d993f0abe8fbd405c542e59ec5ee1119a6863a5a0253377d22422b11246b9b36f3f4d5c93ed136301a153212e7d5e9b7c4625cba6d780730fb47a01803be52e00b81314187fbf7e82c3d42e57ca368fc2573b22cf7b9d70aea823138564e9ad11fc82File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -2666,6 +2666,20 @@ func (q *querier) GetWorkspaceByWorkspaceAppID(ctx context.Context, workspaceApp | ||
| return fetch(q.log, q.auth, q.db.GetWorkspaceByWorkspaceAppID)(ctx, workspaceAppID) | ||
| } | ||
| func (q *querier) GetWorkspaceModulesByJobID(ctx context.Context, jobID uuid.UUID) ([]database.WorkspaceModule, error) { | ||
| if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceSystem); err != nil { | ||
Member 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. note: | ||
| return nil, err | ||
| } | ||
| return q.db.GetWorkspaceModulesByJobID(ctx, jobID) | ||
| } | ||
| func (q *querier) GetWorkspaceModulesCreatedAfter(ctx context.Context, createdAt time.Time) ([]database.WorkspaceModule, error) { | ||
| if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceSystem); err != nil { | ||
| return nil, err | ||
| } | ||
| return q.db.GetWorkspaceModulesCreatedAfter(ctx, createdAt) | ||
| } | ||
| func (q *querier) GetWorkspaceProxies(ctx context.Context) ([]database.WorkspaceProxy, error) { | ||
| return fetchWithPostFilter(q.auth, policy.ActionRead, func(ctx context.Context, _ interface{}) ([]database.WorkspaceProxy, error) { | ||
| return q.db.GetWorkspaceProxies(ctx) | ||
| @@ -3222,6 +3236,13 @@ func (q *querier) InsertWorkspaceBuildParameters(ctx context.Context, arg databa | ||
| return q.db.InsertWorkspaceBuildParameters(ctx, arg) | ||
| } | ||
| func (q *querier) InsertWorkspaceModule(ctx context.Context, arg database.InsertWorkspaceModuleParams) (database.WorkspaceModule, error) { | ||
| if err := q.authorizeContext(ctx, policy.ActionCreate, rbac.ResourceSystem); err != nil { | ||
| return database.WorkspaceModule{}, err | ||
| } | ||
| return q.db.InsertWorkspaceModule(ctx, arg) | ||
| } | ||
| func (q *querier) InsertWorkspaceProxy(ctx context.Context, arg database.InsertWorkspaceProxyParams) (database.WorkspaceProxy, error) { | ||
| return insert(q.log, q.auth, rbac.ResourceWorkspaceProxy, q.db.InsertWorkspaceProxy)(ctx, arg) | ||
| } | ||
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| DROP TABLE workspace_modules; | ||
| ALTER TABLE | ||
| workspace_resources | ||
| DROP COLUMN module_path; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| ALTER TABLE | ||
| workspace_resources | ||
| ADD | ||
| COLUMN module_path TEXT; | ||
| CREATE TABLE workspace_modules ( | ||
| id uuid NOT NULL, | ||
| job_id uuid NOT NULL REFERENCES provisioner_jobs (id) ON DELETE CASCADE, | ||
| transition workspace_transition NOT NULL, | ||
| source TEXT NOT NULL, | ||
| version TEXT NOT NULL, | ||
| key TEXT NOT NULL, | ||
| created_at timestamp with time zone NOT NULL | ||
| ); | ||
| CREATE INDEX workspace_modules_created_at_idx ON workspace_modules (created_at); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| INSERT INTO | ||
| public.workspace_modules ( | ||
| id, | ||
| job_id, | ||
| transition, | ||
| source, | ||
| version, | ||
| key, | ||
| created_at | ||
| ) | ||
| VALUES | ||
| ( | ||
| '5b1a722c-b8a0-40b0-a3a0-d8078fff9f6c', | ||
| '424a58cb-61d6-4627-9907-613c396c4a38', | ||
| 'start', | ||
| 'test-source', | ||
| 'v1.0.0', | ||
| 'test-key', | ||
| '2024-11-08 10:00:00+00' | ||
| ); |
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.