Skip to content

Commit

Permalink
Merge pull request #30395 from appsmithorg/release
Browse files Browse the repository at this point in the history
17/01 Daily Promotion
  • Loading branch information
trishaanand authored Jan 17, 2024
2 parents 23855cb + 1b9f3af commit 7e2d039
Show file tree
Hide file tree
Showing 429 changed files with 29,428 additions and 2,139 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/client-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
github.event_name == 'push' ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'repository_dispatch' ||
github.event_name == 'schedule'
github.event_name == 'schedule'
defaults:
run:
working-directory: app/client
Expand Down Expand Up @@ -166,6 +166,11 @@ jobs:
- if: steps.ads_check.outputs.ads_non_compliant_count != 0 && inputs.ads-compliant-check == 'true' && inputs.pr != 0 && github.pull_request.base.ref == 'release'
run: exit 1

- name: Install postgres-dependencies
run: |
sudo apt update -y
sudo apt install -y postgresql-client
# Create a run record exactly at the time of merge to release to
# ensure we compare run details with code at this point
- name: Create Perf Meta
Expand Down Expand Up @@ -219,8 +224,6 @@ jobs:
run: |
npm install -g yarn
yarn install --immutable
sudo apt update -y
sudo apt install -y postgresql-client
# Type checking before starting the build
- name: Run type check
Expand All @@ -239,13 +242,6 @@ jobs:
if [[ "${{github.ref}}" == "refs/heads/release" ]]; then
echo "REACT_APP_ENVIRONMENT=STAGING" >> $GITHUB_OUTPUT
fi
# Since this is an unreleased build, we set the version to incremented version number with
# a `-SNAPSHOT` suffix.
latest_released_version="$(git ls-remote --tags --sort=-v:refname "$(git remote | head -1)" 'v*' | awk -F/ '{print $NF; exit}')"
echo "latest_released_version = $latest_released_version"
next_version="$(echo "$latest_released_version" | awk -F. -v OFS=. '{ $NF++; print }')"
echo "next_version = $next_version"
echo version=$next_version-SNAPSHOT >> $GITHUB_OUTPUT
# We burn React environment & the Segment analytics key into the build itself.
# This is to ensure that we don't need to configure it in each installation
Expand All @@ -260,8 +256,6 @@ jobs:
REACT_APP_ENVIRONMENT=${{steps.vars.outputs.REACT_APP_ENVIRONMENT}} \
REACT_APP_FUSIONCHARTS_LICENSE_KEY=${{ secrets.APPSMITH_FUSIONCHARTS_LICENSE_KEY }} \
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} \
REACT_APP_VERSION_ID=${{ steps.vars.outputs.version }} \
REACT_APP_VERSION_RELEASE_DATE=$(date -u '+%Y-%m-%dT%H:%M:%SZ') \
REACT_APP_VERSION_EDITION="Community" \
yarn build
Expand Down
23 changes: 1 addition & 22 deletions .github/workflows/server-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,23 +145,6 @@ jobs:
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

# Here, the GITHUB_REF is of type /refs/head/<branch_name>. We extract branch_name from this by removing the
# first 11 characters. This can be used to build images for several branches
# Since this is an unreleased build, we get the latest released version number, increment the minor number in it,
# append a `-SNAPSHOT` at it's end to prepare the snapshot version number. This is used as the project's version.
- name: Get the version to tag the Docker image
if: steps.run_result.outputs.run_result != 'success' && (steps.changed-files-specific.outputs.any_changed == 'true' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')
id: vars
run: |
# Since this is an unreleased build, we set the version to incremented version number with a
# `-SNAPSHOT` suffix.
latest_released_version="$(git ls-remote --tags --sort=-v:refname "$(git remote | head -1)" 'v*' | awk -F/ '{print $NF; exit}')"
echo "latest_released_version = $latest_released_version"
next_version="$(echo "$latest_released_version" | awk -F. -v OFS=. '{ $NF++; print }')"
echo "next_version = $next_version"
echo version=$next_version-SNAPSHOT >> $GITHUB_OUTPUT
echo tag=$(echo ${GITHUB_REF:11}) >> $GITHUB_OUTPUT
# Build the code
- name: Build
if: steps.run_result.outputs.run_result != 'success' && (steps.changed-files-specific.outputs.any_changed == 'true' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')
Expand All @@ -176,10 +159,6 @@ jobs:
APPSMITH_ENVFILE_PATH: /tmp/dummy.env
APPSMITH_VERBOSE_LOGGING_ENABLED: false
run: |
mvn --batch-mode versions:set \
-DnewVersion=${{ steps.vars.outputs.version }} \
-DgenerateBackupPoms=false \
-DprocessAllModules=true
./build.sh -DskipTests
# Test the code
Expand Down Expand Up @@ -246,7 +225,7 @@ jobs:
if [ "$reponame" = "appsmith" ]; then export repodir="CE"; fi
if [ "$reponame" = "appsmith-ee" ]; then export repodir="EE"; fi
cd cibuildcache/$repodir/release/server
git lfs pull ./server.jar
git lfs pull ./server.jar
mv ./server.jar ../../../../../server.jar
cd ../../../../../
tar -xzvf ./server.jar
Expand Down
10 changes: 4 additions & 6 deletions app/client/craco.common.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,10 @@ module.exports = {
ignoreWarnings: [
function ignoreSourcemapsloaderWarnings(warning) {
return (
(warning.module &&
warning.module.resource.includes("node_modules") &&
warning.details &&
warning.details.includes("source-map-loader")) ||
warning.module.resource.includes("/node_modules/@babel/standalone/babel.js")
);
(warning.module?.resource.includes("node_modules") &&
warning.details?.includes("source-map-loader")) ||
warning.module?.resource.includes("/node_modules/@babel/standalone/babel.js")
) ?? false;
},
],
plugins: [
Expand Down
2 changes: 1 addition & 1 deletion app/client/cypress/e2e/GSheet/AllAccess_Spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
} from "../../support/Objects/ObjectsCore";

const workspaceName = "gsheet apps";
const dataSourceName = "gsheet";
const dataSourceName = "gsheet-all";
let appName = "gsheet-app";
let spreadSheetName = "test-sheet";
describe(
Expand Down
28 changes: 21 additions & 7 deletions app/client/cypress/e2e/GSheet/Misc_Spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import EditorNavigation, {
} from "../../support/Pages/EditorNavigation";

const workspaceName = "gsheet apps";
const dataSourceName = "gsheet";
const dataSourceName = "gsheet-all";
let appName = "gsheet-app";
let spreadSheetName = "test-sheet";
describe(
Expand Down Expand Up @@ -118,15 +118,27 @@ describe(

// Select the spreadsheet and sheet name
PageLeftPane.expandCollapseItem(spreadSheetName);
agHelper.AssertElementAbsence(
locators._btnSpinner,
Cypress.config("defaultCommandTimeout"),
);
PageLeftPane.assertPresence("Sheet1");
PageLeftPane.expandCollapseItem("Sheet1");
agHelper.ClickButton("Generate new page");
agHelper.GetNClick(dataSources._selectTableDropdown, 0, true);
agHelper.AssertElementAbsence(
locators._btnSpinner,
Cypress.config("defaultCommandTimeout"),
);
agHelper.GetNClickByContains(
dataSources._dropdownOption,
spreadSheetName,
);
agHelper.GetNClick(dataSources._selectSheetNameDropdown, 0, true);
agHelper.AssertElementAbsence(
locators._btnSpinner,
Cypress.config("defaultCommandTimeout"),
);
agHelper.GetNClickByContains(dataSources._dropdownOption, "Sheet1");

// Click on generate page button and verify the page is generated
Expand Down Expand Up @@ -178,19 +190,21 @@ describe(

// Select the datasource, spreadsheet and sheet name
agHelper.GetNClick(dataSources._selectDatasourceDropdown);
agHelper.GetNClick(
locators._visibleTextSpan(dataSourceName),
1,
true,
1000,
agHelper.GetNClick(locators._visibleTextSpan(dataSourceName), 1, true);
agHelper.AssertElementAbsence(
locators._btnSpinner,
Cypress.config("defaultCommandTimeout"),
);
agHelper.GetNClick(dataSources._selectTableDropdown, 0, true);
agHelper.GetNClickByContains(
dataSources._dropdownOption,
spreadSheetName,
0,
true,
1000,
);
agHelper.AssertElementAbsence(
locators._btnSpinner,
Cypress.config("defaultCommandTimeout"),
);
agHelper.GetNClick(dataSources._selectSheetNameDropdown, 0, true);
agHelper.GetNClickByContains(dataSources._dropdownOption, "Sheet1");
Expand Down
2 changes: 1 addition & 1 deletion app/client/cypress/e2e/GSheet/ReadNWrite_Access_Spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe(
function () {
const workspaceName = "gsheet apps";
const dataSourceName = {
allAccess: "gsheet",
allAccess: "gsheet-all",
readNWrite: "gsheet-read-write",
};
let appName = "gsheet-app";
Expand Down
2 changes: 1 addition & 1 deletion app/client/cypress/e2e/GSheet/ReadOnly_Access_Spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe(
function () {
const workspaceName = "gsheet apps";
const dataSourceName = {
allAccess: "gsheet",
allAccess: "gsheet-all",
readOnly: "gsheet-read",
};
let appName = "gsheet-app";
Expand Down
4 changes: 2 additions & 2 deletions app/client/cypress/e2e/GSheet/WidgetBinding_AllAccess_Spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
} from "../../support/Pages/EditorNavigation";

const workspaceName = "gsheet apps";
const dataSourceName = "gsheet";
const dataSourceName = "gsheet-all";
let appName = "gsheet-app";
let spreadSheetName = "test-sheet";
describe(
Expand Down Expand Up @@ -82,7 +82,7 @@ describe(

after("Delete app", function () {
// Delete spreadsheet and app
PageLeftPane.switchSegment(PagePaneSegment.Explorer);
PageLeftPane.switchSegment(PagePaneSegment.Queries);
gsheetHelper.DeleteSpreadsheetQuery(dataSourceName, spreadSheetName);
cy.get("@postExecute").then((interception: any) => {
expect(interception.response.body.data.body.message).to.deep.equal(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ describe(

after("Delete app", function () {
// Delete data in spreadsheet and app
PageLeftPane.switchSegment(PagePaneSegment.Explorer);
PageLeftPane.switchSegment(PagePaneSegment.Queries);
gsheetHelper.EnterBasicQueryValues(
"Delete One",
dataSourceName,
Expand Down
8 changes: 4 additions & 4 deletions app/client/cypress/e2e/Regression/Apps/EchoApiCMS_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import {
} from "../../../support/Objects/ObjectsCore";
import EditorNavigation, {
EntityType,
PageLeftPane,
PagePaneSegment,
} from "../../../support/Pages/EditorNavigation";

describe(
Expand Down Expand Up @@ -88,8 +90,7 @@ describe(
cy.get(appPage.confirmButton).closest("div").click({ force: true });
cy.get(appPage.closeButton).closest("div").click({ force: true });
cy.xpath(appPage.pagebutton).click({ force: true });
//cy.xpath(appPage.datasourcesbutton).click({ force: true });
cy.CheckAndUnfoldEntityItem("Queries/JS");
PageLeftPane.switchSegment(PagePaneSegment.Queries);
cy.xpath(appPage.postApi).click({ force: true });
cy.ResponseCheck("Test");
// cy.ResponseCheck("Task completed");
Expand All @@ -106,8 +107,7 @@ describe(
cy.xpath(appPage.deleteTaskText).should("be.visible");
cy.get(appPage.confirmButton).closest("div").click({ force: true });
cy.xpath(appPage.pagebutton).click({ force: true });
//cy.xpath(appPage.datasourcesbutton).click({ force: true });
cy.xpath(appPage.deleteApi).click({ force: true });
EditorNavigation.SelectEntityByName("delete_proposal", EntityType.Api);
cy.ResponseCheck("[email protected]");
cy.ResponseCheck("Recusan");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import EditorNavigation, {
describe("removeValue Action test", { tags: ["@tag.JS"] }, () => {
before(() => {
entityExplorer.DragDropWidgetNVerify("buttonwidget", 100, 100);
PageLeftPane.switchSegment(PagePaneSegment.Explorer);
PageLeftPane.switchSegment(PagePaneSegment.JS);
});

it("1. Feature 11639 : Remove store value", function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import EditorNavigation, {
describe("storeValue Action test", { tags: ["@tag.JS"] }, () => {
before(() => {
entityExplorer.DragDropWidgetNVerify("buttonwidget", 100, 100);
PageLeftPane.switchSegment(PagePaneSegment.Explorer);
PageLeftPane.switchSegment(PagePaneSegment.JS);
});

it("1. Bug 14653: Running consecutive storeValue actions and await", function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import {
} from "../../../../support/Objects/ObjectsCore";
import EditorNavigation, {
EntityType,
PageLeftPane,
PagePaneSegment,
} from "../../../../support/Pages/EditorNavigation";
import PageList from "../../../../support/Pages/PageList";

Expand Down Expand Up @@ -253,6 +255,7 @@ describe("Autocomplete tests", { tags: ["@tag.JS"] }, () => {
entityType: entityItems.JSObject,
});
});
PageLeftPane.switchSegment(PagePaneSegment.Queries);
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Api1",
action: "Delete",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe(
});

it("3. Binding second input widget with API on PageLoad data and default data from input1 widget ", function () {
cy.selectEntityByName("Input3");
EditorNavigation.SelectEntityByName("Input3", EntityType.Widget);
cy.get(widgetsPage.defaultInput).type(testdata.pageloadBinding, {
parseSpecialCharSequences: false,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ import EditorNavigation, {
EntityType,
} from "../../../../support/Pages/EditorNavigation";

const explorer = require("../../../../locators/explorerlocators.json");
import {
agHelper,
entityExplorer,
deployMode,
} from "../../../../support/Objects/ObjectsCore";
import { agHelper, deployMode } from "../../../../support/Objects/ObjectsCore";
import {
WIDGET,
PROPERTY_SELECTOR,
Expand Down Expand Up @@ -49,7 +44,6 @@ Object.entries(widgetsToTest).forEach(([widgetSelector, testConfig]) => {
});

it(`1. DragDrop Widget ${testConfig.widgetName}`, function () {
cy.get(explorer.addWidget).click();
cy.dragAndDropToCanvas(widgetSelector, { x: 300, y: 200 });
cy.get(getWidgetSelector(widgetSelector)).should("exist");
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import EditorNavigation, {
EntityType,
PageLeftPane,
} from "../../../../support/Pages/EditorNavigation";

const commonlocators = require("../../../../locators/commonlocators.json");
Expand Down Expand Up @@ -68,7 +67,6 @@ describe(
});

it("3. Validate onSearchTextChanged function is called when configured for search text", function () {
PageLeftPane.expandCollapseItem("Widgets");
EditorNavigation.SelectEntityByName("Table1", EntityType.Widget, {}, [
"Container3",
]);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import EditorNavigation, {
EntityType,
PageLeftPane,
PagePaneSegment,
} from "../../../../support/Pages/EditorNavigation";

const commonlocators = require("../../../../locators/commonlocators.json");
const publish = require("../../../../locators/publishWidgetspage.json");
const testdata = require("../../../../fixtures/testdata.json");
import {
entityExplorer,
agHelper,
deployMode,
} from "../../../../support/Objects/ObjectsCore";
import { agHelper, deployMode } from "../../../../support/Objects/ObjectsCore";

describe(
"Binding the multiple input Widget",
Expand Down Expand Up @@ -53,7 +51,7 @@ describe(
});

it("3. Binding second input widget with first input widget and validating", function () {
cy.selectEntityByName("Input2");
EditorNavigation.SelectEntityByName("Input2", EntityType.Widget);
cy.testJsontext("defaultvalue", testdata.defaultMoustacheData + "}}");

cy.wait("@updateLayout").should(
Expand All @@ -76,8 +74,8 @@ describe(
});

it("4. Binding third input widget with first input widget and validating", function () {
cy.CheckAndUnfoldWidgets();
cy.selectEntityByName("Input3");
PageLeftPane.switchSegment(PagePaneSegment.UI);
EditorNavigation.SelectEntityByName("Input3", EntityType.Widget);
cy.testJsontext("defaultvalue", testdata.defaultMoustacheData + "}}");

cy.wait("@updateLayout").should(
Expand Down
Loading

0 comments on commit 7e2d039

Please sign in to comment.