Commit Graph
6 Commits
Author SHA1 Message Date
Jeff Mitchell 9b271d7dd8 Fix error about unimplemented HcpbWorkers call (#2361)
Although there is a compile time check on the type, it will always
succeed due to the Unimplemented embedding requirement.

As a result, this PR also changes Unimplemented calls to Unsafe calls,
which were added later "for those that prefer their code to break"; the
comments on these state:

// UnsafeXServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to XServiceServer will
// result in compilation errors.

See https://github.com/grpc/grpc-go/issues/4500#issuecomment-852597871
for some more context.

I think we're fine with compilation errors though; we own both the
server and client side of things and generally are going to add new
methods only when we intend to also add them on the client side.
Notably, what the comment does not indicate is that it will break at
runtime; already it should return a suitable (404 or 405) error if the
client requests a method that does not exist.
2022-08-30 14:22:10 -04:00
Johan Brandhorst-Satzkorn aef9073fa6 Upgrade to Go 1.19 (#2347) 2022-08-25 12:12:24 -04:00
Todd 19b549c44a Rename package servers to server (#2222) 2022-06-20 18:20:17 -07:00
Jim aaf669a044 fix (API): check attributes missing appropriately. (#2219)
* fix (API): check attributes missing appropriately.
2022-06-19 10:55:37 -04:00
Damian DebkowskiandJohan Brandhorst-Satzkorn 3441fa0447 (fix) added more context to error details for cli command (#2170)
* (test) added more context to error details for cli commands

* (fix) refactor solution to utilize custom error type casting

* (test) added api unit test to validate InvalidArgumentError return message

* Update internal/types/subtypes/error.go

Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>

* (refactor) rename InvalidArgumentError into UnknownSubtypeIDError

Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
2022-06-14 08:52:53 -07:00
Todd b58dada40d Move the server daemons into their own package (#2061)
* Move the server daemons into their own package

With this change the internal/server package now is dedicated to the server domain (workers and controllers) and not to the server daemons.
The hope is that this will make it easier to keep the daemons decoupled from the representation of the servers in the database.
2022-05-09 12:45:10 -07:00