Skip to content

Conversation

@abhvsn
Copy link
Contributor

@abhvsn abhvsn commented May 26, 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.

/test Sanity

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/15253157855
Commit: edc1653
Cypress dashboard.
Tags: @tag.Sanity
Spec:


Mon, 26 May 2025 12:27:15 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • Refactor
    • Updated internal handling of feature migration tracking for improved flexibility. No visible impact to end-users.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 26, 2025

Walkthrough

The change updates the type of the featuresWithPendingMigration field in the TenantConfigurationCE class, replacing its key type from FeatureFlagEnum to String. No other logic, methods, or class declarations are modified.

Changes

File Summary
.../appsmith-server/src/main/java/com/appsmith/server/domains/ce/TenantConfigurationCE.java Changed featuresWithPendingMigration field key type from FeatureFlagEnum to String

Sequence Diagram(s)

sequenceDiagram
    participant TenantConfigurationCE
    Note over TenantConfigurationCE: featuresWithPendingMigration now uses String keys
Loading

Possibly related PRs

Suggested labels

ok-to-test

Suggested reviewers

  • nidhi-nair
  • trishaanand

Poem

A map once keyed by enum's might,
Now strings will guide its migration flight.
Simpler paths for features to roam,
In tenant configs, they find a new home.
With just one tweak, the code grows light—
A subtle shift, but future bright!
🗺️➡️🔑


📜 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 ed940a6 and edc1653.

📒 Files selected for processing (1)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/domains/ce/TenantConfigurationCE.java (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: perform-test / client-build / client-build
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: server-spotless / spotless-check
  • GitHub Check: server-unit-tests / server-unit-tests
🔇 Additional comments (2)
app/server/appsmith-server/src/main/java/com/appsmith/server/domains/ce/TenantConfigurationCE.java (2)

49-49:

Details

✅ Verification successful

Good refactoring to reduce coupling.

The change from FeatureFlagEnum to String for map keys aligns with the PR objective of removing strong dependencies. This improves serialization flexibility and reduces coupling between the tenant configuration and feature flag enum.

However, verify that all code interacting with this field has been updated to use string keys:


🏁 Script executed:

#!/bin/bash
# Description: Find all usages of featuresWithPendingMigration to ensure consistent typing
rg -A 3 -B 3 "featuresWithPendingMigration"

# Also check for any remaining FeatureFlagEnum usages that might need updating
rg "FeatureFlagEnum"

Length of output: 24394


Approve: Consistent use of String keys for featuresWithPendingMigration

All occurrences of featuresWithPendingMigration have been updated from Map<FeatureFlagEnum, …> to Map<String, …>, and lookups now correctly use featureFlagEnum.name() (e.g. in FeatureFlagMigrationHelperCEImpl). The client-side tests (TS) also use an object literal ({}) with string keys. No further changes are required.


80-80:

Details

✅ Verification successful

Verify source object compatibility.

The assignment looks correct, but ensure that tenantConfiguration.getFeaturesWithPendingMigration() returns a Map<String, FeatureMigrationType> to maintain type consistency.

Check if the TenantConfiguration class has the same field type update:


🏁 Script executed:

#!/bin/bash
# Description: Check if TenantConfiguration class has matching field type
rg -A 2 -B 2 "featuresWithPendingMigration.*FeatureMigrationType" --type java

# Also check the getter method return type
rg "getFeaturesWithPendingMigration" --type java

Length of output: 3854


🏁 Script executed:

#!/bin/bash
# Display the declaration of `featuresWithPendingMigration` in TenantConfigurationCE.java
rg -n "featuresWithPendingMigration" -C 3 app/server/appsmith-server/src/main/java/com/appsmith/server/domains/ce/TenantConfigurationCE.java

Length of output: 1065


#!/bin/bash
# Locate any non-CE TenantConfiguration class and check the field declaration
fd TenantConfiguration.java app/server/appsmith-server/src/main/java/com/appsmith/server/domains | while read -r file; do
  echo "Inspecting: $file"
  rg -n "featuresWithPendingMigration" -C 3 "$file"
done

Verified featuresWithPendingMigration type consistency

The featuresWithPendingMigration field in app/server/appsmith-server/src/main/java/com/appsmith/server/domains/ce/TenantConfigurationCE.java
is declared as Map<String, FeatureMigrationType>, and its getter returns the same type. The direct assignment in copyNonSensitiveValues is therefore safe—no further changes needed.

✨ 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.

@abhvsn abhvsn added the ok-to-test Required label for CI label May 26, 2025
@abhvsn abhvsn requested a review from subrata71 May 26, 2025 11:48
@abhvsn abhvsn merged commit 678df9c into release May 26, 2025
49 checks passed
@abhvsn abhvsn deleted the chore/remove-ff-enum-dependency-in-tenant branch May 26, 2025 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Required label for CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants