Skip to content

Commit

Permalink
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
Browse files Browse the repository at this point in the history
…o action-redesign/dbform-update
  • Loading branch information
albinAppsmith committed Sep 17, 2024
2 parents 7c88887 + 7421748 commit e8fe475
Show file tree
Hide file tree
Showing 595 changed files with 5,085 additions and 3,646 deletions.
2 changes: 1 addition & 1 deletion .github/config.json

Large diffs are not rendered by default.

86 changes: 66 additions & 20 deletions .github/workflows/build-client-server-count.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ jobs:
with:
pr: ${{fromJson(needs.file-check.outputs.pr)}}
run_count: ${{fromJson(needs.file-check.outputs.run_count)}}


ci-test-limited-existing-docker-image:
needs: [file-check]
Expand Down Expand Up @@ -260,39 +261,62 @@ jobs:
with:
name: cypress-repeat-logs
path: app/client

- name: Download the ci_test_status
uses: actions/download-artifact@v4
with:
name: ci_test_status
path: app/client

- name: Read and Set File Content as ENV Variable
id: set-summary-content
run: |
summary_content=$(cat app/client/cy-repeat-summary.txt | tr '\n' ' ')
echo "summary_content=$summary_content" >> $GITHUB_ENV
echo "summary_content=$summary_content" >> $GITHUB_ENV
- name: Check CI Test Result
id: check-ci-test
run: |
# Check if the ci_test_failed flag is set
if [ -f app/client/ci_test_status.txt ]; then
if grep -q "ci_test_failed=true" app/client/ci_test_status.txt; then
echo "Tests failed. Please review the test results."
echo "ci_test_failed=true" >> $GITHUB_ENV
else
echo "Tests passed."
echo "ci_test_failed=false" >> $GITHUB_ENV
fi
else
echo "ci_test_status.txt file not found."
echo "ci_test_failed=unknown" >> $GITHUB_ENV
fi
- name: Add a comment on the PR with new CI failures
if: needs.ci-test-limited.result != 'success' && needs.file-check.outputs.pr != '0'
if: env.ci_test_failed != 'true' && needs.file-check.outputs.pr != '0'
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{fromJson(needs.file-check.outputs.pr)}}
body: |
Workflow run: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>.
Cypress dashboard: <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=${{ github.run_id }}&attempt=${{ github.run_attempt }}&selectiontype=test&testsstatus=failed&specsstatus=fail" target="_blank"> Click here!</a>
The following are new failures, please fix them before merging the PR: ${{env.new_failed_spec_env}}
To know the list of identified flaky tests - <a href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master" target="_blank">Refer here</a>
```
${{ env.summary_content }}
```
- name: Add a comment on the PR when ci-test-limited is success
if: needs.ci-test-limited.result == 'success' && needs.file-check.outputs.pr != '0'
Workflow run: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>.
Cypress dashboard: <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=${{ github.run_id }}&attempt=${{ github.run_attempt }}&selectiontype=test&testsstatus=failed&specsstatus=fail" target="_blank">Click here!</a>
The following are new failures, please fix them before merging the PR: ${{env.new_failed_spec_env}}
To know the list of identified flaky tests - <a href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master" target="_blank">Refer here</a>
```
${{ env.summary_content }}
```
- name: Add a comment on the PR when ci-test-limited is successful
if: env.ci_test_failed == 'true' && needs.file-check.outputs.pr != '0'
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{fromJson(needs.file-check.outputs.pr)}}
body: |
Workflow run: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>.
Cypress dashboard url: <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=${{ github.run_id }}&attempt=${{ github.run_attempt }}" target="_blank">Click here!</a>
All cypress tests have passed 🎉🎉🎉
```
${{ env.summary_content }}
```
Workflow run: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>.
Cypress dashboard url: <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=${{ github.run_id }}&attempt=${{ github.run_attempt }}" target="_blank">Click here!</a>
All Cypress tests have passed 🎉🎉🎉
```
${{ env.summary_content }}
```
- name: Check ci-test-limited set status
if: needs.ci-test-limited.result != 'success'
Expand Down Expand Up @@ -396,16 +420,38 @@ jobs:
with:
name: cypress-repeat-logs
path: app/client

- name: Download the ci_test_status
uses: actions/download-artifact@v4
with:
name: ci_test_status
path: app/client

- name: Read and Set File Content as ENV Variable
id: set-summary-content
run: |
summary_content=$(cat app/client/cy-repeat-summary.txt | tr '\n' ' ')
echo "summary_content=$summary_content" >> $GITHUB_ENV
- name: Check CI Test Result
id: check-ci-test
run: |
# Check if the ci_test_failed flag is set
if [ -f app/client/ci_test_status.txt ]; then
if grep -q "ci_test_failed=true" app/client/ci_test_status.txt; then
echo "Tests failed. Please review the test results."
echo "ci_test_failed=true" >> $GITHUB_ENV
else
echo "Tests passed."
echo "ci_test_failed=false" >> $GITHUB_ENV
fi
else
echo "ci_test_status.txt file not found."
echo "ci_test_failed=unknown" >> $GITHUB_ENV
fi
- name: Add a comment on the PR with new CI failures
if: needs.ci-test-limited-existing-docker-image.result != 'success' && needs.file-check.outputs.pr != '0'
if: env.ci_test_failed != 'true' && needs.file-check.outputs.pr != '0'
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{fromJson(needs.file-check.outputs.pr)}}
Expand All @@ -419,7 +465,7 @@ jobs:
```
- name: Add a comment on the PR when ci-test-limited-existing-docker-image is success
if: needs.ci-test-limited-existing-docker-image.result == 'success' && needs.file-check.outputs.pr != '0'
if: env.ci_test_failed == 'true' && needs.file-check.outputs.pr != '0'
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{fromJson(needs.file-check.outputs.pr)}}
Expand Down
38 changes: 28 additions & 10 deletions .github/workflows/ci-test-limited-with-count.yml
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,18 @@ jobs:
npx cypress-repeat-pro run -n ${{ inputs.run_count }} --force \
--spec ${{ env.specs_to_run }} \
--config-file "cypress_ci_custom.config.ts"
cat cy-repeat-summary.txt
cat cy-repeat-summary.txt
# Define the path for the failure flag file
FAILURE_FLAG_FILE="ci_test_status.txt"
# Check for test results and store the status in the file
if ! grep -q "Total Failed: 0" cy-repeat-summary.txt; then
echo "ci_test_failed=true" > "$FAILURE_FLAG_FILE"
else
echo "ci_test_failed=false" > "$FAILURE_FLAG_FILE"
fi
cat "$FAILURE_FLAG_FILE"
- name: Trim number of cypress log files
if: failure()
run: |
Expand All @@ -363,9 +373,17 @@ jobs:
name: cypress-repeat-logs
path: ${{ github.workspace }}/app/client/cy-repeat-summary.txt
overwrite: true

- name: Upload ci_test_status.txt artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: ci_test_status
path: ${{ github.workspace }}/app/client/ci_test_status.txt
overwrite: true

- name: Upload failed test cypress logs artifact
if: failure()
if: always()
uses: actions/upload-artifact@v4
with:
name: cypress-console-logs
Expand All @@ -381,29 +399,29 @@ jobs:
overwrite: true

- name: Collect CI container logs
if: failure()
if: always()
working-directory: "."
run: |
mkdir -p ~/dockerlogs
docker logs appsmith 2>&1 > ~/dockerlogs/dockerlogs-log.txt
# Upload docker logs
- name: Upload failed test list artifact
if: failure()
if: always()
uses: actions/upload-artifact@v4
with:
name: dockerlogs
path: ~/dockerlogs
overwrite: true

- name: Rename reports
if: failure()
if: always()
run: |
mkdir -p ~/results
mv ${{ github.workspace }}/app/client/results ~/results
- name: Upload cypress report
if: failure()
if: always()
uses: actions/upload-artifact@v4
with:
name: results-${{github.run_attempt}}
Expand All @@ -412,13 +430,13 @@ jobs:

# Set status = failedtest
- name: Set fail if there are test failures
if: failure()
if: always()
run: |
echo "failedtest" > ~/run_result
# Force store previous run result to cache
- name: Store the previous run result
if: failure()
if: always()
uses: actions/cache/save@v4
with:
path: |
Expand All @@ -428,7 +446,7 @@ jobs:
# Upload the log artifact so that it can be used by the test & deploy job in the workflow
- name: Upload server logs bundle on failure
uses: actions/upload-artifact@v4
if: failure()
if: always()
with:
name: server-logs
path: app/server/server-logs.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ jobs:
push-image:
needs: [client-build, rts-build, server-build]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write

if: success()
steps:
# Check out merge commit
Expand Down Expand Up @@ -176,6 +180,9 @@ jobs:
scripts/prepare_server_artifacts.sh
fi
- name: Set up Depot CLI
uses: depot/setup-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
Expand All @@ -193,11 +200,12 @@ jobs:
echo "base_tag=$base_tag" >> $GITHUB_OUTPUT
- name: Push to Docker Hub
uses: docker/build-push-action@v4
uses: depot/build-push-action@v1
with:
context: .
pull: true
push: true
platforms: linux/arm64,linux/amd64
cache-from: ${{ vars.DOCKER_HUB_ORGANIZATION }}/appsmith-${{ vars.EDITION }}:release
tags: |
${{ vars.DOCKER_HUB_ORGANIZATION }}/appsmith-dp:${{ vars.EDITION }}-${{ github.event.client_payload.pull_request.number }}
Expand Down
10 changes: 1 addition & 9 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,18 @@ app/server/appsmith-server/src/test/java/com/appsmith/server/services/FeatureFla

# UI Builders Pod
app/client/generators/* @appsmithorg/anvil-team
app/client/src/actions/autoHeightActions.ts @appsmithorg/anvil-team
app/client/src/actions/autoLayoutActions.ts @appsmithorg/anvil-team
app/client/src/actions/canvasSelectionActions.ts @appsmithorg/anvil-team
app/client/src/actions/reflowActions.ts @appsmithorg/anvil-team
app/client/src/actions/widgetSelectionActions.ts @appsmithorg/anvil-team
app/client/src/components/propertyControls/* @appsmithorg/anvil-team
app/client/src/layoutSystems/* @appsmithorg/anvil-team
app/client/src/layoutSystems/anvil/* @appsmithorg/anvil-team
app/client/src/pages/Editor/Canvas.tsx @appsmithorg/anvil-team
app/client/src/pages/Editor/CanvasLayoutConversion/* @appsmithorg/anvil-team
app/client/src/pages/Editor/PropertyPane/* @appsmithorg/anvil-team
app/client/src/pages/Editor/WidgetsEditor/* @appsmithorg/anvil-team
app/client/src/reducers/entityReducers/autoHeightReducers/* @appsmithorg/anvil-team
app/client/src/reducers/entityReducers/canvasWidgetsReducer.ts @appsmithorg/anvil-team
app/client/src/reflow/* @appsmithorg/anvil-team
app/client/src/sagas/AutoLayoutUpdateSagas.tsx @appsmithorg/anvil-team
app/client/src/sagas/CanvasSagas/* @appsmithorg/anvil-team
app/client/src/sagas/ReplaySaga.ts @appsmithorg/anvil-team
app/client/src/sagas/SnapshotSagas.ts @appsmithorg/anvil-team
Expand All @@ -78,14 +75,9 @@ app/client/src/sagas/WidgetOperationSagas.tsx @appsmithorg/anvil-team
app/client/src/sagas/WidgetOperationUtils.ts @appsmithorg/anvil-team
app/client/src/sagas/WidgetSelectUtils.ts @appsmithorg/anvil-team
app/client/src/sagas/WidgetSelectionSagas.ts @appsmithorg/anvil-team
app/client/src/sagas/autoHeightSagas/* @appsmithorg/anvil-team
app/client/src/sagas/layoutConversionSagas.ts @appsmithorg/anvil-team
app/client/src/selectors/autoHeightSelectors.ts @appsmithorg/anvil-team
app/client/src/selectors/autoLayoutSelectors.tsx @appsmithorg/anvil-team
app/client/src/selectors/canvasSelectors.ts @appsmithorg/anvil-team
app/client/src/selectors/widgetSelectors.ts @appsmithorg/anvil-team
app/client/src/utils/autoHeight/* @appsmithorg/anvil-team
app/client/src/utils/hooks/autoHeightUIHooks.ts @appsmithorg/anvil-team
app/client/src/utils/hooks/useAllowEditorDragToSelect.ts @appsmithorg/anvil-team
app/client/src/utils/hooks/useClickToSelectWidget.tsx @appsmithorg/anvil-team
app/client/src/utils/hooks/useDynamicAppLayout.tsx @appsmithorg/anvil-team
Expand Down
2 changes: 2 additions & 0 deletions app/client/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineConfig } from "cypress";
import { addMatchImageSnapshotPlugin } from "@simonsmith/cypress-image-snapshot/plugin";

export default defineConfig({
watchForFileChanges: false,
Expand Down Expand Up @@ -32,6 +33,7 @@ export default defineConfig({
grepOmitFiltered: true,
},
setupNodeEvents(on, config) {
addMatchImageSnapshotPlugin(on);
require("@cypress/grep/src/plugin")(config);
require("./cypress/plugins/index.js")(on, config);
return config;
Expand Down
2 changes: 1 addition & 1 deletion app/client/cypress/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ARG CHROME_VERSION="126.0.6478.114-1"
ARG YARN_VERSION='1.22.22'
ARG NODE_VERSION='20.11.1'
ARG NODE_VERSION='20.13.1'
ARG CYPRESS_VERSION='13.13.0'
FROM cypress/factory:4.0.2

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 @@ -15,7 +15,7 @@ const workspaceName = "gsheet apps";
const dataSourceName = "gsheet-all";
let appName = "gsheet-app";
let spreadSheetName = "test-sheet";
describe(
describe.skip(
"GSheet-Functional Tests With All Access",
{ tags: ["@tag.Datasource", "@tag.GSheet"] },
function () {
Expand Down
2 changes: 1 addition & 1 deletion app/client/cypress/e2e/GSheet/GsheetMisc_Spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const workspaceName = "gsheet apps";
const dataSourceName = "gsheet-all";
let appName = "gsheet-app";
let spreadSheetName = "test-sheet";
describe(
describe.skip(
"GSheet Miscellaneous Tests",
{ tags: ["@tag.Datasource", "@tag.GSheet"] },
function () {
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 @@ -11,7 +11,7 @@ import {
appSettings,
} from "../../support/Objects/ObjectsCore";

describe(
describe.skip(
"GSheet-Functional Tests With Read/Write Access",
{ tags: ["@tag.Datasource", "@tag.GSheet"] },
function () {
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 @@ -11,7 +11,7 @@ import {
appSettings,
} from "../../support/Objects/ObjectsCore";

describe(
describe.skip(
"GSheet-Functional Tests With Read Access",
{ tags: ["@tag.Datasource", "@tag.GSheet"] },
function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const workspaceName = "gsheet apps";
const dataSourceName = "gsheet-all";
let appName = "gsheet-app";
let spreadSheetName = "test-sheet";
describe(
describe.skip(
"GSheet-widget binding",
{ tags: ["@tag.Datasource", "@tag.GSheet"] },
function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import EditorNavigation, {

describe(
`${ANVIL_EDITOR_TEST}: Anvil tests for Modals`,
{ tags: ["@tag.Anvil"] },
{ tags: ["@tag.Anvil", "@tag.Visual"] },
() => {
before(() => {
// Cleanup the canvas before each test
Expand Down
Loading

0 comments on commit e8fe475

Please sign in to comment.