Skip to content

OTel bearertokenauth registered unconditionally on Kubernetes due to operator precedence #163

Description

@khaledsulayman

Bug

In src/server/deployers/otel.ts line 96, the condition:

if (config.mode === "kubernetes" || config.mode === "openshift" && config.otelExperimentId)

evaluates as kubernetes || (openshift && experimentId) because && binds tighter than ||. This means the bearertokenauth extension is always registered on Kubernetes regardless of whether an experiment ID is set — but on OpenShift it's only registered when one is.

Expected behavior

bearertokenauth should only be registered when both:

  1. The mode is kubernetes or openshift, and
  2. An otelExperimentId is configured

Fix

Wrap the mode check in parentheses:

if ((config.mode === "kubernetes" || config.mode === "openshift") && config.otelExperimentId)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions