Skip to content

DeploymentResolver selects deployments with status Stopped #888

@Raphael-Kleindienst

Description

@Raphael-Kleindienst

Describe the Problem/Bug

For our Orchestrationclient configuration we followed the documentation here to dynamically set the resource group for our OrchestrationClient.

This works, but if multiple orchestration deployments exist within the resource group then they are selected randomly or round-robin at run-time. In our case, one of the orchestration deployments had "status": "STOPPED", leading to requests failing at random and with a misleading log-message ("Response from AI Core: Request failed with status 404 (Not Found): The response Content-Type is not JSON")

Please consider changing the way deployments are selected, so only active/running deployments are selected.

Steps to Reproduce

  1. Deploy multiple orchestration deployments to same resource group
  2. Stop one of the deployments
  3. Set up code as described

Expected Behavior

Only running deployments are selected at runtime

Screenshots

No response

Used Versions

    <dependency>
        <groupId>com.sap.ai.sdk</groupId>
        <artifactId>core</artifactId>
        <version>1.17.0</version>
    </dependency>

Code Examples

@Configuration
open class OrchestrationClientConfig(
    @Value("\${aicore.resource-group}") private val resourceGroup: String,
) {

    @Bean
    open fun orchestrationClient(): OrchestrationClient {
        val destination: HttpDestination  = AiCoreService().getInferenceDestination(resourceGroup).forScenario("orchestration")
        return OrchestrationClient(destination)
    }
}

Stack Trace

No response

Log File

Log file ...

Affected Development Phase

Production

Impact

Inconvenience

Timeline

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions