Commit Graph

303 Commits

Author SHA1 Message Date
Abhijeet
24e144ecd8
chore: Add grants for appsmith user for embedded postgres (#36664)
## Description
PR to add the necessary grants to `appsmith` user when user opts for Postgres embedded DB.

fixes https://github.com/appsmithorg/appsmith/issues/36661

## Automation

/test Sanity

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/11155064003>
> Commit: 1fb82e52a3f05da1b9bb4082cf871a62d3554d78
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11155064003&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Thu, 03 Oct 2024 04:22:54 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced default values for PostgreSQL database connection
parameters.
  - Added a new function to manage user permissions on database schemas.

- **Improvements**
- Enhanced the existing database initialization process to include
permission granting after schema verification.
- Updated documentation within the script for better clarity on new
functionalities.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-04 10:17:17 +05:30
Anagh Hegde
bb11bf5fca
chore: create appsmith schema for postgres (#36591)
## Description

The current state is default schema or public schema. This schema is
accessible by default when user connects to the pg database. Hence
create `appsmith` schema for Appsmith server to use. This is to avoid
anyone accidentally modifying the appsmith data.

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]
> 🟣 🟣 🟣 Your tests are running.
> Tests running at:
<https://github.com/appsmithorg/appsmith/actions/runs/11111681323>
> Commit: 32f91e8d7ce750e4a088996aff4abe6905aa982f
> Workflow: `PR Automation test suite`
> Tags: `@tag.Sanity`
> Spec: ``
> <hr>Mon, 30 Sep 2024 18:08:23 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **New Features**
- Introduced a script to initialize the PostgreSQL database schema for
Appsmith.
- Added utilities for managing PostgreSQL database connections,
including availability checks and parameter extraction.
- Enhanced scripts for managing PostgreSQL connections and
initialization.
- Improved environment configuration for PostgreSQL database
connections, including automatic password generation for local setups.
- Updated JDBC URL handling to include schema parameters for PostgreSQL
connections.
	- Added support for proxy configuration in the application setup.

- **Bug Fixes**
- Improved error handling and connection retry mechanisms for PostgreSQL
setup.

- **Documentation**
- Updated comments and logging for better clarity on database
operations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Abhijeet <abhi.nagarnaik@gmail.com>
2024-09-30 23:42:56 +05:30
Abhijeet
43b675eb6d
chore: Add postgres dependency for server to startup (#36585)
## Description
As in the past we have seen the corruption of postgres DB which is being
used for temporal we want to make sure we have a retry mechanism in
place if:
1. `APPSMITH_DB_URL` is pointing to postgres url
2. Postgres is waiting in recovery mode

As per local testing when the docker container is abruptly shutdown via
`docker rm -f {container_name}` or `docker kill {container_name}` or
even via docker desktop we end up in state where postgres goes into
recovery state.
logs:
```
2024-09-27 08:02:49 backend stdout | SQL State  : 57P03
2024-09-27 08:02:49 backend stdout | Error Code : 0
2024-09-27 08:02:49 backend stdout | Message    : FATAL: the database system is starting up
```
Currently we have implemented polling mechanism, but we will keep
looking for better alternative here if we can opt for.

Note: 
1. With release dump this is taking ~300sec to get out of that state and
start accepting the connections.
2. With the existing implementation without retries server dies down
within 60sec.
```
INFO exited: backend (exit status 1; not expected)
INFO gave up: backend entered FATAL state, too many start retries too quickly
```
Reference doc:
https://www.notion.so/appsmith/Postgres-critical-scenarios-668f49c96aef40308e24c2a8d6b1137c

/test Sanity

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/11100944184>
> Commit: 9dbbe4b22ba12aa82c385ad0eef3cc3d4876f217
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11100944184&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Mon, 30 Sep 2024 07:26:41 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **New Features**
- Introduced new functions for enhanced handling of PostgreSQL database
connections, including availability checks and parameter extraction.
	- Added a new utility script for managing PostgreSQL connections.
- **Bug Fixes**
- Implemented a retry mechanism for PostgreSQL server availability
checks to ensure more reliable connections.
- **Tests**
- Added unit tests to validate the functionality of the PostgreSQL
parameter extraction logic.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-30 12:57:47 +05:30
Nidhi
ba1cc281e4
chore: Switch rate limit key to client_ip (#36606) 2024-09-30 12:43:20 +05:30
Abhijeet
1210104575
chore: Add mover script for Mongo to postgres migration (#36458)
## Description
PR to add:
1. Mover script : move-to-postgres.sh
2. Baseline data generation: regen-baseline.sh

/test Sanity

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/11027514472>
> Commit: c565b7a4d832b0d0e75df2f3122a1c0679235e88
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11027514472&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Wed, 25 Sep 2024 06:54:08 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced a new configuration file for instance management and
permission groups.
	- Added a custom JavaScript library for XML parsing.
- Implemented multiple database and API plugins, enhancing integration
capabilities.
- Established a tenant configuration for managing tenant-specific
settings.
	- Added an anonymous user entity for improved user management.

- **Bug Fixes**
	- Improved data migration script from MongoDB to Postgres.

- **Documentation**
	- Updated scripts for baseline data generation and migration processes.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-25 15:22:02 +05:30
Diljit
4743e96846
chore: caddy: enable logging of static file requests (#36500)
## Description
- Enable logs of static file requests in caddy.
- Skip logging for CSS and JS source map files. These files are
inconsequential for page rendering and therefore not worth tracking, as
they only pollute the log files.

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="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/11016033178>
> Commit: 97cfe307355f159a9cb80295fb566c406ffc056a
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11016033178&attempt=3"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Wed, 25 Sep 2024 05:08:51 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced logging configurations to improve performance by skipping
logs for health check requests and JavaScript map files.

- **Bug Fixes**
- Adjusted existing logging behavior for file handling to ensure more
accurate log processing.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-25 11:01:18 +05:30
Diljit
eceaa43eba
chore: Add cache control header for static files (#35461)
## Description
Add cache control header to static files in Caddy

Fixes #34643 

## Automation

/ok-to-test tags="@tag.All"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10987267745>
> Commit: 779d12e84054412d436e8a0c0f26878e475d7469
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10987267745&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Mon, 23 Sep 2024 04:38:28 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


## Summary by CodeRabbit

- **New Features**
- Enhanced caching strategy for static assets, improving performance and
reducing load times.
- Introduced a `Cache-Control` header for static files to optimize
browser caching.
- Updated caching configuration to allow more frequent updates of
JavaScript and CSS files.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-23 12:45:13 +05:30
Abhijeet
6ca9ef549e
feat: Make images adaptable to support both Postgres and MongoDB uris (#36424)
## Description
PR to make the release tag adaptable to work with both MongoDB and
PostgreSQL uris.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced a new script to automate the preparation of server
artifacts, improving the build process.
- Added SQL files to the indentation configuration for consistent code
formatting.

- **Improvements**
- Enhanced error handling in the Docker build process to ensure
essential files are present before execution.
- Updated service configuration logic to prevent misconfiguration based
on the environment.
- Added a new job step in the build workflow to prepare server artifacts
after the build process.
- Implemented conditional logic in the run script to dynamically adapt
to different database configurations.

- **Bug Fixes**
- Adjusted the initialization process to focus on MongoDB, improving
reliability in various environments.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

/test Sanity

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10940528231>
> Commit: 32731e8a93a25e5c9456eb89daca2d8bf327c012
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10940528231&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Thu, 19 Sep 2024 12:21:54 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No
2024-09-19 21:45:46 +05:30
Goutham Pratapa
74933fc261
fix: caddy partial metrics (#36376)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced metrics collection for enhanced monitoring and performance
analysis.
- **Bug Fixes**
- Preserved existing functionality related to rate limiting and basic
authentication.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

<!-- This is an auto-generated comment: Cypress test results  -->
> [!WARNING]
> Tests have not run on the HEAD
61808ad230907d204676a7aa83aee9d3b4054376 yet
> <hr>Tue, 17 Sep 2024 13:28:01 UTC
<!-- end of auto-generated comment: Cypress test results  -->
2024-09-17 18:59:51 +05:30
Goutham Pratapa
9398cf48cb
fix: trim db urls and remove special characters during backup restore (#36201)
fixes: #36176 

<!-- This is an auto-generated comment: Cypress test results  -->
> [!WARNING]
> Tests have not run on the HEAD
dd01ffd08099006721358d47ca3bb9cfbca345bc yet
> <hr>Fri, 13 Sep 2024 10:38:44 UTC
<!-- end of auto-generated comment: Cypress test results  -->


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Improved handling of database URLs by removing leading and trailing
whitespace, enhancing robustness and preventing potential issues.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-13 16:55:59 +05:30
Goutham Pratapa
eb0311aa8e
update caddy address (#36291)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Updated Caddy web server configuration to allow broader accessibility
to the admin interface.

- **Security Notice**
- The admin interface is now accessible from any IP address, which may
require enhanced security measures to protect against unauthorized
access.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-13 15:30:08 +05:30
Apeksha Bhosale
1760132c28
chore: JFR 24 hour script with logs file (#36041)
## 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="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10807975642>
> Commit: 660a59d4d52c8bf00e6126e2eb147465626a1989
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10807975642&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Wed, 11 Sep 2024 08:50:21 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **New Features**
- Introduced a new automated script for recording Java Flight Recorder
(JFR) data over a 24-hour period, enhancing monitoring capabilities for
Java applications.
- The script captures thread profiles at hourly intervals, streamlining
performance data collection without manual intervention.
- Added a monitoring setup function that conditionally executes the JFR
recording script based on environment configuration.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Goutham Pratapa <goutham@appsmith.com>
2024-09-13 12:46:54 +05:30
Nidhi
70a716418a
chore: Make sure each container / pod has its own stdout log files (#36205) 2024-09-10 15:35:21 +05:30
Zachary Zondlo
db3f35691d
Add a diagnostic script to assist in the debugging of issues with appsmith implementation (#35640)
## Description
A script to gather logs and system info into a tarball which can be
extracted and analyzed by appsmith engineers.


Fixes #35639 #32971

## Automation

/ok-to-test tags=""

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!WARNING]
> Tests have not run on the HEAD
4f8e27cd8bcef9233786f268f95e0b3e981c13d6 yet
> <hr>Tue, 27 Aug 2024 14:01:33 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **New Features**
- Introduced a new diagnostic tool to gather system and application
metrics for improved troubleshooting and performance monitoring in the
Appsmith environment.
- The tool collects logs, configuration files, JVM properties, and
system-level information, compressing the data for easier transport.

- **Chores**
- Added a script for efficient collection and organization of diagnostic
data, enhancing operational capabilities.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-29 14:06:30 +05:30
Apeksha Bhosale
5268164776
chore: preStop scripts (#35785)
## 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="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10484233107>
> Commit: c23bd2ad01d0a8ce214762ddea7ed71e6d4a758e
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10484233107&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Wed, 21 Aug 2024 06:05:39 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced scripts for capturing heap and thread dumps in Docker
environments to enhance troubleshooting capabilities for Java
applications.
- **Improvements**
- Updated thread dump scripts to allow users to specify dump locations,
improving flexibility for diagnostic data management.
- Enhanced file path organization for generated profile files, making
retrieval easier.
- **Chores**
- Implemented error handling and directory creation for storing dumps to
ensure robust operation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-21 11:43:40 +05:30
Nidhi
deaf9f9bea
chore: Added multiple scripts to trigger profiles (#35546) 2024-08-12 19:29:47 +05:30
Hetu Nandu
1ca6ab83f7
chore: Override fast-xml-parser for security concern (#35435) 2024-08-06 20:06:11 +05:30
Goutham Pratapa
f19ec6a183
fix: failing backup and restore appsmithctl (#35162)
Fixes: #34996
2024-08-06 19:34:59 +05:30
srix
293bd34266
fix: cleanup stale postgres postmaster.pid (#35171)
## Description
issue of Postgres not coming up with error` Previous Postgres was not
shutdown cleanly. Please start and stop Postgres 14 properly with
'supervisorctl' only. `


https://www.notion.so/appsmith/Closed-Beta-Customer-issues-45a274a9eb8e4762a72cbff74cd3bad5?pvs=4#ecca04d205414f25a289884cebdc0f9b


Fixes
https://app.zenhub.com/workspaces/workflows-pod-652fff131a95920b9bf2bc7e/issues/zh/226_

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10107093349>
> Commit: 357bf5d2ff0c1f65b4cbf46b0f3ee823ac192614
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10107093349&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Fri, 26 Jul 2024 07:15:19 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **New Features**
- Enhanced PostgreSQL upgrade process with improved error handling and
robust management of old server instances.

- **Bug Fixes**
- Reinstituted logic for checking and managing the `postmaster.pid`
file, ensuring proper startup and shutdown of old PostgreSQL servers.

- **Refactor**
- Improved formatting and readability of shell scripts without altering
their functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-07-26 12:52:49 +05:30
Shrikant Sharat Kandula
bf6fd3faf8
chore: Remove Postgres v13 from base image (#34740)
1. This was kept for a short grace period, to be removed once we're
confident of upgrading to v14.
2. The `pg-upgrade.sh` script is capable of handling this. It will
install v13 when upgrading to v14, if it's not already available. See:
2adb12d57b/deploy/docker/fs/opt/appsmith/pg-upgrade.sh (L53-L54)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Chores**
- Updated PostgreSQL version in Docker setup from 13 to 14 for improved
performance and security.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-07-05 17:54:58 +05:30
Shrikant Sharat Kandula
064d74c833
chore: Remove current symlink to Postgres (#34454)
Reason for this previously documented at
https://github.com/appsmithorg/appsmith/pull/34265#issue-2356259090.

Cypress tests don' make sense since the only diff is on
`base.dockerfile`.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Chores**
- Updated Dockerfile to streamline PostgreSQL setup. Removed creation of
a symlink to the current version of PostgreSQL.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-25 13:03:51 +05:30
Shrikant Sharat Kandula
26c0f07e14
chore: Add script to upgrade Postgres 13 data to 14 (#34317)
We're upgrading embedded Postgres from 13 to 14, and this PR includes a
script to perform the upgrade of the data folder from v13 schema to v14
schema. This script temporarily installs Postgres 13, if not available,
for the upgrade process, so will continue to work when and if we choose
to remove `postgresql-13` from the base image.

Tested this manually as well, running an Appsmith with Postgres 13,
executing some workflows via webhook, getting some run data generated,
then upgrading Postgres with the script in this PR, and ensuring that
the workflow run history is still there and visible on the UI exactly
the same. It is.

No conflicts or additional changes needed on EE. [All server and Cypress
tests pass on EE](https://github.com/appsmithorg/appsmith-ee/pull/4493).


![shot-2024-06-20-02-13-26](https://github.com/appsmithorg/appsmith/assets/120119/9bb60e3a-6cc9-4df9-9064-caead78729a6)


**/test sanity**



<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9590240540>
> Commit: 9c75da53f871ffb912015c18a7504327cba88f2c
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9590240540&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`

<!-- end of auto-generated comment: Cypress test results  -->





<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Added automation script for upgrading PostgreSQL to the latest
version.
- Introduced testing script for PostgreSQL upgrades in Docker
environments.

- **Improvements**
- Upgraded PostgreSQL from version 13 to 14 in Docker setup, ensuring
compatibility and performance enhancements.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-21 19:34:08 +05:30
Shrikant Sharat Kandula
88e39f42be chore: fix log line splitting in supervisor event handler 2024-06-20 20:28:20 +05:30
Shrikant Sharat Kandula
3f7b53589c
fix: Supervisor buffer overflow errors (#34351)
Should fix the flood of buffer overflow errors we see from Supervisor.

The one "change" this PR has, is that all the logs from the Docker
container will now be coming from `stderr`, not `stdout`. I don't expect
it to cause any problems, but it _is_ a change in behaviour nonetheless.

Why do that? Because of the way Supervisor event listening works. This
fix is based on the conversation at
https://github.com/Supervisor/supervisor/issues/1417. Essentially that
`stdout` should be reserved as a communication channel between
Supervisord and the event-listener, and for logging, we should use
`stderr`.

**/test sanity**



<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9592028116>
> Commit: 34a29eabc8dc82fb6a43b143e400d725d197a655
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9592028116&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`

<!-- end of auto-generated comment: Cypress test results  -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Refactor**
- Improved logging by switching to `print` statements with explicit
flushing for more reliable output handling.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-20 19:36:15 +05:30
Shrikant Sharat Kandula
e38c7cc32b
chore: Remove redundant adding Postgres bin to PATH (#34316)
This temporary change is no longer needed.

**/test sanity**


<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9574310795>
> Commit: abad77fb024c61b595c529aa2ed024b8dcdf5dfb
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9574310795&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`

<!-- end of auto-generated comment: Cypress test results  -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Chores**
- Improved the startup script by removing obsolete PATH modification for
PostgreSQL.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-20 10:08:30 +05:30
yatinappsmith
9263757188
chore: fix braces version (#34282)
## 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="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9547569754>
> Commit: 3516b9f76c77b499fe363d3aab583595911fa087
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9547569754&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`

<!-- end of auto-generated comment: Cypress test results  -->






## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Chores**
- Updated Jest dependency from version 29.1.2 to 29.7.0 for improved
testing capabilities.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 14:58:17 +05:30
Shrikant Sharat Kandula
a638c47507
chore: Fix PATH getting reset by su (#34286)
The `PATH` env variable gets reset to it's original value by `su`,
because its a "secure" env variable, and is _never_ preserved across
user-switches.

Because of this, the Postgres commands like `initdb` are not found on
the `PATH`. This PR fixes this by setting the `PATH` in the command
passed to `su` itself, so that `initdb` can now be found.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Improved the initialization process for local Postgres data folder to
ensure compatibility with environment variables.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-17 18:53:38 +05:30
Shrikant Sharat Kandula
929873a2c6
chore: Add Postgres bin to PATH (#34265)
Instead of using absolute paths to Postgres binaries, and in doing so,
hard-coding the Postgres version number, we add the bin folder to `PATH`
so they're available directly.

This also won't need the `current` symlink we created. That symlink is
causing problems in some post-installations scripts in `apt`/`dpkg`,
since they're expecting a _number_ in that folder, and sees `current`,
it's confused and produces this error:

```
dpkg: warning: version 'current' has bad syntax: version number does not start with digit
```

After this is merged, we should be able to get rid of the `current`
symlink as well.

**/test sanity**

<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9541787920>
> Commit: 1012266e0924248b0f13a91bee464303e86b87a6
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9541787920&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`

<!-- end of auto-generated comment: Cypress test results  -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Chores**
- Updated Docker configurations to streamline PostgreSQL 13 integration.
- Simplified PostgreSQL commands in scripts by removing explicit
versioning paths.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-17 12:53:34 +05:30
Shrikant Sharat Kandula
e97dc64432
chore: Remove mockdb as it isn't working anyway (#34266)
Output from a fresh Appsmith CE container:


![shot-2024-06-17-03-29-43@2x](https://github.com/appsmithorg/appsmith/assets/120119/309a88f7-b6d7-40e9-ba67-5e4aba264624)

To confirm again, the list of database doesn't include anything:

![shot-2024-06-17-03-50-06@2x](https://github.com/appsmithorg/appsmith/assets/120119/e630bcf8-cd6d-4174-aef6-6aa5d19c65ed)




**/test sanity**

<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9541763632>
> Commit: 87f2b15a152bfc488773059a159ac79ad3785f1c
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9541763632&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->
2024-06-17 12:45:49 +05:30
Shrikant Sharat Kandula
981e720f77
fix: DB URL override fails in some cases (#34206)
The current fallback implementation doesn't work in the below case:

> The `APPSMITH_MONGODB_URI` is set _outside_ the container, and
`APPSMITH_DB_URL` is set in the `docker.env`.

This scenario will be showing up a lot more now that the `docker.env.sh`
that generates new `docker.env` files has `APPSMITH_DB_URL` in it.

Problem is that since we load env variables from both outside and
`docker.env` individually, we end up loading both `APPSMITH_MONGODB_URI`
and `APPSMITH_DB_URL`. And in this case, the `APPSMITH_DB_URL` will be
from the just-generated `docker.env`, so we'll end up with a localhost
URL, even though `APPSMITH_MONGODB_URI` was set to an external endpoint
outside the container.

This is the problem we were facing with our DPs recently.

This PR fixes this problem by doing the env name "rename" separately for
outside env variables, and once for `docker.env` env variables.

**/test sanity**

<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9481037167>
> Commit: c6ce2a8dda4a13d3aab64adf8c9af08abd1cea62
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9481037167&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->
2024-06-12 17:45:19 +05:30
Shrikant Sharat Kandula
4dba047942
chore: Use tlog instead of echo in more places (#34182)
**/test sanity**



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Updated logging mechanism from `echo` to `tlog` for improved log
management across various scripts.
  
- **Chores**
- Enhanced logging for better clarity and consistency in deployment
scripts.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-11 20:10:33 +05:30
Abhijeet
0b4c273bfa
Revert "chore: Update postgres version references (#33987)"
This reverts commit 27b560d1df.
2024-06-10 15:29:12 +05:30
Shrikant Sharat Kandula
347d431887
chore: Add time to logs from entrypoint.sh (#34116)
Logs messages from `entrypoint.sh` and the other `run-*.sh` scripts
don't show timestamp today, and its getting hard to see the order of
things in the logs, especially between different processes.

This PR adds a command `tlog` to print logs with UTC timestamp prefixed.
We're only using it in `entrypoint.sh` now, but follow-up PR(s) will add
it to the other `run-*` scripts as well.



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Chores**
- Updated Dockerfile to include `/opt/bin` in the `PATH` and modified
permissions settings for executable files.

- **Refactor**
- Enhanced logging in the entrypoint script by replacing `echo`
statements with `tlog` for better clarity and debugging.

- **New Features**
- Introduced `tlog`, a new shell script for consistent and timestamped
logging.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-10 09:23:43 +05:30
Abhijeet
27b560d1df
chore: Update postgres version references (#33987)
## Description
PR to update the version references for postgres. This will help us in
keeping the diff minimum between release and pg branch as we will be
upgrading the postgres version to 15 on pg branch.

## Automation

/ok-to-test tags=""

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]  
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.

<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Chores**
- Updated Docker scripts to use a generic placeholder for PostgreSQL
version, enhancing flexibility and future-proofing the setup.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-06 10:30:20 +05:30
Shrikant Sharat Kandula
8abc516129
chore: Create a symlink to current version of Postgres 2024-06-05 20:18:15 +05:30
Goutham Pratapa
b5ae870087
[ops]: add warning for custom APPSMITH_GIT_ROOT (#33355) 2024-05-27 17:17:37 +05:30
Trisha Anand
921807d80b
chore: Update incorrect docker tagging and add fargate tag in deployment telemetry (#33472)
## 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
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]  
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.

<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No

---------

Co-authored-by: Goutham Pratapa <goutham@appsmith.com>
2024-05-27 17:16:13 +05:30
Shrikant Sharat Kandula
cece3fcdf8
chore: Delete unused files (#33702)
These files are no longer used in the product or code and can be deleted.
2024-05-24 13:13:41 +05:30
Goutham Pratapa
bf05e0f185
chore: Switch to vanilla Caddy, when rate limiting is disabled (#33387)
Depends-on:
[33591](https://github.com/appsmithorg/appsmith/pull/33591/files)
Fixes: #31997

---------

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2024-05-24 13:11:56 +05:30
Shrikant Sharat Kandula
1ed5a0d84c
chore: Install latest NodeJS again (#33700)
/test sanity
2024-05-23 18:39:37 +05:30
Shrikant Sharat Kandula
86cfc5fefd
chore: Hardcode pin NodeJS version 2024-05-23 12:57:41 +05:30
Shrikant Sharat Kandula
0f167af5d3
chore: Pin NodeJS version to the one in package.json (#33685)
The newer NodeJS version `20.13` requires a more recent version of
glibc, one which isn't available on Ubuntu 20.04 yet. We need to stick
to NodeJS v20.11 until we can update Ubuntu itself to 22.04, or the
updated glibc shows up in Ubuntu 20.04.

Pinning NodeJS version for now to unblock.
2024-05-23 12:51:48 +05:30
Abhijeet
039f664499
revert: "fix: Remove the strict check for mongo url" (#33671)
Reverts appsmithorg/appsmith#33652

Reverting the change as the root cause was different
https://theappsmith.slack.com/archives/C0134BAVDB4/p1716393908273869?thread_ts=1716375955.137629&cid=C0134BAVDB4

## Automation

/ok-to-test tags="@tag.Sanity"<!-- This is an auto-generated comment:
Cypress test results -->
> [!IMPORTANT]
> 🟣 🟣 🟣 Your tests are running.
> Tests running at:
<https://github.com/appsmithorg/appsmith/actions/runs/9201290830>
> Commit: 8e623fa37565078c23f1a307cbdfa416cfa89ed0
> Workflow: `PR Automation test suite`
> Tags: `@tag.Sanity`

<!-- end of auto-generated comment: Cypress test results  -->
2024-05-23 09:03:13 +05:30
Abhijeet
cfcc00ef67
fix: Remove the strict check for mongo url (#33652)
## 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="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9191016385>
> Commit: c74e98018a6b4bd212e922eb1b3015195a5234a0
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9191016385&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->





## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
2024-05-22 18:10:22 +05:30
Abhijeet
7e339d419d
test: Enable server tests for the PRs with base PG branch (#33429)
## Description
1. PR to enable server tests on PRs with `pg` as the base branch. 
2. Replace the DB URI from `APPSMITH_MONGODB_URI` to `APPSMITH_DB_URL` 

## Automation

/ok-to-test tags="@tag.Sanity, @tag.GenerateCRUD, @tag.Fork"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9174148396>
> Commit: 762b4255f654946a1a47a196df5a1afae5be09f2
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9174148396&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->












## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No

---------

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2024-05-22 15:55:20 +05:30
Goutham Pratapa
5965150bc4
chore: add vanilla caddy to base.dockerfile (#33591) 2024-05-21 16:46:13 +05:30
Adesh Atole
5ad365a86e
fix: Consider heroku deployment while generating Caddyfile (#33559)
## Description

Looks like while replacing NGINX with Caddy, Heroku deployment usecase
was missed.
Updated Caddyfile generation to use `$PORT` if available.

Fixes #33555 

Tested on Heroku Standard-2x Dyno.
2024-05-21 12:07:58 +05:30
Shrikant Sharat Kandula
c43a7c5645
chore: Fix blank lines in logs (#33515)
Fix blank line noise in logs routed via Supervisor.
2024-05-16 16:53:42 +05:30
Goutham Pratapa
d684b19d9d
[fix]: file permissions for entrypoint.sh (#33359)
## 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
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]  
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.

<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
2024-05-10 20:15:46 +05:30
Goutham Pratapa
9ade3d6bbb
fix: setup proxy variables in the start (#32451)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **Chores**
- Improved proxy settings, IP retrieval with timeout, and curl request
timeouts in the deployment process.
	- Enhanced Redis compatibility checks and installation steps.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-05-10 17:17:29 +05:30