73 Commits

Author SHA1 Message Date
Chris Roberts
4f559c06ab Add string pointer converters 2023-06-05 14:18:06 -07:00
Chris Roberts
eab9ef8e66 Box find should return nil on not found 2023-06-05 14:18:06 -07:00
Chris Roberts
247b6f55d0 Add upsert helpers 2023-06-05 14:18:06 -07:00
Chris Roberts
013837e73c Define and use internal model struct 2023-06-05 14:18:06 -07:00
Chris Roberts
8eafe188a8 Only set or restore values if value exists 2023-06-05 14:18:06 -07:00
Chris Roberts
843d6bf2dc Convert vagrantfile contents to protovalues 2023-06-05 14:18:06 -07:00
Chris Roberts
25e87ee31e Update services interaction with state 2023-06-05 14:18:05 -07:00
Chris Roberts
ab51abc86d Update local test database setup 2023-06-05 14:18:05 -07:00
Chris Roberts
f24ab4d855 Migrate data layer to gorm 2023-06-05 14:18:05 -07:00
Chris Roberts
e125f55688 Remove services and state not required 2023-06-05 14:18:05 -07:00
Chris Roberts
788c5be03a Delete server config state and service 2023-06-05 14:18:05 -07:00
Chris Roberts
b365827f73 Save updated project after deleting target 2022-06-30 11:15:56 -07:00
Chris Roberts
b2aafa2469 Include project ref within target ref when listing targets 2022-06-28 08:38:45 -07:00
Chris Roberts
6f7e17a8b3 Update how configuration is set in tests 2022-06-27 11:22:51 -07:00
Chris Roberts
a8fd255f5b Update configuration type for target 2022-06-15 11:06:33 -07:00
sophia
6e28e0856c Update timestamp whenever a box is updated 2022-06-10 15:05:34 -05:00
Paul Hinze
8b5d4b8631
Update and address protobuf package deprecations
These changes address the following warning showing up on `go get`
operations:

    go: module github.com/golang/protobuf is deprecated: Use the
    "google.golang.org/protobuf" module instead.

All changes are made using the recommendations in the per-function
deprecation notices from the docs at
https://pkg.go.dev/github.com/golang/protobuf/ptypes
2022-06-08 11:51:19 -05:00
sophia
7eccedba12
Add test for box with 0 version number 2022-04-25 12:26:45 -05:00
sophia
fc649b0937
Set first match without version constraint 2022-04-25 12:26:45 -05:00
sophia
8bd9a778e9
Test for non merging configs 2022-04-25 12:26:34 -05:00
sophia
34c4bac2ec
Don't merge Vagrantfile configs when merging targets to upsert to db 2022-04-25 12:26:34 -05:00
sophia
3dbd9286be
Merge targets with upserting 2022-04-25 12:26:23 -05:00
Paul Hinze
c1c215e84e
Round out service tests
* Add tests for service Target and catch a panic
 * Add skipped stub test for Task w/ a note for future us
2022-04-25 12:26:11 -05:00
Paul Hinze
72c72c4f53
Test for server config service
Pretty simple stuff. Also renaming file to match service name
2022-04-25 12:26:11 -05:00
Paul Hinze
e7533103e8
Tests for service project & a small panic guard
Tests helped flush out that we would panic if a project was attempting
to be created without a basis.

Sometimes tests help!
2022-04-25 12:26:11 -05:00
sophia
eddc9d916e
Return empty result when deleting target 2022-04-25 12:26:11 -05:00
Paul Hinze
3df9c55a5c
Service box tests
Continuing with the error messages audit, this service came out the same
as the basis one - I haven't yet found any tests I can write that
expose errors we would want to enhance. In the meantime, more tests are
good though!
2022-04-25 12:26:03 -05:00
Paul Hinze
61d2c80813
Tests for the basis service
Filling these out as a part of a sweep to ensure we return decent error
messages from our GRPC services.

For this service I didn't come up with any error condition that
warranted changing the code yet. The get -> notfound case seems to be
the main one and the pass through error object seems AOK here.
2022-04-25 12:26:03 -05:00
sophia
7aaeaf2e46
Update protos 2022-04-25 12:25:57 -05:00
sophia
a63184ef5f
Test target find and duplicate upserts 2022-04-25 12:25:55 -05:00
sophia
04095d2132
Find targets based on name and project 2022-04-25 12:25:55 -05:00
sophia
eeafbe4954
Search for project and target before upserting 2022-04-25 12:25:55 -05:00
sophia
a99bfc65f9
AUse version constraints to find boxes 2022-04-25 12:25:54 -05:00
sophia
e77cb42171
Add tests 2022-04-25 12:25:54 -05:00
sophia
9d01b2c60e
Add endpoint for finding boxes 2022-04-25 12:25:54 -05:00
sophia
63eb76bd60
Find boxes by name, provider, version 2022-04-25 12:25:54 -05:00
sophia
62d7324bfc
go generate 2022-04-25 12:25:52 -05:00
sophia
a8ce240049
Add tests for box 2022-04-25 12:25:52 -05:00
sophia
5fc9dd94fe
Implement box crub endpoints 2022-04-25 12:25:52 -05:00
sophia
3e3ab869d4
Add box to bolt 2022-04-25 12:25:52 -05:00
sophia
d75f76edf7
Prune old jobs as part of vagrant server clean ups 2022-04-25 12:24:40 -05:00
sophia
57474ac8c8
Periodically prune old jobs from bolt 2022-04-25 12:24:40 -05:00
sophia
2991810e0c
Seperate pruning jobs from memdb and bolt
only prune out old queued jobs in memdb
2022-04-25 12:24:40 -05:00
sophia
21c926523f
Count all the entries in jobs bucket 2022-04-25 12:24:40 -05:00
sophia
63dcc9fbf3
Save point: run prune in background 2022-04-25 12:24:40 -05:00
sophia
4205d0e444
Prune old jobs from state 2022-04-25 12:24:40 -05:00
sophia
772e786eee
Import Waypoint state pruning code
ref: b333b059a0/internal/server/singleprocess/state/prune.go
b333b059a0/internal/server/singleprocess/state/prune_test.go
4f71748610/internal/server/singleprocess/prune.go

Squash: import prune
2022-04-25 12:24:40 -05:00
sophia
f5fe88de15
Add tests for target 2022-04-25 12:24:39 -05:00
sophia
72225abc28
Add test for basis state 2022-04-25 12:24:39 -05:00
sophia
b30bbcb13a
Don't check for 'found' in basis/project/target query results 2022-04-25 12:24:39 -05:00