Skip to content

feat: Add parameter and jobs database schema#81

Merged
kylecarbs merged 4 commits intomainfrom
parameterschema
Jan 29, 2022
Merged

feat: Add parameter and jobs database schema#81
kylecarbs merged 4 commits intomainfrom
parameterschema

Conversation

@kylecarbs
Copy link
Copy Markdown
Member

This modifies a prior migration which is typically forbidden,
but because we're pre-production deployment I felt grouping
would be helpful to future contributors.

This adds database functions that are required for the provisioner
daemon and job queue logic.

@kylecarbs kylecarbs self-assigned this Jan 29, 2022
This modifies a prior migration which is typically forbidden,
but because we're pre-production deployment I felt grouping
would be helpful to future contributors.

This adds database functions that are required for the provisioner
daemon and job queue logic.
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 29, 2022

Codecov Report

Merging #81 (2793877) into main (599ea2a) will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #81      +/-   ##
==========================================
+ Coverage   71.84%   71.87%   +0.02%     
==========================================
  Files          88       88              
  Lines        3417     3417              
  Branches       55       55              
==========================================
+ Hits         2455     2456       +1     
+ Misses        753      752       -1     
  Partials      209      209              
Flag Coverage Δ
unittest-go-macos-latest 67.42% <ø> (+0.03%) ⬆️
unittest-go-ubuntu-latest 69.69% <ø> (+0.10%) ⬆️
unittest-go-windows-latest 67.24% <ø> (+0.25%) ⬆️
unittest-js 78.30% <ø> (ø)
Impacted Files Coverage Δ
peer/conn.go 74.69% <0.00%> (+0.30%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 599ea2a...2793877. Read the comment docs.

Comment on lines +27 to +28
UPDATE
SKIP LOCKED
Copy link
Copy Markdown
Contributor

@bryphe-coder bryphe-coder Jan 29, 2022

Choose a reason for hiding this comment

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

question (non-blocking): Just curious why this is necessary?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'll add a comment!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added the following comment:

-- Acquires the lock for a single job that isn't started, completed,
-- cancelled, and that matches an array of provisioner types.
--
-- SKIP LOCKED is used to jump over locked rows. This prevents
-- multiple provisioners from acquiring the same jobs. See:
-- https://www.postgresql.org/docs/9.5/sql-select.html#SQL-FOR-UPDATE-SHARE

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Excellent, thank you!

Copy link
Copy Markdown
Contributor

@bryphe-coder bryphe-coder left a comment

Choose a reason for hiding this comment

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

LGTM 👍

This modifies a prior migration which is typically forbidden,

Seems OK while we're marching towards black-triangle, and there is no production deployment at all yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants