Skip to content
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: Add parameter and jobs database schema #81

Merged
merged 4 commits into from
Jan 29, 2022
Merged

Conversation

kylecarbs
Copy link
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.

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

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
Contributor

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
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
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
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
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

@kylecarbs kylecarbs merged commit b503c8b into main Jan 29, 2022
@kylecarbs kylecarbs deleted the parameterschema branch January 29, 2022 23:38
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.

None yet

2 participants