Feature/concurrent v1 v2 service mode#1955
Merged
craiglurey merged 3 commits intoKeeper-Security:masterfrom Apr 13, 2026
Merged
Feature/concurrent v1 v2 service mode#1955craiglurey merged 3 commits intoKeeper-Security:masterfrom
craiglurey merged 3 commits intoKeeper-Security:masterfrom
Conversation
idimov-keeper
approved these changes
Apr 13, 2026
idimov-keeper
approved these changes
Apr 13, 2026
craiglurey
added a commit
that referenced
this pull request
Apr 13, 2026
This reverts commit 4837ba4.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This changes Service Mode so queue-enabled deployments can serve both API versions concurrently:
/api/v2/*remains the native queue-backed API/api/v1/executecommandis now available as a synchronous compatibility endpoint backed by the same queue workerqueue_enabled = nstill preserves the original standalone directv1behaviorThis lets existing
v1integrations continue working while newerv2clients use queue mode in the same service instance.Problem
Historically Service Mode exposed either:
v1direct mode, orv2queue modebut not both at the same time.
That made queue-enabled deployments harder to adopt when existing consumers still depended on
v1.During local concurrency testing, this branch also uncovered and fixes a race where a queued
v1compatibility request could return504to the caller and still execute later once the worker reached it.Changes
/api/v1/executecommandalongside/api/v2/*when queue mode is enabledv1requests through the same request queue used byv2queue_enabled = nv1compatibility andv2v1compatibility requests before executionTesting
Ran locally without logging into Keeper:
python3 -m unittest -q unit-tests.service.test_api_routespython3 -m unittest -q unit-tests.service.test_queue_concurrencypython3 -m unittest -q unit-tests.service.test_service_manager unit-tests.service.test_service_config unit-tests.service.test_create_service unit-tests.service.test_config_operationAdded coverage for:
v1andv2v1v1compatibility behaviorv1andv2requests sharing a single workerv1requests do not execute later