Remove validator for enterprise blobber deployment#172
Remove validator for enterprise blobber deployment#172Jayashsatolia403 wants to merge 2 commits intomainfrom
Conversation
…y, which will break enterprise deployments (no validator service). This link entry should be removed or wrapped under the non-enterprise check. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR removes the validator functionality for enterprise blobber deployments by conditionally executing validator-related commands and configuration changes only when not in enterprise mode.
- Conditionally bypasses wallet creation for validator operations in enterprise deployments.
- Conditionally adds validator routes and services (and related dependencies) only for non-enterprise deployments.
- Updates the docker-compose and Caddyfile configurations with sed commands and heredoc blocks based on deployment type.
Comments suppressed due to low confidence (1)
chimney.sh:304
- The EOF delimiter for the heredoc is indented. For better shell compatibility and to avoid unexpected behavior, consider aligning the EOF marker to the start of the line.
EOF
| sed -i '/depends_on:/a\ - validator' ${PROJECT_ROOT}/docker-compose.yml | ||
| sed -i '/links:/a\ - validator:validator' ${PROJECT_ROOT}/docker-compose.yml |
There was a problem hiding this comment.
Appending the validator dependency via sed may introduce duplicate lines on multiple executions; consider checking if the line already exists before appending it.
| sed -i '/depends_on:/a\ - validator' ${PROJECT_ROOT}/docker-compose.yml | |
| sed -i '/links:/a\ - validator:validator' ${PROJECT_ROOT}/docker-compose.yml | |
| if ! grep -q ' - validator' ${PROJECT_ROOT}/docker-compose.yml; then | |
| sed -i '/depends_on:/a\ - validator' ${PROJECT_ROOT}/docker-compose.yml | |
| fi | |
| if ! grep -q ' - validator:validator' ${PROJECT_ROOT}/docker-compose.yml; then | |
| sed -i '/links:/a\ - validator:validator' ${PROJECT_ROOT}/docker-compose.yml | |
| fi |
| fi | ||
| ./bin/zwallet create-wallet --wallet blob_op_wallet.json --configDir . --config config.yaml --silent | ||
| ./bin/zwallet create-wallet --wallet vald_op_wallet.json --configDir . --config config.yaml --silent | ||
| if [ "$IS_ENTERPRISE" != true ]; then |
There was a problem hiding this comment.
[nitpick] The repeated check for 'if [ "$IS_ENTERPRISE" != true ]' across multiple diff sections suggests an opportunity to refactor this condition into a variable or function to enhance consistency and maintainability.
| if [ "$IS_ENTERPRISE" != true ]; then | |
| if [ "$IS_NOT_ENTERPRISE" = true ]; then |
Chetas1
left a comment
There was a problem hiding this comment.
Line no -> 196 needs to be under condition of non-enterprise
No description provided.