rules_itest icon indicating copy to clipboard operation
rules_itest copied to clipboard

Allow itest_service to not be started at "boot"

Open darkrift opened this issue 1 year ago • 3 comments

The use case is for testing cron jobs. The ask is to not start a specific itest_service to allow the service_test to exclusively start it through svcctl.

This allows to properly setup the environment from the service_test itself before the "job" starts and then assert on the execution.

darkrift avatar Dec 10 '24 16:12 darkrift

Yep this has been on my wishlist but not implemented yet. One thing to think through is the behavior when a non-deferred service depends on a deferred one (and how deps work here in general, I think we may have punted on that for the Start rpc). You interested in giving it a shot?

dzbarsky avatar Dec 10 '24 18:12 dzbarsky

Non-deferred service depending on deferred services doesn't make sense.

We could probably even validate that in Starlark and fail at analysis time.

As for deferred services depending on other deferred services, this could be validated when calling the /start endpoint and validate that all dependencies are currently running.

Wdyt ?

darkrift avatar Dec 11 '24 00:12 darkrift

Sounds good to me!

dzbarsky avatar Dec 11 '24 00:12 dzbarsky