You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ./init.sh script, which initializes the cBioPortal Docker setup, lacks strict error handling. When a sub-script or command fails, the script continues execution silently, making it difficult for users to diagnose issues—especially on non-Linux systems. Improving error handling will enhance reliability and provide better feedback to contributors.
Problem Description
The script orchestrates multiple sub-scripts responsible for setting up dependencies, environment variables, and databases.
If a sub-script fails, the failure is not always surfaced due to missing error checks, causing the setup to appear successful while being incomplete.
This issue is more prominent on Windows/macOS, where certain shell commands behave differently, leading to hidden failures.
Logs do not always provide clear error messages, making debugging difficult.
Proposed Solution
To improve the robustness of the ./init.sh script, I propose the following changes:
Fail Fast on Errors
Enforce strict error handling using set -e to terminate the script when any command fails.
Use trap to capture errors and print meaningful messages before exiting.
Improve Logging and Debugging
Implement set -x as an optional debug mode to display executed commands.
Add clearer error messages to guide users when failures occur.
Cross-Platform Compatibility Enhancements
Identify problematic shell commands that may behave inconsistently across different platforms.
Replace or document environment-specific dependencies for better cross-OS support.
Enhance Documentation
Update the documentation to include common troubleshooting steps and error-handling mechanisms.
Steps to Reproduce the Issue
Clone the cbioportal-docker-compose repository and follow the setup instructions.
Run ./init.sh on a non-Linux system (e.g., Windows WSL or macOS).
Observe that certain failures occur silently, leading to an incomplete setup.
Expected Behavior
The script should halt immediately when an error occurs.
The failure reason should be clearly logged.
Contributors should be able to diagnose and fix issues more efficiently.
Additional Context
This issue is particularly relevant for new contributors who may struggle with silent failures.
Improving error handling will make onboarding smoother and debugging easier.
Happy to work on this and submit a PR!
The text was updated successfully, but these errors were encountered:
Issue Summary
The
./init.sh
script, which initializes the cBioPortal Docker setup, lacks strict error handling. When a sub-script or command fails, the script continues execution silently, making it difficult for users to diagnose issues—especially on non-Linux systems. Improving error handling will enhance reliability and provide better feedback to contributors.Problem Description
Proposed Solution
To improve the robustness of the
./init.sh
script, I propose the following changes:Fail Fast on Errors
set -e
to terminate the script when any command fails.trap
to capture errors and print meaningful messages before exiting.Improve Logging and Debugging
set -x
as an optional debug mode to display executed commands.Cross-Platform Compatibility Enhancements
Enhance Documentation
Steps to Reproduce the Issue
cbioportal-docker-compose
repository and follow the setup instructions../init.sh
on a non-Linux system (e.g., Windows WSL or macOS).Expected Behavior
Additional Context
The text was updated successfully, but these errors were encountered: