-
Notifications
You must be signed in to change notification settings - Fork 2
Remove validator for enterprise blobber deployment #172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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 <[email protected]>
There was a problem hiding this 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 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 |
Copilot
AI
Jun 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
Copilot
AI
Jun 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line no -> 196 needs to be under condition of non-enterprise
No description provided.