Skip to content

Conversation

@mkoura
Copy link
Collaborator

@mkoura mkoura commented Jan 21, 2026

Introduce a common is_truthy function in Bash scripts and a Python is_truthy_env_var helper to standardize environment variable checks for truthy values. Refactor all relevant Bash and Python scripts to use these helpers, improving consistency and maintainability across the codebase.

Introduce a common `is_truthy` function in Bash scripts and a Python
`is_truthy_env_var` helper to standardize environment variable checks for
truthy values. Refactor all relevant Bash and Python scripts to use these
helpers, improving consistency and maintainability across the codebase.
@mkoura mkoura requested a review from saratomaz as a code owner January 21, 2026 09:42
@mkoura mkoura requested review from Copilot and removed request for saratomaz January 21, 2026 09:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces unified helper functions for checking truthy environment variable values across Bash and Python scripts. The refactoring aims to improve consistency and maintainability by standardizing environment variable checks that were previously implemented inconsistently throughout the codebase.

Changes:

  • Introduces is_truthy() function in .github/common.sh for Bash scripts
  • Adds is_truthy_env_var() helper in cardano_node_tests/utils/helpers.py for Python
  • Refactors all relevant environment variable checks to use these new helpers

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
.github/common.sh New file introducing is_truthy() Bash function that checks for specific truthy values
cardano_node_tests/utils/helpers.py Adds is_truthy_env_var() Python function for standardized truthy checks
cardano_node_tests/utils/configuration.py Refactors multiple environment variable checks to use is_truthy_env_var() helper
cardano_node_tests/tests/test_reconnect.py Updates TEST_RECONNECT and TEST_METRICS_RECONNECT checks to use new helper
cardano_node_tests/tests/conftest.py Updates CI_SKIP_PASSED check to use new helper
.github/source_dbsync.sh Refactors SMASH variable checks to use is_truthy() function
.github/regression.sh Updates CI_BYRON_CLUSTER check and removes obsolete ALLOW_UNSTABLE_ERROR_MESSAGES section
.github/node_upgrade_pytest.sh Updates CI_BYRON_CLUSTER check to use is_truthy() function

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mkoura mkoura merged commit 0bb46a1 into master Jan 21, 2026
9 checks passed
@mkoura mkoura deleted the check_env_vars_truthiness branch January 21, 2026 09:57
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.

2 participants