Enforce unique names for services
Summary
Only allow services with unique names to be started via the octue start
CLI command. This ensures that, when using the command:
- A new service can't intercept/receive questions meant for an existing service of the same name
- When running a service locally that's already deployed, a modified service name is generated and used, preventing the deletion of the deployed service's topic/subscription on exit
Contents (#515)
IMPORTANT: There is 1 breaking change.
Enhancements
- 💥 BREAKING CHANGE: Remove the
--rm
option and instead delete the service topic and subscription by default on exit of theoctue start
CLI command - Add
--no-rm
flag tooctue start
to avoid topic and subscription deletion - Allow
octue start
users to create a service with a variant of the ID inoctue.yaml
if the service already exists - Add
allow_existing
parameter toService.serve
and default it toFalse
(it was alwaysTrue
within the method before) - Add
creation_triggered_locally
property toTopic
andSubscription
to facilitate avoiding deletion of subscriptions and topics that weren't created by the local service
Fixes
- Don't allow answer subscriptions to already exist
- Don't allow a service to be started by
octue start
if its ID is the same as an existing service's ID - Ensure "what next" log message for starting a service is displayed at the right time
Testing
- Speed up
Topic.exists
test - Simplify
Topic
tests
Operations
- Improve table generated by version compatibility table printing script
Upgrade instructions
💥 Delete topic/subscription at end of octue start command by default
Stop providing the --rm
/ --delete-topic-and-subscription-on-exit
option to the octue start
CLI command. Use the --no-rm
flag or deploy your service if you want the service topic and subscription to persist after exiting this command.