Skip to content

Environment variable (e.g., BATCH_JOIN_TIMEOUT) is read as string, causing TypeError in comparisons #6909

@gurgenyegor

Description

@gurgenyegor

When running Snuba in Kubernetes, environment variables (such as BATCH_JOIN_TIMEOUT) are always provided as strings. However, Snuba’s code appears to compare them as if they were integers, leading to an error:

TypeError: '>' not supported between instances of 'str' and 'int'

Steps to reproduce

  1. Deploy Snuba (getsentry/snuba) in a Kubernetes environment.
  2. Set the environment variable BATCH_JOIN_TIMEOUT=120 (or any numeric value) in the Deployment spec.
  3. Observe Snuba logs on startup or during runtime, where a TypeError is raised when comparing the string to an integer.

Metadata

Metadata

Assignees

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions