-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Fix for CE Migration - added environments #14811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR addresses issues with CE (Community Edition) to EE (Enterprise Edition) migrations by enabling environment-related migrations to run on both editions. The changes remove edition-specific guards from two migration files and update the frontend to fetch development versions when the app canvas banner is rendered.
Key Changes:
- Commented out EE-only edition checks in two migration files to allow them to run on CE installations
- Added
fetchDevelopmentVersionscall in AppCanvasBanner component with a useEffect hook - Removed unused imports from the first migration file
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| server/data-migrations/1698841869350-PopulateCEOrgConstantsToOtherEnvs.ts | Commented out EE edition check and removed corresponding imports to allow migration to run on all editions |
| server/data-migrations/1681463532466-addMultipleEnvForCEcreatedApps.ts | Commented out EE edition check while retaining the edition variable needed for dynamic imports |
| frontend/src/AppBuilder/Header/AppCanvasBanner.jsx | Added useEffect to fetch development versions when component mounts or environments change |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ); | ||
| useEffect(() => { | ||
| fetchDevelopmentVersions(appId); | ||
| }, [appId, environments]); |
Copilot
AI
Dec 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The useEffect dependency array includes environments, which will cause fetchDevelopmentVersions to be called every time the environments array changes. This is inconsistent with other usages of this function in the codebase (CreateDraftVersionModal.jsx, CreateVersionModal.jsx, VersionManagerDropdown.jsx) which use fetchDevelopmentVersions as a dependency instead. The dependency array should be [appId, fetchDevelopmentVersions] to align with the established pattern and avoid unnecessary re-fetches when environments change.
| // if (getTooljetEdition() !== TOOLJET_EDITIONS.EE) { | ||
| // console.log('Skipping migration as it is not EE edition'); | ||
| // return; | ||
| // } |
Copilot
AI
Dec 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The imports for getTooljetEdition and TOOLJET_EDITIONS have been removed, but these are still referenced in the commented-out code. Since the edition check is commented out and these imports are not used anywhere else in the file, the commented-out code block (lines 10-13) should either be removed entirely or the imports should be retained. Leaving unused imports removed while keeping commented references creates inconsistency.
| // if (getTooljetEdition() !== TOOLJET_EDITIONS.EE) { | |
| // console.log('Skipping migration as it is not EE edition'); | |
| // return; | |
| // } |
No description provided.