Skip to content

fix: correct SPARK_ON_K8S_IN_CLUSTER boolean parsing from env var#144

Draft
hussein-awala wants to merge 1 commit intomainfrom
fix/in-cluster-boolean-parsing
Draft

fix: correct SPARK_ON_K8S_IN_CLUSTER boolean parsing from env var#144
hussein-awala wants to merge 1 commit intomainfrom
fix/in-cluster-boolean-parsing

Conversation

@hussein-awala
Copy link
Owner

Summary

  • bool(getenv("SPARK_ON_K8S_IN_CLUSTER", False)) always evaluates to True when the env var is set to any value (including "false") because getenv returns a string and bool("false") is True
  • Changed to use getenv(...).lower() == "true" for correct boolean parsing, consistent with how SPARK_ON_K8S_UI_REVERSE_PROXY is already handled

Test plan

  • Verify SPARK_ON_K8S_IN_CLUSTER=false correctly evaluates to False
  • Verify SPARK_ON_K8S_IN_CLUSTER=true correctly evaluates to True
  • Verify unset env var defaults to False

🤖 Generated with Claude Code

`bool(getenv("SPARK_ON_K8S_IN_CLUSTER", False))` always evaluates to
True when the env var is set because getenv returns a string and
bool("false") is True. Use string comparison instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant