Skip to content

feat(coderd): add endpoint to list provisioner daemons #16028

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

Merged
merged 7 commits into from
Jan 14, 2025

Conversation

mafredri
Copy link
Member

@mafredri mafredri commented Jan 3, 2025

@mafredri mafredri changed the title feat(coderd): add endpoint to list provisioner daemons [1/2] feat(coderd): add endpoint to list provisioner daemons Jan 3, 2025
@mafredri mafredri changed the title [1/2] feat(coderd): add endpoint to list provisioner daemons [1/3] feat(coderd): add endpoint to list provisioner daemons Jan 3, 2025
@mafredri mafredri changed the title [1/3] feat(coderd): add endpoint to list provisioner daemons [1/3] make fmt Jan 3, 2025
@mafredri mafredri force-pushed the mafredri/feat-coderd-provisioner-list branch 2 times, most recently from ebaf498 to ed828f6 Compare January 3, 2025 16:13
@mafredri mafredri changed the title [1/3] make fmt [1/3] feat(coderd): add endpoint to list provisioner daemons Jan 3, 2025
@mafredri mafredri force-pushed the mafredri/feat-coderd-provisioner-list branch 2 times, most recently from 8bee6f5 to d76be47 Compare January 3, 2025 16:54
@mafredri mafredri changed the title [1/3] feat(coderd): add endpoint to list provisioner daemons feat(coderd): add endpoint to list provisioner daemons Jan 3, 2025
@mafredri
Copy link
Member Author

mafredri commented Jan 3, 2025

Not sure why windows runner is failing here 🤔

=== FAIL: coderd/database/dbauthz TestMethodTestSuite/TestExtraMethods/GetProvisionerDaemonsWithStatusByOrganization/Success (0.00s)
    setup_test.go:203: 
        	Error Trace:	C:/a/coder/coder/coderd/database/dbauthz/setup_test.go:203
        	            				C:/Users/runneradmin/go/pkg/mod/github.com/stretchr/testify@v1.10.0/suite/suite.go:115
        	Error:      	elements differ
        	            	
        	            	extra elements in list A:
        	            	([]interface {}) (len=1) {
        	            	 (database.GetProvisionerDaemonsWithStatusByOrganizationRow) {
        	            	  ProvisionerDaemon: (database.ProvisionerDaemon) {
        	            	   ID: (uuid.UUID) (len=16) {
        	            	    00000000  98 57 f5 57 c7 53 47 09  80 2e 72 90 50 81 e7 f8  |.W.W.SG...r.P...|
        	            	   },
        	            	   CreatedAt: (time.Time) {
        	            	    wall: (uint64) 582280000,
        	            	    ext: (int64) 63871520406,
        	            	    loc: (*time.Location)(<nil>)
        	            	   },
        	            	   Name: (string) (len=15) "hardcore_cerf10",
        	            	   Provisioners: ([]database.ProvisionerType) (len=1) {
        	            	    (database.ProvisionerType) (len=4) "echo"
        	            	   },
        	            	   ReplicaID: (uuid.NullUUID) {
        	            	    UUID: (uuid.UUID) (len=16) {
        	            	     00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
        	            	    },
        	            	    Valid: (bool) false
        	            	   },
        	            	   Tags: (database.StringMap) (len=1) {
        	            	    (string) (len=5) "scope": (string) (len=12) "organization"
        	            	   },
        	            	   LastSeenAt: (sql.NullTime) {
        	            	    Time: (time.Time) {
        	            	     wall: (uint64) 582280000,
        	            	     ext: (int64) 63871520406,
        	            	     loc: (*time.Location)(<nil>)
        	            	    },
        	            	    Valid: (bool) true
        	            	   },
        	            	   Version: (string) (len=6) "v0.0.0",
        	            	   APIVersion: (string) (len=3) "1.1",
        	            	   OrganizationID: (uuid.UUID) (len=16) {
        	            	    00000000  19 04 e0 b1 c3 7c 4b 11  82 9e 22 ed 94 3b 29 f9  |.....|K..."..;).|
        	            	   },
        	            	   KeyID: (uuid.UUID) (len=16) {
        	            	    00000000  28 00 07 a5 14 bc 4c 95  bd 51 b5 10 70 04 57 af  |(.....L..Q..p.W.|
        	            	   }
        	            	  },
        	            	  Status: (database.ProvisionerDaemonStatus) (len=4) "idle",
        	            	  KeyName: (string) (len=19) "hardcore_cerf10-key",
        	            	  CurrentJobID: (uuid.NullUUID) {
        	            	   UUID: (uuid.UUID) (len=16) {
        	            	    00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
        	            	   },
        	            	   Valid: (bool) false
        	            	  },
        	            	  CurrentJobStatus: (database.NullProvisionerJobStatus) {
        	            	   ProvisionerJobStatus: (database.ProvisionerJobStatus) "",
        	            	   Valid: (bool) false
        	            	  },
        	            	  CurrentJobStatus: (database.NullProvisionerJobStatus) {
        	            	   ProvisionerJobStatus: (database.ProvisionerJobStatus) "",
        	            	   Valid: (bool) false
        	            	  },
        	            	  PreviousJobID: (uuid.NullUUID) {
        	            	   UUID: (uuid.UUID) (len=16) {
        	            	    00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
        	            	   },
        	            	   Valid: (bool) false
        	            	  },
        	            	  PreviousJobStatus: (database.NullProvisionerJobStatus) {
        	            	   ProvisionerJobStatus: (database.ProvisionerJobStatus) "",
        	            	   Valid: (bool) false
        	            	  }
        	            	 }
        	            	}
        	Test:       	TestMethodTestSuite/TestExtraMethods/GetProvisionerDaemonsWithStatusByOrganization/Success
        	Messages:   	method "GetProvisionerDaemonsWithStatusByOrganization" returned unexpected output 0

@mafredri mafredri requested review from johnstcn, Emyrk and mtojek January 7, 2025 09:03
@johnstcn
Copy link
Member

johnstcn commented Jan 7, 2025

Not sure why windows runner is failing here 🤔

A is idle, B is offline -- so it looks like the row immediately returned is different versus what you get back when you query. Only on windows though 🤔

Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mainly comments on SQL

@mafredri mafredri force-pushed the mafredri/feat-coderd-provisioner-list branch 4 times, most recently from 0bf651b to 6cd4bfa Compare January 14, 2025 10:50
@mafredri mafredri requested review from mtojek and johnstcn January 14, 2025 14:12
Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking comments on my side!

@mafredri mafredri force-pushed the mafredri/feat-coderd-provisioner-list branch 2 times, most recently from fb4c933 to aed586b Compare January 14, 2025 14:45
@mafredri mafredri force-pushed the mafredri/feat-coderd-provisioner-list branch from aed586b to 2ad4bb4 Compare January 14, 2025 16:21
@mafredri mafredri enabled auto-merge (squash) January 14, 2025 16:35
@mafredri mafredri merged commit 071bb26 into main Jan 14, 2025
36 checks passed
@mafredri mafredri deleted the mafredri/feat-coderd-provisioner-list branch January 14, 2025 16:40
@github-actions github-actions bot locked and limited conversation to collaborators Jan 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants