## 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 -->
## Description
This PR aims to enhance the performance of the pages span in
consolidated-API view mode. It does so by brining the following changes
- **Add Projection:** Implement projections to enhance performance for
`appsmith.consolidated-api.view.pages.getpage`.
- **Implement Caching:** Introduce caching to eliminate the `getpage`
query, thereby optimizing
`appsmith.consolidated-api.view.application_id` and related spans.
We will implement caching to store `defaultApplicationId` information in
memory. This cache will reduce the need for the time-consuming `getpage`
query. On a cache miss, the system will first fetch the page and then
the branched application. If the information is present in the cache, it
will directly retrieve the branched application, leveraging the cached
data for improved efficiency.
With these changes, the pages API is showing improvements. A few
screenshots from local environment:




Fixes https://github.com/appsmithorg/appsmith/issues/36102
## 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/10778438378>
> Commit: 25e71b594261a318ef6204603a225c3136892a89
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10778438378&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Mon, 09 Sep 2024 18:03:52 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 page retrieval capabilities with additional parameters for
improved data handling.
- Introduced a caching mechanism for optimized retrieval of application
IDs in view mode.
- Added support for bulk cache eviction through the `@CacheEvict`
annotation.
- **Bug Fixes**
- Adjusted method signatures in tests to align with updated service
methods, ensuring proper functionality.
- **Documentation**
- Updated test cases to reflect changes in method parameters for clarity
and accuracy.
- **Chores**
- Refactored method calls across various services and tests to
incorporate new parameters and improve overall performance.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: “sneha122” <“sneha@appsmith.com”>
> Pull Request Template
>
> Use this template to quickly create a well written pull request.
Delete all quotes before creating the pull request.
## Description
Spring Boot 2.7 introduced a new
META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
file for registering auto-configurations, while maintaining backwards
compatibility with registration in spring.factories. With this release,
support for registering auto-configurations in spring.factories has been
removed in favor of the imports file.
> Please include a summary of the changes and which issue has been
fixed. Please also include relevant motivation
> and context. List any dependencies that are required for this change
> Links to Notion, Figma or any other documents that might be relevant
to the PR
> Add a TL;DR when description is extra long (helps content team)
Fixes # (issue)
> if no issue exists, please create an issue and ask the maintainers
about this first
Media
> A video or a GIF is preferred. when using Loom, don’t embed because it
looks like it’s a GIF. instead, just link to the video
## Type of change
> Please delete options that are not relevant.
- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- Chore (housekeeping or task changes that don't impact user perception)
- This change requires a documentation update
## How Has This Been Tested?
> Please describe the tests that you ran to verify your changes. Provide
instructions, so we can reproduce.
> Please also list any relevant details for your test configuration.
> Delete anything that is not important
- Manual
- Jest
- Cypress
### Test Plan
> Add Testsmith test cases links that relate to this PR
### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
## Checklist:
### Dev activity
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag
### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test