Skip to content

Commit

Permalink
Merge branch 'refs/heads/release' into fix/add-pane-feature-flag
Browse files Browse the repository at this point in the history
  • Loading branch information
hetunandu committed May 23, 2024
2 parents ec0ac02 + 9faab94 commit f92c783
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 62 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/ci-debugging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,9 @@ jobs:
run: |
sudo /etc/init.d/ssh stop ;
mkdir -p ~/git-server/keys
mkdir -p ~/git-server/repos
docker run --name test-event-driver -d -p 22:22 -p 5001:5001 -p 3306:3306 \
-p 5432:5432 -p 28017:27017 -p 25:25 -p 4200:4200 -p 5000:5000 -p 3001:3000 --privileged --pid=host --ipc=host --volume /:/host -v ~/git-server/keys:/git-server/keys \
-v ~/git-server/repos:/git-server/repos appsmith/test-event-driver:latest
-p 5432:5432 -p 28017:27017 -p 25:25 -p 4200:4200 -p 5000:5000 -p 3001:3000 --privileged --pid=host --ipc=host --volume /:/host -v ~/git-server/keys:/git-server/keys \
appsmith/test-event-driver:latest
cd cicontainerlocal
docker run -d --name appsmith -p 80:80 \
-v "$PWD/stacks:/appsmith-stacks" -e APPSMITH_LICENSE_KEY=$APPSMITH_LICENSE_KEY \
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/ci-test-custom-script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,10 @@ jobs:
run: |
sudo /etc/init.d/ssh stop ;
mkdir -p ~/git-server/keys
mkdir -p ~/git-server/repos
ted_tag="${{inputs.ted_tag}}"
docker run --name test-event-driver -d -p 22:22 -p 5001:5001 -p 3306:3306 \
-p 5432:5432 -p 28017:27017 -p 25:25 -p 4200:4200 -p 5000:5000 -p 3001:3000 -p 6001:6001 -p 8001:8000 --privileged --pid=host --ipc=host --volume /:/host -v ~/git-server/keys:/git-server/keys \
-v ~/git-server/repos:/git-server/repos "appsmith/test-event-driver:${ted_tag:-latest}"
-p 5432:5432 -p 28017:27017 -p 25:25 -p 4200:4200 -p 5000:5000 -p 3001:3000 -p 6001:6001 -p 8001:8000 --privileged --pid=host --ipc=host --volume /:/host -v ~/git-server/keys:/git-server/keys \
"appsmith/test-event-driver:${ted_tag:-latest}"
docker run --name cloud-services -d -p 8000:80 -p 8090:8090 \
--privileged --pid=host --ipc=host --add-host=host.docker.internal:host-gateway\
-e APPSMITH_CLOUD_SERVICES_MONGODB_URI=mongodb://host.docker.internal:27017 \
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/ci-test-limited.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
# In case this is second attempt try restoring status of the prior attempt from cache
- name: Restore the previous run result
id: cache-appsmith
uses: martijnhols/actions-cache@v3.0.2
uses: actions/cache/restore@v4
with:
path: |
~/run_result
Expand Down Expand Up @@ -165,10 +165,9 @@ jobs:
run: |
sudo /etc/init.d/ssh stop ;
mkdir -p ~/git-server/keys
mkdir -p ~/git-server/repos
docker run --name test-event-driver -d -p 22:22 -p 5001:5001 -p 3306:3306 \
-p 5432:5432 -p 28017:27017 -p 25:25 -p 4200:4200 -p 5000:5000 -p 3001:3000 -p 6001:6001 -p 8001:8000 --privileged --pid=host --ipc=host --volume /:/host -v ~/git-server/keys:/git-server/keys \
-v ~/git-server/repos:/git-server/repos appsmith/test-event-driver:latest
-p 5432:5432 -p 28017:27017 -p 25:25 -p 4200:4200 -p 5000:5000 -p 3001:3000 -p 6001:6001 -p 8001:8000 --privileged --pid=host --ipc=host --volume /:/host -v ~/git-server/keys:/git-server/keys \
appsmith/test-event-driver:latest
docker run --name cloud-services -d -p 8000:80 -p 8090:8090 \
--privileged --pid=host --ipc=host --add-host=host.docker.internal:host-gateway\
-e APPSMITH_CLOUD_SERVICES_MONGODB_URI=mongodb://host.docker.internal:27017 \
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/client-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ jobs:
with:
path: app/client/.yarn/cache
key: v1-yarn3-${{ hashFiles('app/client/yarn.lock') }}
restore-keys: |
v1-yarn3-

# Set status = success
- name: Save the status of the run
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/client-prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
# Restoring the cache manually instead
- name: Restore Yarn cache
if: steps.run_result.outputs.run_result != 'success'
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: app/client/.yarn/cache
key: v1-yarn3-${{ hashFiles('app/client/yarn.lock') }}
Expand All @@ -78,4 +78,3 @@ jobs:
with:
path: app/client/.yarn/cache
key: v1-yarn3-${{ hashFiles('app/client/yarn.lock') }}
restore-keys: v1-yarn3-
2 changes: 1 addition & 1 deletion .github/workflows/pr-cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ jobs:
path: ~/combined_failed_spec_ci
overwrite: true

- name: Get Latest flaky Tests
- name: Get latest flaky tests
shell: bash
run: |
curl --request POST --url https://yatin-s-workspace-jk8ru5.us-east-1.xata.sh/db/CypressKnownFailures:main/tables/CypressKnownFailuires/query --header 'Authorization: Bearer ${{ secrets.XATA_TOKEN }}' --header 'Content-Type: application/json'|jq -r |grep Spec|cut -d ':' -f 2 2> /dev/null|sed 's/"//g'|sed 's/,//g' > ~/knownfailures
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/test-build-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,16 @@ jobs:
rm -f ~/combined_failed_spec_ci
# Download failed_spec_ci list for all CI container jobs
- uses: actions/download-artifact@v4
- name: Download failed_spec_ci list for all CI container jobs
uses: actions/download-artifact@v4
if: needs.ci-test.result != 'success'
id: download_ci
with:
name: failed-spec-ci-${{github.run_attempt}}
path: ~/failed_spec_ci

# In case for any ci job failure, create combined failed spec
- name: "combine all specs for CI"
- name: Combine all specs for CI
if: needs.ci-test.result != 'success'
run: |
rm -f ~/combined_failed_spec_ci
Expand Down Expand Up @@ -200,7 +201,7 @@ jobs:
echo "slack_icon=:warning:" >> $GITHUB_OUTPUT
fi
- name: Slack Notification
- name: Slack notification
continue-on-error: true
if: always()
uses: rtCamp/action-slack-notify@v2
Expand Down Expand Up @@ -253,7 +254,7 @@ jobs:

# Upload combined failed CI spec list to a file
# This is done for debugging.
- name: upload combined failed spec
- name: Upload combined failed spec
if: needs.ci-test.result != 'success'
uses: actions/upload-artifact@v4
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.appsmith.external.models.Datasource;
import com.appsmith.server.constants.FieldName;
import com.appsmith.server.domains.Application;
import com.appsmith.server.domains.ApplicationDetail;
import com.appsmith.server.dtos.ApplicationJson;
import com.appsmith.server.dtos.ArtifactExchangeJson;
import lombok.extern.slf4j.Slf4j;
Expand Down Expand Up @@ -80,39 +79,13 @@ public static String sanitizeDatasourceInActionDTO(
return "";
}

/**
* This function sets the current applicationDetail properties to null if the user wants to discard the changes
* and accept from the git repo which doesn't contain these.
* @param importedApplicationDetail
* @param existingApplicationDetail
*/
private static void setPropertiesToApplicationDetail(
ApplicationDetail importedApplicationDetail, ApplicationDetail existingApplicationDetail) {
// If the initial commit to git doesn't contain these keys and if we want to discard the changes,
// the function copyNestedNonNullProperties ignore these properties and the changes are not discarded
if (importedApplicationDetail != null && existingApplicationDetail != null) {
if (importedApplicationDetail.getAppPositioning() == null) {
existingApplicationDetail.setAppPositioning(null);
}

if (importedApplicationDetail.getNavigationSetting() == null) {
existingApplicationDetail.setNavigationSetting(null);
}

if (importedApplicationDetail.getThemeSetting() == null) {
existingApplicationDetail.setThemeSetting(null);
}
}
}

public static void setPropertiesToExistingApplication(
Application importedApplication, Application existingApplication) {
importedApplication.setId(existingApplication.getId());

ApplicationDetail importedUnpublishedAppDetail = importedApplication.getUnpublishedApplicationDetail();
ApplicationDetail importedPublishedAppDetail = importedApplication.getPublishedApplicationDetail();
ApplicationDetail existingUnpublishedAppDetail = existingApplication.getUnpublishedApplicationDetail();
ApplicationDetail existingPublishedAppDetail = existingApplication.getPublishedApplicationDetail();
// Since we don't want to merge the ApplicationDetailObjects we would just assign the imported values directly
existingApplication.setPublishedApplicationDetail(importedApplication.getPublishedApplicationDetail());
existingApplication.setUnpublishedApplicationDetail(importedApplication.getUnpublishedApplicationDetail());

// For the existing application we don't need to default
// value of the flag
Expand All @@ -125,22 +98,13 @@ public static void setPropertiesToExistingApplication(
// These properties are not present in the application when it is created, hence the initial commit
// to git doesn't contain these keys and if we want to discard the changes, the function
// copyNestedNonNullProperties ignore these properties and the changes are not discarded
if (importedUnpublishedAppDetail == null) {
existingApplication.setUnpublishedApplicationDetail(null);
}
if (importedPublishedAppDetail == null) {
existingApplication.setPublishedApplicationDetail(null);
}
if (importedApplication.getPublishedAppLayout() == null) {
existingApplication.setPublishedAppLayout(null);
}
if (importedApplication.getUnpublishedAppLayout() == null) {
existingApplication.setUnpublishedAppLayout(null);
}

setPropertiesToApplicationDetail(importedUnpublishedAppDetail, existingUnpublishedAppDetail);
setPropertiesToApplicationDetail(importedPublishedAppDetail, existingPublishedAppDetail);

copyNestedNonNullProperties(importedApplication, existingApplication);
}

Expand Down
6 changes: 2 additions & 4 deletions deploy/docker/base.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ RUN set -o xtrace \
# Install NodeJS
RUN set -o xtrace \
&& mkdir -p /opt/node \
&& version="20.11.1" \
&& test -n "$version" \
&& curl "https://nodejs.org/dist/v$version/node-v$version-linux-$(uname -m | sed 's/x86_64/x64/; s/aarch64/arm64/').tar.gz" \
| tar -xz -C /opt/node --strip-components 1
&& file="$(curl -sS 'https://nodejs.org/dist/latest-v20.x/' | awk -F\" '$2 ~ /linux-'"$(uname -m | sed 's/x86_64/x64/; s/aarch64/arm64/')"'.tar.gz/ {print $2}')" \
&& curl "https://nodejs.org/dist/latest-v20.x/$file" | tar -xz -C /opt/node --strip-components 1

# Install Caddy
RUN set -o xtrace \
Expand Down

0 comments on commit f92c783

Please sign in to comment.