Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@gsmithun4
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings December 15, 2025 11:37
Copy link
Contributor

Copilot AI left a 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 fetchDevelopmentVersions call 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]);
Copy link

Copilot AI Dec 15, 2025

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.

Copilot uses AI. Check for mistakes.
Comment on lines +10 to +13
// if (getTooljetEdition() !== TOOLJET_EDITIONS.EE) {
// console.log('Skipping migration as it is not EE edition');
// return;
// }
Copy link

Copilot AI Dec 15, 2025

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.

Suggested change
// if (getTooljetEdition() !== TOOLJET_EDITIONS.EE) {
// console.log('Skipping migration as it is not EE edition');
// return;
// }

Copilot uses AI. Check for mistakes.
@gsmithun4 gsmithun4 merged commit bba4f1d into lts-3.16 Dec 15, 2025
65 checks passed
@gsmithun4 gsmithun4 deleted the fix/cd-migration-v3 branch December 15, 2025 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants