Skip to content

Conversation

Karthikesh24
Copy link

@Karthikesh24 Karthikesh24 commented Oct 9, 2025

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
    • Introduced an automated deployment workflow to provision and update preview environments in the cloud.
    • Adds resilient setup with safe fallbacks to reduce deployment failures and improve reliability.
    • Supports environment resets and clean re-deploys to ensure consistent test states.
    • Configures ingress, persistence, and runtime settings for stable preview instances.
    • Streamlines secret and configuration management for faster, more predictable releases.
    • No user-facing application changes.

Copy link
Contributor

coderabbitai bot commented Oct 9, 2025

Walkthrough

Introduces a Bash script (preview.sh) that automates deploying Appsmith to AWS EKS using Helm. It configures AWS/kube contexts, optionally recreates the environment, prepares namespace and secrets, manages Helm repos/plugins, and installs/upgrades the Appsmith chart with EFS-backed persistence, ingress, and environment-driven configuration.

Changes

Cohort / File(s) Summary
Deployment script
preview.sh
New Bash deployment script for Appsmith on AWS EKS: strict shell flags; AWS/kubectl context setup; optional environment reset (namespace/PV cleanup, MongoDB wipe); namespace and registry secret creation; Helm repo/plugin management; optional mapkubeapis; Helm install/upgrade with EFS, ingress, and environment-based values; resilient error handling.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Operator
  participant SH as preview.sh
  participant AWS as AWS CLI
  participant K8s as kubectl/EKS
  participant Helm as Helm
  participant Mdb as MongoDB Pod

  Dev->>SH: Run with env (REGION, CLUSTER, PR, DP_EFS_ID, RECREATE, ...)
  SH->>AWS: Configure region / creds
  SH->>K8s: update-kubeconfig (EKS context)
  SH->>K8s: Set namespace / get pods

  alt RECREATE set
    SH->>K8s: Find MongoDB pod
    SH->>Mdb: mongosh to drop target DB
    SH->>K8s: Delete Appsmith stacks/resources
    SH->>K8s: Delete namespace and clear PV finalizers
  end

  SH->>K8s: Create namespace (idempotent)
  SH->>K8s: Create docker-registry secret
  SH->>Helm: repo add/update (appsmith-ee)
  SH->>Helm: Ensure mapkubeapis plugin (tolerate failure)
  SH->>Helm: mapkubeapis (non-blocking)

  note over SH,Helm: Build values (image, ingress, EFS, resources, env, affinity)

  SH->>Helm: helm upgrade --install appsmith
  Helm->>K8s: Apply chart resources
  K8s-->>SH: Pods/Ingress/ PVC created/updated
  SH-->>Dev: Output status and identifiers
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

A shell taps clouds with quiet grace,
Spins EKS in a tidy place.
Helm charts bloom, ingress sings,
EFS mounts with whispering strings.
Flip RECREATE—reset the stage,
Pods parade from script to cage.
Preview’s ready—ship the page!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description only includes the unmodified repository template without any specific details such as a TL;DR, motivation, context, dependencies, or a valid issue link, leaving all placeholder sections empty. Please replace the template placeholders with a concise summary of the script’s purpose and motivation, list any dependencies or external links, and include a valid “Fixes” reference to an issue or URL.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title “Create preview.sh” succinctly identifies the main change, namely the addition of the preview.sh deployment script, and is clear and concise for teammates scanning the history.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between de2bcae and d05740e.

📒 Files selected for processing (1)
  • preview.sh (1 hunks)

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

Comment @coderabbitai help to get the list of available commands and usage tips.

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