Skip to content

refactor: enhance deploy_preview.sh script for improved AWS configura…#41042

Merged
pratapaprasanna merged 1 commit intoreleasefrom
fix/modify/helm/with/set
Jun 25, 2025
Merged

refactor: enhance deploy_preview.sh script for improved AWS configura…#41042
pratapaprasanna merged 1 commit intoreleasefrom
fix/modify/helm/with/set

Conversation

@pratapaprasanna
Copy link
Contributor

@pratapaprasanna pratapaprasanna commented Jun 25, 2025

…tion

Changes Made

  • Updated the script to set strict error handling with set -euo pipefail.
  • Streamlined AWS CLI configuration by creating the ~/.aws/config file directly.
  • Removed deprecated dp-node-affinity-values.yaml file and integrated node affinity and tolerations directly into the Helm chart deployment command.
  • Improved pod name retrieval and added optional cleanup logic for better resource management during deployment.

These changes enhance the reliability and maintainability of the deployment process.

Description

Tip

Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team).

Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR.

Fixes #Issue Number
or
Fixes Issue URL

Warning

If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.

Automation

/ok-to-test tags=""

🔍 Cypress test results

Caution

If you modify the content in this section, you are likely to disrupt the CI result for your PR.

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

  • Chores
    • Improved deployment script robustness with stricter error handling and clearer configuration steps.
    • Enhanced cleanup logic and made environment setup more explicit.
    • Increased memory allocation for deployments.
    • Added node affinity and toleration settings directly in deployment commands to control pod scheduling.
    • Removed an external configuration file for node affinity, consolidating scheduling settings within the script.

…tion

### Changes Made
- Updated the script to set strict error handling with `set -euo pipefail`.
- Streamlined AWS CLI configuration by creating the `~/.aws/config` file directly.
- Removed deprecated `dp-node-affinity-values.yaml` file and integrated node affinity and tolerations directly into the Helm chart deployment command.
- Improved pod name retrieval and added optional cleanup logic for better resource management during deployment.

These changes enhance the reliability and maintainability of the deployment process.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 25, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The deployment script was updated for stricter error handling, clearer environment setup, and improved cleanup logic. Node scheduling constraints for Helm deployments are now set inline, and memory requests were increased. The separate YAML file for node affinity was removed, with its configuration moved directly into the deployment command.

Changes

File(s) Change Summary
scripts/deploy_preview.sh Enhanced error handling, clarified AWS/Kubernetes setup, improved cleanup, inlined node affinity/tolerations, increased memory requests.
scripts/dp-node-affinity-values.yaml Deleted; node affinity and toleration configuration moved to inline Helm deployment command.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant DeployScript
    participant AWS
    participant Kubernetes
    participant Helm

    User->>DeployScript: Run deploy_preview.sh
    DeployScript->>AWS: Configure CLI with region/output
    DeployScript->>Kubernetes: Update kubeconfig, set context
    DeployScript->>Kubernetes: Cleanup resources (conditional)
    DeployScript->>Kubernetes: Create namespace/secret (ignore exists)
    DeployScript->>Helm: Add repo, install plugin (ignore exists)
    DeployScript->>Helm: Deploy with inline node affinity/tolerations, increased memory
    Helm->>Kubernetes: Apply deployment
Loading

Possibly related PRs

Suggested labels

skip-changelog

Poem

Scripts refined, with errors caught,
Affinity now in-line, not forgot.
Memory grows, pods find their place,
Cleanup’s robust, no lingering trace.
YAML file gone, but logic remains—
Deployments now run with fewer pains!
🚀✨


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c921a3c and 4356d0c.

📒 Files selected for processing (2)
  • scripts/deploy_preview.sh (2 hunks)
  • scripts/dp-node-affinity-values.yaml (0 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@pratapaprasanna pratapaprasanna merged commit 3bac05f into release Jun 25, 2025
14 of 15 checks passed
@pratapaprasanna pratapaprasanna deleted the fix/modify/helm/with/set branch June 25, 2025 13:38
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.

1 participant