Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc6b7588

Browse files
authored
chore: add organization id to provisioner sdk type (#13883)
* chore: add organization id to provisioner sdk type
1 parent1691768 commitc6b7588

File tree

9 files changed

+40
-15
lines changed

9 files changed

+40
-15
lines changed

‎coderd/apidoc/docs.go

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/apidoc/swagger.json

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/database/db2sdk/db2sdk.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -509,13 +509,14 @@ func Apps(dbApps []database.WorkspaceApp, agent database.WorkspaceAgent, ownerNa
509509

510510
funcProvisionerDaemon(dbDaemon database.ProvisionerDaemon) codersdk.ProvisionerDaemon {
511511
result:= codersdk.ProvisionerDaemon{
512-
ID:dbDaemon.ID,
513-
CreatedAt:dbDaemon.CreatedAt,
514-
LastSeenAt: codersdk.NullTime{NullTime:dbDaemon.LastSeenAt},
515-
Name:dbDaemon.Name,
516-
Tags:dbDaemon.Tags,
517-
Version:dbDaemon.Version,
518-
APIVersion:dbDaemon.APIVersion,
512+
ID:dbDaemon.ID,
513+
OrganizationID:dbDaemon.OrganizationID,
514+
CreatedAt:dbDaemon.CreatedAt,
515+
LastSeenAt: codersdk.NullTime{NullTime:dbDaemon.LastSeenAt},
516+
Name:dbDaemon.Name,
517+
Tags:dbDaemon.Tags,
518+
Version:dbDaemon.Version,
519+
APIVersion:dbDaemon.APIVersion,
519520
}
520521
for_,provisionerType:=rangedbDaemon.Provisioners {
521522
result.Provisioners=append(result.Provisioners,codersdk.ProvisionerType(provisionerType))

‎codersdk/provisionerdaemons.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,15 @@ const (
3636
)
3737

3838
typeProvisionerDaemonstruct {
39-
ID uuid.UUID`json:"id" format:"uuid"`
40-
CreatedAt time.Time`json:"created_at" format:"date-time"`
41-
LastSeenAtNullTime`json:"last_seen_at,omitempty" format:"date-time"`
42-
Namestring`json:"name"`
43-
Versionstring`json:"version"`
44-
APIVersionstring`json:"api_version"`
45-
Provisioners []ProvisionerType`json:"provisioners"`
46-
Tagsmap[string]string`json:"tags"`
39+
ID uuid.UUID`json:"id" format:"uuid"`
40+
OrganizationID uuid.UUID`json:"organization_id" format:"uuid"`
41+
CreatedAt time.Time`json:"created_at" format:"date-time"`
42+
LastSeenAtNullTime`json:"last_seen_at,omitempty" format:"date-time"`
43+
Namestring`json:"name"`
44+
Versionstring`json:"version"`
45+
APIVersionstring`json:"api_version"`
46+
Provisioners []ProvisionerType`json:"provisioners"`
47+
Tagsmap[string]string`json:"tags"`
4748
}
4849

4950
// ProvisionerJobStatus represents the at-time state of a job.

‎docs/api/debug.md

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎docs/api/enterprise.md

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎docs/api/schemas.md

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎site/src/api/typesGenerated.ts

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎site/src/testHelpers/entities.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ export const SuspendedMockUser: TypesGen.User = {
365365
exportconstMockProvisioner:TypesGen.ProvisionerDaemon={
366366
created_at:"2022-05-17T17:39:01.382927298Z",
367367
id:"test-provisioner",
368+
organization_id:MockOrganization.id,
368369
name:"Test Provisioner",
369370
provisioners:["echo"],
370371
tags:{scope:"organization"},
@@ -375,6 +376,7 @@ export const MockProvisioner: TypesGen.ProvisionerDaemon = {
375376
exportconstMockUserProvisioner:TypesGen.ProvisionerDaemon={
376377
created_at:"2022-05-17T17:39:01.382927298Z",
377378
id:"test-user-provisioner",
379+
organization_id:MockOrganization.id,
378380
name:"Test User Provisioner",
379381
provisioners:["echo"],
380382
tags:{scope:"user",owner:"12345678-abcd-1234-abcd-1234567890abcd"},
@@ -3221,6 +3223,7 @@ export const MockHealth: TypesGen.HealthcheckReport = {
32213223
{
32223224
provisioner_daemon:{
32233225
id:"e455b582-ac04-4323-9ad6-ab71301fa006",
3226+
organization_id:MockOrganization.id,
32243227
created_at:"2024-01-04T15:53:03.21563Z",
32253228
last_seen_at:"2024-01-04T16:05:03.967551Z",
32263229
name:"ok",
@@ -3241,6 +3244,7 @@ export const MockHealth: TypesGen.HealthcheckReport = {
32413244
{
32423245
provisioner_daemon:{
32433246
id:"00000000-0000-0000-000000000000",
3247+
organization_id:MockOrganization.id,
32443248
created_at:"2024-01-04T15:53:03.21563Z",
32453249
last_seen_at:"2024-01-04T16:05:03.967551Z",
32463250
name:"user-scoped",
@@ -3261,6 +3265,7 @@ export const MockHealth: TypesGen.HealthcheckReport = {
32613265
{
32623266
provisioner_daemon:{
32633267
id:"e455b582-ac04-4323-9ad6-ab71301fa006",
3268+
organization_id:MockOrganization.id,
32643269
created_at:"2024-01-04T15:53:03.21563Z",
32653270
last_seen_at:"2024-01-04T16:05:03.967551Z",
32663271
name:"unhappy",
@@ -3416,6 +3421,7 @@ export const DeploymentHealthUnhealthy: TypesGen.HealthcheckReport = {
34163421
{
34173422
provisioner_daemon:{
34183423
id:"e455b582-ac04-4323-9ad6-ab71301fa006",
3424+
organization_id:MockOrganization.id,
34193425
created_at:"2024-01-04T15:53:03.21563Z",
34203426
last_seen_at:"2024-01-04T16:05:03.967551Z",
34213427
name:"vvuurrkk-2",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp