Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
bd25ad9
feat(worker-availability): extend worker table with 4 fields
KellyMerrick Feb 27, 2023
a38c69f
Merge branch 'main' into worker_visibility
KellyMerrick Feb 27, 2023
723e453
fix(main): merge main into branch
KellyMerrick Apr 6, 2023
5483e0f
fix(api-metrics.go): fix merge conflicts
KellyMerrick Apr 6, 2023
fdb8cb8
Merge branch 'worker_visibility' of github.com:go-vela/server into wo…
KellyMerrick Apr 6, 2023
822800a
fix(api-worker.go): clean up merge text
KellyMerrick Apr 6, 2023
98691a5
Merge branch 'main' into worker_visibility
KellyMerrick Apr 12, 2023
540d7d0
fix(api/worker.go): correct closing brace
KellyMerrick Apr 12, 2023
55dba0a
Merge branch 'main' of github.com:go-vela/server into worker_visibility
KellyMerrick Apr 26, 2023
11f5a1e
Merge branch 'main' into worker_visibility
KellyMerrick Apr 26, 2023
e1f128c
feat(metrics.go): update list of worker statuses; merge in main
KellyMerrick May 17, 2023
56f3e25
Merge branch 'worker_visibility' of github.com:go-vela/server into wo…
KellyMerrick May 17, 2023
b9ae9af
feat(metrics.go): add idle_worker_count
KellyMerrick May 18, 2023
49ca50d
feat(worker): modify permissions to all worker for work towards updat…
KellyMerrick May 22, 2023
e5e7c08
fix(runningBuildIDs): allow nil update to list
KellyMerrick May 31, 2023
e8eda6a
feat(worker): update last_status_update_at in the database
KellyMerrick Jun 1, 2023
4d79db4
feat(worker): add LastBuildStartedAt field
KellyMerrick Jun 2, 2023
6073481
fix(worker): allow update of last build started and finished
KellyMerrick Jun 2, 2023
b4f39c4
Merge branch 'main' into worker_visibility
KellyMerrick Jun 2, 2023
3f60d07
Merge branch 'main' of github.com:go-vela/server into worker_visibility
KellyMerrick Jun 2, 2023
2e22e2f
Merge branch 'main' of github.com:go-vela/server into worker_visibility
KellyMerrick Jun 8, 2023
1d36eb7
Merge branch 'main' of github.com:go-vela/server into worker_visibility
KellyMerrick Jun 8, 2023
99541ac
test(worker): ensure all new fields are added to relevant tests
KellyMerrick Jun 8, 2023
b2707d9
Merge branch 'worker_visibility' of github.com:go-vela/server into wo…
KellyMerrick Jun 8, 2023
d3dd14f
Merge branch 'main' of github.com:go-vela/server into worker_visibility
KellyMerrick Jun 12, 2023
a79873a
chore(worker_visibility): pull in types and server main
KellyMerrick Jun 12, 2023
8640cd0
chore(worker_visibility): pull in types and server main
KellyMerrick Jun 14, 2023
c648ab8
addressed feedback
timhuynh94 Jun 14, 2023
999a1db
fix(running_build_ids): correct copy/paste, size should be 500
KellyMerrick Jun 15, 2023
56aea85
fix(running-builds): not requiring a list in body for updates
KellyMerrick Jun 15, 2023
60996b8
Merge branch 'main' into worker_visibility
KellyMerrick Jun 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(worker): add LastBuildStartedAt field
  • Loading branch information
KellyMerrick committed Jun 2, 2023
commit 4d79db4b6fe3df180a78b7ee81fd06c031e6beb3
5 changes: 5 additions & 0 deletions api/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,11 @@ func UpdateWorker(c *gin.Context) {
w.SetRunningBuildIDs(input.GetRunningBuildIDs())

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) (typecheck)

}

if input.GetLastBuildStartedAt() > 0 {
// update LastBuildStartedAt if set
w.SetLastBuildStartedAt(input.GetLastBuildStartedAt())
}

if input.GetLastBuildFinishedAt() > 0 {

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.GetLastBuildFinishedAt undefined (type *library.Worker has no field or method GetLastBuildFinishedAt) (typecheck)

// update LastBuildFinishedAt if set
w.SetLastBuildFinishedAt(input.GetLastBuildFinishedAt())

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.SetLastBuildFinishedAt undefined (type *library.Worker has no field or method SetLastBuildFinishedAt) (typecheck)

Expand Down
4 changes: 2 additions & 2 deletions database/worker/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ func TestWorker_Engine_CreateWorker(t *testing.T) {

// ensure the mock expects the query
_mock.ExpectQuery(`INSERT INTO "workers"
("hostname","address","routes","active","status","last_status_update_at","running_build_ids","last_build_finished_at","last_checked_in","build_limit","id")
("hostname","address","routes","active","status","last_status_update_at","running_build_ids","last_build_started_at","last_checked_in","build_limit","id")
VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11) RETURNING "id"`).
WithArgs("worker_0", "localhost", nil, true, nil, nil, nil, nil, nil, nil, 1).
WithArgs("worker_0", "localhost", nil, true, nil, nil, nil, nil, nil, nil, nil, 1).
WillReturnRows(_rows)

_sqlite := testSqlite(t)
Expand Down
2 changes: 2 additions & 0 deletions database/worker/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ workers (
status VARCHAR(50),
last_status_update_at INTEGER,
running_build_ids VARCHAR(1000),
last_build_started_at INTEGER,
last_build_finished_at INTEGER,
last_checked_in INTEGER,
build_limit INTEGER,
Expand All @@ -41,6 +42,7 @@ workers (
status VARCHAR(50),
last_status_update_at INTEGER,
running_build_ids VARCHAR(1000),
last_build_started_at INTEGER,
last_build_finished_at INTEGER,
last_checked_in INTEGER,
build_limit INTEGER,
Expand Down