Skip to content

Conversation

@Jayashsatolia403
Copy link
Contributor

No description provided.

This comment was marked as outdated.

…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]>
@Jayashsatolia403 Jayashsatolia403 requested a review from Copilot June 4, 2025 15:39
Copy link

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 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

Comment on lines +523 to +524
sed -i '/depends_on:/a\ - validator' ${PROJECT_ROOT}/docker-compose.yml
sed -i '/links:/a\ - validator:validator' ${PROJECT_ROOT}/docker-compose.yml
Copy link

Copilot AI Jun 4, 2025

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI Jun 4, 2025

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.

Suggested change
if [ "$IS_ENTERPRISE" != true ]; then
if [ "$IS_NOT_ENTERPRISE" = true ]; then

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@Chetas1 Chetas1 left a 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

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.

3 participants