PromucFlow_constructor/app/server
Abhijeet 5f3b6b8b24
feat: Restrict cron execution for single pod in clustered environment (#39171)
## Description
PR to update crons:
1. Execute crons for all orgs present in the DB
2. Add distributed locking mechanism to run cron by a single pod in
multi-clustered setup
3. Add orgId in the analytics event which are part of cron to filter
based on the combination of instanceId and orgId

##### TODOs:
1. Need to introduce a way to pass orgId while fetching organization
level feature flags
- When fetching flags for anonymous user orgId is not present in the
session
- While using methods annotated with @FeatureFlagged without the user
context (server internal workflow)
2. Currently we are fetching status of license and org level feature
flags at the startup, which was fine but going forward to avoid initial
delay we need to find better alternative to this.

Fixes https://github.com/appsmithorg/appsmith/issues/39068,
https://github.com/appsmithorg/appsmith/issues/39388

/test All

### 🔍 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/13519994895>
> Commit: c1b8e5de730f04c2a50966a95c061138af658955
> Workflow: `PR Automation test suite`
> Tags: `@tag.All`
> Spec: ``
> <hr>Tue, 25 Feb 2025 11:19:31 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**
- Enhanced organization management with dynamic feature flag updates and
improved restart handling.
- Added distributed locking to scheduled background tasks for increased
stability and reliability in multi-tenant environments.
- Introduced new methods for retrieving all organizations and managing
organization configurations.
- New logging capabilities for better visibility into method invocation
failures.

- **Refactor**
- Streamlined internal workflows with enhanced logging and optimized
reactive processing, ensuring better monitoring and system
responsiveness.
- Improved method signatures and error handling for better clarity and
functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-25 17:20:11 +05:30
..
.run feat: Databricks plugin (#29746) 2023-12-26 10:04:09 +05:30
appsmith-git chore: Refactor Codebase to Remove Telemetry from CE (#39421) 2025-02-25 07:48:42 +00:00
appsmith-interfaces chore: Refactor Codebase to Remove Telemetry from CE (#39421) 2025-02-25 07:48:42 +00:00
appsmith-plugins fix: rename the header from organizationId to tenantId (#39385) 2025-02-21 05:27:20 +05:30
appsmith-server feat: Restrict cron execution for single pod in clustered environment (#39171) 2025-02-25 17:20:11 +05:30
envs test: Enable server tests for the PRs with base PG branch (#33429) 2024-05-22 15:55:20 +05:30
mongo-seed
reactive-caching feat: Restrict cron execution for single pod in clustered environment (#39171) 2025-02-25 17:20:11 +05:30
scripts chore: Revert "chore: delete redundant files" (#35022) 2024-07-18 16:18:10 +05:30
.gitignore chore: Removed failed tests file from git (#29602) 2023-12-14 13:02:36 +05:30
build.sh test: Enable server tests for the PRs with base PG branch (#33429) 2024-05-22 15:55:20 +05:30
buildpack-run.sh
pom.xml chore: Added capability of running ITs on maven (#38354) 2024-12-25 02:08:49 +05:30
Procfile
README.md ci: Modularizing the Github actions workflow for maintainability (#16505) 2022-09-09 01:08:55 +05:30
system.properties chore: Upgrade to Spring Boot 3.0.1 (#19044) 2023-01-02 19:40:59 +07:00

Appsmith Server

This is the server-side repository for the Appsmith framework.

For details on setting up your development machine, please refer to this Setup Guide.