diff --git a/.github/workflows/client.yml b/.github/workflows/client.yml index 4d9ac96cad..4f1ab77ef5 100644 --- a/.github/workflows/client.yml +++ b/.github/workflows/client.yml @@ -21,6 +21,7 @@ jobs: defaults: run: working-directory: app/client + shell: bash steps: # Checkout the code @@ -91,6 +92,7 @@ jobs: defaults: run: working-directory: app/client + shell: bash strategy: fail-fast: false matrix: @@ -161,8 +163,8 @@ jobs: --env APPSMITH_ENCRYPTION_PASSWORD=password \ --env APPSMITH_ENCRYPTION_SALT=salt \ --env APPSMITH_IS_SELF_HOSTED=false \ - appsmith/appsmith-server:release - + appsmith/appsmith-server-ee:release + - name: Pull master server docker container and start it locally if: github.ref == 'refs/heads/master' shell: bash @@ -175,7 +177,7 @@ jobs: --env APPSMITH_ENCRYPTION_PASSWORD=password \ --env APPSMITH_ENCRYPTION_SALT=salt \ --env APPSMITH_IS_SELF_HOSTED=false \ - appsmith/appsmith-server:nightly + appsmith/appsmith-server-ee:nightly - name: Installing Yarn serve run: | @@ -269,15 +271,15 @@ jobs: - name: Push release image to Docker Hub if: success() && github.ref == 'refs/heads/release' && github.event_name == 'push' run: | - docker build -t appsmith/appsmith-editor:${{steps.branch_name.outputs.tag}} . + docker build -t appsmith/appsmith-editor-ee:${{steps.branch_name.outputs.tag}} . echo ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin - docker push appsmith/appsmith-editor + docker push appsmith/appsmith-editor-ee # Build master Docker image and push to Docker Hub - name: Push production image to Docker Hub with commit tag if: success() && github.ref == 'refs/heads/master' && github.event_name == 'push' run: | - docker build -t appsmith/appsmith-editor:${GITHUB_SHA} . - docker build -t appsmith/appsmith-editor:nightly . + docker build -t appsmith/appsmith-editor-ee:${GITHUB_SHA} . + docker build -t appsmith/appsmith-editor-ee:nightly . echo ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin - docker push appsmith/appsmith-editor \ No newline at end of file + docker push appsmith/appsmith-editor-ee \ No newline at end of file diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml index 33e42df2d3..48d28d8503 100644 --- a/.github/workflows/server.yml +++ b/.github/workflows/server.yml @@ -71,22 +71,22 @@ jobs: - name: Push release image to Docker Hub if: success() && github.ref == 'refs/heads/release' run: | - docker build -t appsmith/appsmith-server:${{steps.vars.outputs.tag}} . + docker build -t appsmith/appsmith-server-ee:${{steps.vars.outputs.tag}} . echo ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin # This command pushes all the tags on the machine to Docker hub. This has been written for ease of reading. Be very careful # with this command - docker push appsmith/appsmith-server + docker push appsmith/appsmith-server-ee # Build master Docker image and push to Docker Hub - name: Push master image to Docker Hub with commit tag if: success() && github.ref == 'refs/heads/master' run: | - docker build -t appsmith/appsmith-server:${GITHUB_SHA} . - docker build -t appsmith/appsmith-server:nightly . + docker build -t appsmith/appsmith-server-ee:${GITHUB_SHA} . + docker build -t appsmith/appsmith-server-ee:nightly . echo ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin # This command pushes all the tags on the machine to Docker hub. This has been written for ease of reading. Be very careful # with this command - docker push appsmith/appsmith-server + docker push appsmith/appsmith-server-ee # These are dummy jobs in the CI build to satisfy required status checks for merging PRs. This is a hack because Github doesn't support conditional # required checks in monorepos. These jobs are a clone of similarly named jobs in client.yml. @@ -119,4 +119,4 @@ jobs: shell: bash run: | exit 0 - \ No newline at end of file + diff --git a/.github/workflows/sync-community-repo.yml b/.github/workflows/sync-community-repo.yml new file mode 100644 index 0000000000..a9a581db97 --- /dev/null +++ b/.github/workflows/sync-community-repo.yml @@ -0,0 +1,26 @@ +# This workflow is responsible for syncing the release branch from the community edition repository +name: Sync Community workflow + +on: + schedule: + - cron: "0 * * * *" + +jobs: + repo-sync: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + ref: release + fetch-depth: 0 + + # This step pulls the merges the latest release branch from the Appsmith CE into EE repository + - name: repo-sync + run: | + git remote add community https://github.com/appsmithorg/appsmith.git + git config user.email "automated@github.com" + git config user.name "Automated Github Action" + git pull community release --no-edit + git push origin release + diff --git a/app/client/.sentryclirc b/app/client/.sentryclirc new file mode 100644 index 0000000000..025e064fe5 --- /dev/null +++ b/app/client/.sentryclirc @@ -0,0 +1,3 @@ +[defaults] +project=appsmith +org=appsmith diff --git a/app/client/README.md b/app/client/README.md index 2a275ea504..0ae785bd51 100755 --- a/app/client/README.md +++ b/app/client/README.md @@ -7,3 +7,4 @@ This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). For details on setting up your development machine, please refer to the [Setup Guide](https://github.com/appsmithorg/appsmith/blob/release/contributions/ClientSetup.md) + diff --git a/app/client/README.old.md b/app/client/README.old.md index 2e0a6537bc..353e626643 100644 --- a/app/client/README.old.md +++ b/app/client/README.old.md @@ -42,4 +42,4 @@ Use these steps to clone from SourceTree, our client for using the repository co 3. When you see the **Clone New** dialog in SourceTree, update the destination path and name if you’d like to and then click **Clone**. 4. Open the directory you just created to see your repository’s files. -Now that you're more familiar with your Bitbucket repository, go ahead and add a new file locally. You can [push your change back to Bitbucket with SourceTree](https://confluence.atlassian.com/x/iqyBMg), or you can [add, commit,](https://confluence.atlassian.com/x/8QhODQ) and [push from the command line](https://confluence.atlassian.com/x/NQ0zDQ). \ No newline at end of file +Now that you're more familiar with your Bitbucket repository, go ahead and add a new file locally. You can [push your change back to Bitbucket with SourceTree](https://confluence.atlassian.com/x/iqyBMg), or you can [add, commit,](https://confluence.atlassian.com/x/8QhODQ) and [push from the command line](https://confluence.atlassian.com/x/NQ0zDQ). diff --git a/app/client/craco.build.config.js b/app/client/craco.build.config.js index f7f720ff5f..8b02d51143 100644 --- a/app/client/craco.build.config.js +++ b/app/client/craco.build.config.js @@ -22,13 +22,11 @@ if (env === "PRODUCTION" || env === "STAGING") { new SentryWebpackPlugin({ include: "build", ignore: ["node_modules", "webpack.config.js"], - setCommits: { - auto: true - }, + release: process.env.REACT_APP_SENTRY_RELEASE, deploy: { env: process.env.REACT_APP_SENTRY_ENVIRONMENT } - }), + }) ); } diff --git a/app/client/cypress/fixtures/testdata.json b/app/client/cypress/fixtures/testdata.json index ada2d66723..ccc5a27b18 100644 --- a/app/client/cypress/fixtures/testdata.json +++ b/app/client/cypress/fixtures/testdata.json @@ -180,4 +180,4 @@ "atobInput": "{{atob('QQ==')", "btoaInput": "{{btoa('A')", "defaultInputBinding": "{{Input2.text" -} \ No newline at end of file +} diff --git a/app/client/netlify.toml b/app/client/netlify.toml index 12f43a8d4f..d90d1e5924 100644 --- a/app/client/netlify.toml +++ b/app/client/netlify.toml @@ -1,34 +1,46 @@ [build] [build.environment] -# REACT_APP_SENTRY_DSN= -# REACT_APP_SENTRY_ENVIRONMENT= -# REACT_APP_SENTRY_RELEASE= -# REACT_APP_OAUTH2_GOOGLE_CLIENT_ID= -# REACT_APP_OAUTH2_GITHUB_CLIENT_ID= -# REACT_APP_SEGMENT_KEY= -# REACT_APP_MARKETPLACE_URL= -# REACT_APP_OPTIMIZELY_KEY= -# REACT_APP_ALGOLIA_API_ID= -# REACT_APP_ALGOLIA_API_KEY= -# REACT_APP_ALGOLIA_SEARCH_INDEX_NAME= - REACT_APP_CLIENT_LOG_LEVEL="debug" -# REACT_APP_GOOGLE_MAPS_API_KEY= + REACT_APP_OAUTH2_GOOGLE_CLIENT_ID = "enabled" + REACT_APP_OAUTH2_GITHUB_CLIENT_ID = "enabled" + REACT_APP_OPTIMIZELY_KEY = "Jq3K2kVdvuvxecHyHbVYcj" + REACT_APP_ALGOLIA_API_ID = "AZ2Z9CJSJ0" + REACT_APP_ALGOLIA_API_KEY = "d113611dccb80ac14aaa72a6e3ac6d10" + REACT_APP_ALGOLIA_SEARCH_INDEX_NAME = "test_appsmith" + REACT_APP_CLIENT_LOG_LEVEL = "debug" + REACT_APP_GOOGLE_MAPS_API_KEY = "AIzaSyBOQFulljufGt3VDhBAwNjZN09KEFufVyg" + REACT_APP_TNC_PP = "true" + REACT_APP_CLOUD_HOSTING = "true" + REACT_APP_INTERCOM_APP_ID = "y10e7138" + REACT_APP_MAIL_ENABLED = "true" + REACT_APP_SENTRY_DSN = "https://abf15a075d1347969df44c746cca7eaa@o296332.ingest.sentry.io/1546547" + REACT_APP_SENTRY_ENVIRONMENT = "Production" + SENTRY_AUTH_TOKEN = "dfdf7fa46c5b483a944b4571554d6466da3c64a6ed8b46e3b8a4285183a6bcc3" + SENTRY_DSN = "https://abf15a075d1347969df44c746cca7eaa@o296332.ingest.sentry.io/1546547" + SENTRY_ORG = "appsmith" + SENTRY_PROJECT = "appsmith" + SENTRY_LOG_LEVEL = "info" [context.production] [context.production.environment] REACT_APP_ENVIRONMENT = "PRODUCTION" + REACT_APP_SENTRY_ENVIRONMENT = "Production" + REACT_APP_SMART_LOOK_ID = "c370af0df0edf38360adbefbdc47d2b42ea137c9" + REACT_APP_SEGMENT_KEY = "9OnZ6LnDztuZZo4zXfoutEEBB2wftHUH" REACT_APP_BASE_URL = "https://api.appsmith.com" APP_HOST = "app.appsmith.com" + REACT_APP_CLIENT_LOG_LEVEL = "error" [context.release] [context.release.environment] REACT_APP_ENVIRONMENT = "STAGING" + REACT_APP_SENTRY_ENVIRONMENT = "Staging" REACT_APP_BASE_URL = "https://release-api.appsmith.com" APP_HOST = "release.app.appsmith.com" [context.deploy-preview] [context.deploy-preview.environment] REACT_APP_ENVIRONMENT = "STAGING" + REACT_APP_SENTRY_ENVIRONMENT = "Development" REACT_APP_BASE_URL = "https://release-api.appsmith.com" # Not adding an APP_HOST here because the URL is dynamic in nature and cannot be determined. diff --git a/app/client/src/enterprise/README.md b/app/client/src/enterprise/README.md new file mode 100644 index 0000000000..b2e0f0a8b9 --- /dev/null +++ b/app/client/src/enterprise/README.md @@ -0,0 +1,45 @@ +## Appsmith EE + +We use the `@appsmith` alias to switch files between CE and EE to avoid conflicts +during regular merging. + +Steps to change something for the EE version of app + +- For the functionality you want to change the import statement in its consumers +to include the `@appsmith` import in the *CE repo*. For eg if you want to update the ApplicationCard + component will update this file of ApplicationList component. + + *FROM* + ```typescript + // ApplicationList.tsx + + import ApplicationCard from "./ApplicationCard"; + + // OR + + import ApplicationCard from "pages/Applications/ApplicationCard"; + ``` + + *TO* + ```typescript + // ApplicationList.tsx + + import ApplicationCard from "@appsmith/pages/Applications/ApplicationCard"; + ``` + +- Create a new file inside the *EE repo* called ApplicationCard with the same path + ```shell script + $ touch app/client/src/enterprise/pages/Applications/ApplicationCard + ``` +- EE will now use this file, so you can export a custom ApplicationCard component for EE. + + +The goal is to reduce conflicts and have EE extend virtually any part of CE so selecting files to + update will be crucial. You should keep the following points in mind: + + - NEVER update the CE file in the EE repo + - All the consumers of the file will need it's expected exports. + - You can import from the CE file and reexport from your EE if no changes are expected. + - The types of component props if different will cause problems in the component declaration and use. + You can export that out these props into the `@appsmith` space to avoid this problem by reimplementing them in EE. + diff --git a/app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx b/app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx index b751471c14..ab9e70753f 100644 --- a/app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx +++ b/app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx @@ -110,7 +110,7 @@ export const EntityProperties = memo( }, ); -EntityProperties.displayName = "EntityPrperties"; +EntityProperties.displayName = "EntityProperties"; (EntityProperties as any).whyDidYouRender = { logOnDifferentValues: false, diff --git a/app/client/src/pages/Editor/WidgetsEditor.tsx b/app/client/src/pages/Editor/WidgetsEditor.tsx index f50c5b83e3..31ea92a4e4 100644 --- a/app/client/src/pages/Editor/WidgetsEditor.tsx +++ b/app/client/src/pages/Editor/WidgetsEditor.tsx @@ -113,6 +113,7 @@ const WidgetsEditor = () => { node = ; } log.debug("Canvas rendered"); + PerformanceTracker.stopTracking(); return ( diff --git a/app/client/src/pages/common/AppRoute.tsx b/app/client/src/pages/common/AppRoute.tsx index 8246e50d4c..bebb321f0d 100644 --- a/app/client/src/pages/common/AppRoute.tsx +++ b/app/client/src/pages/common/AppRoute.tsx @@ -1,6 +1,5 @@ import React from "react"; import { Route, RouteComponentProps } from "react-router-dom"; -import AnalyticsUtil from "utils/AnalyticsUtil"; import * as Sentry from "@sentry/react"; import { connect } from "react-redux"; import { getThemeDetails } from "selectors/themeSelectors"; diff --git a/app/client/tsconfig.path.json b/app/client/tsconfig.path.json index fe316a7789..ba9d5468a5 100644 --- a/app/client/tsconfig.path.json +++ b/app/client/tsconfig.path.json @@ -2,7 +2,7 @@ "compilerOptions": { "baseUrl": "src", "paths": { - "@appsmith/*": ["*"] + "@appsmith/*": ["enterprise/*"] } } } diff --git a/app/server/README.md b/app/server/README.md index d87c0ec829..25fa8acbb5 100644 --- a/app/server/README.md +++ b/app/server/README.md @@ -30,4 +30,4 @@ In order to test the code, you can run the following command: mvn -B clean package ``` -Please make sure that you have a local Redis instance running for the test cases. During tests, the MongoDB is run in-memory. So you don't require to be running a local MongoDB instance. \ No newline at end of file +Please make sure that you have a local Redis instance running for the test cases. During tests, the MongoDB is run in-memory. So you don't require to be running a local MongoDB instance. diff --git a/deploy/template/docker.env.sh b/deploy/template/docker.env.sh index fce5b31e79..b58bc24eef 100644 --- a/deploy/template/docker.env.sh +++ b/deploy/template/docker.env.sh @@ -41,4 +41,13 @@ APPSMITH_MAIL_ENABLED=false APPSMITH_REDIS_URL=redis://redis:6379 APPSMITH_MONGODB_URI=mongodb://$encoded_mongo_root_user:$encoded_mongo_root_password@$mongo_host/appsmith?retryWrites=true # ******************************* + +# *** EE Specific Config ******** +# APPSMITH_MARKETPLACE_URL= +# APPSMITH_RAPID_API_KEY_VALUE= +# APPSMITH_ROLLBAR_ACCESS_TOKEN= +# APPSMITH_ROLLBAR_ENV= +# APPSMITH_SEGMENT_KEY= +# ******************************* + EOF