-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat(worker): get available workers #773
base: main
Are you sure you want to change the base?
Conversation
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.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
golangci
api/worker.go|354 col 30| input.GetRunningBuildIDs undefined (type *library.Worker has no field or method GetRunningBuildIDs)
api/worker.go|357 col 11| input.GetLastBuildFinishedAt undefined (type *library.Worker has no field or method GetLastBuildFinishedAt)
api/worker.go|357 col 11| too many errors) (typecheck)
api/worker.go|342 col 15| input.GetStatus undefined (type *library.Worker has no field or method GetStatus)
api/worker.go|344 col 5| w.SetStatus undefined (type *library.Worker has no field or method SetStatus)
api/worker.go|344 col 21| input.GetStatus undefined (type *library.Worker has no field or method GetStatus)
api/worker.go|347 col 11| input.GetLastStatusUpdateAt undefined (type *library.Worker has no field or method GetLastStatusUpdateAt)
api/worker.go|349 col 5| w.SetLastStatusUpdateAt undefined (type *library.Worker has no field or method SetLastStatusUpdateAt)
api/worker.go|349 col 33| input.GetLastStatusUpdateAt undefined (type *library.Worker has no field or method GetLastStatusUpdateAt)
api/worker.go|352 col 15| input.GetRunningBuildIDs undefined (type *library.Worker has no field or method GetRunningBuildIDs)
api/worker.go|354 col 5| w.SetRunningBuildIDs undefined (type *library.Worker has no field or method SetRunningBuildIDs)
api/worker.go|354 col 30| input.GetRunningBuildIDs undefined (type *library.Worker has no field or method GetRunningBuildIDs)
api/worker.go|357 col 11| input.GetLastBuildFinishedAt undefined (type *library.Worker has no field or method GetLastBuildFinishedAt)
api/worker.go|357 col 11| too many errors (typecheck)
database/worker/list_by_status_test.go|22 col 13| _workerOne.SetStatus undefined (type *library.Worker has no field or method SetStatus)
database/worker/list_by_status_test.go|29 col 13| _workerTwo.SetStatus undefined (type *library.Worker has no field or method SetStatus)
database/worker/list_by_status_test.go|36 col 15| _workerThree.SetStatus undefined (type *library.Worker has no field or method SetStatus)
database/worker/worker_test.go|178 col 3| unknown field Status in struct literal of type library.Worker
database/worker/worker_test.go|179 col 3| unknown field LastStatusUpdateAt in struct literal of type library.Worker
database/worker/worker_test.go|180 col 3| unknown field RunningBuildIDs in struct literal of type library.Worker
database/worker/worker_test.go|181 col 3| unknown field LastBuildFinishedAt in struct literal of type library.Worker (typecheck)
router/middleware/worker/worker_test.go|45 col 7| want.SetStatus undefined (type *library.Worker has no field or method SetStatus)
router/middleware/worker/worker_test.go|46 col 7| want.SetLastStatusUpdateAt undefined (type *library.Worker has no field or method SetLastStatusUpdateAt)
router/middleware/worker/worker_test.go|47 col 7| want.SetRunningBuildIDs undefined (type *library.Worker has no field or method SetRunningBuildIDs)
router/middleware/worker/worker_test.go|48 col 7| want.SetLastBuildFinishedAt undefined (type *library.Worker has no field or method SetLastBuildFinishedAt) (typecheck)
@@ -311,6 +339,31 @@ | |||
w.SetActive(input.GetActive()) | |||
} | |||
|
|||
if len(input.GetStatus()) > 0 { |
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.
🚫 [golangci] reported by reviewdog 🐶
input.GetStatus undefined (type *library.Worker has no field or method GetStatus)
@@ -311,6 +339,31 @@ | |||
w.SetActive(input.GetActive()) | |||
} | |||
|
|||
if len(input.GetStatus()) > 0 { | |||
// update status if set | |||
w.SetStatus(input.GetStatus()) |
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.
🚫 [golangci] reported by reviewdog 🐶
w.SetStatus undefined (type *library.Worker has no field or method SetStatus)
@@ -311,6 +339,31 @@ | |||
w.SetActive(input.GetActive()) | |||
} | |||
|
|||
if len(input.GetStatus()) > 0 { | |||
// update status if set | |||
w.SetStatus(input.GetStatus()) |
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.
🚫 [golangci] reported by reviewdog 🐶
input.GetStatus undefined (type *library.Worker has no field or method GetStatus)
w.SetStatus(input.GetStatus()) | ||
} | ||
|
||
if input.GetLastStatusUpdateAt() > 0 { |
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.
🚫 [golangci] reported by reviewdog 🐶
input.GetLastStatusUpdateAt undefined (type *library.Worker has no field or method GetLastStatusUpdateAt)
|
||
if input.GetLastStatusUpdateAt() > 0 { | ||
// update LastStatusUpdateAt if set | ||
w.SetLastStatusUpdateAt(input.GetLastStatusUpdateAt()) |
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.
🚫 [golangci] reported by reviewdog 🐶
w.SetLastStatusUpdateAt undefined (type *library.Worker has no field or method SetLastStatusUpdateAt)
w.SetStatus(input.GetStatus()) | ||
} | ||
|
||
if input.GetLastStatusUpdateAt() > 0 { |
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.
🚫 [golangci] reported by reviewdog 🐶
input.GetLastStatusUpdateAt undefined (type *library.Worker has no field or method GetLastStatusUpdateAt)
|
||
if input.GetLastStatusUpdateAt() > 0 { | ||
// update LastStatusUpdateAt if set | ||
w.SetLastStatusUpdateAt(input.GetLastStatusUpdateAt()) |
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.
🚫 [golangci] reported by reviewdog 🐶
w.SetLastStatusUpdateAt undefined (type *library.Worker has no field or method SetLastStatusUpdateAt)
|
||
if input.GetLastStatusUpdateAt() > 0 { | ||
// update LastStatusUpdateAt if set | ||
w.SetLastStatusUpdateAt(input.GetLastStatusUpdateAt()) |
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.
🚫 [golangci] reported by reviewdog 🐶
input.GetLastStatusUpdateAt undefined (type *library.Worker has no field or method GetLastStatusUpdateAt)
w.SetLastStatusUpdateAt(input.GetLastStatusUpdateAt()) | ||
} | ||
|
||
if len(input.GetRunningBuildIDs()) > 0 { |
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.
🚫 [golangci] reported by reviewdog 🐶
input.GetRunningBuildIDs undefined (type *library.Worker has no field or method GetRunningBuildIDs)
|
||
if len(input.GetRunningBuildIDs()) > 0 { | ||
// update RunningBuildIDs if set | ||
w.SetRunningBuildIDs(input.GetRunningBuildIDs()) |
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.
🚫 [golangci] reported by reviewdog 🐶
w.SetRunningBuildIDs undefined (type *library.Worker has no field or method SetRunningBuildIDs)
dependent on #772
additional tests and swagger info to come