From 335aa4861ef098bf7f0dcf93791bdedd1f9c2ab5 Mon Sep 17 00:00:00 2001 From: Silviu Popa Date: Thu, 11 Mar 2021 00:06:45 +0200 Subject: [PATCH] [ACA-4344] - increase debounce time on process filters (#6805) * [ACA-4344] - increase debounce time on process filters * Put back S3 for smartrunner cache * Remove useless npm caching Co-authored-by: Silviu Constantin Popa Co-authored-by: Andras Popovics --- .travis.yml | 27 +------------------ .../edit-process-filter-cloud.component.ts | 2 +- scripts/ci/job_hooks/after_e2e.sh | 3 +++ scripts/ci/job_hooks/before_e2e.sh | 3 +++ scripts/ci/job_hooks/before_install.sh | 14 +++++----- 5 files changed, 15 insertions(+), 34 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3d52a0beb3..cf14efac5d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -139,14 +139,9 @@ jobs: script: ./scripts/travis/e2e/core-e2e.sh after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: - create: - name: smartrunner-cache-core - paths: - - "$SMART_RUNNER_DIRECTORY" use: - node_modules_cache - built_artefacts_cache - - smartrunner-cache-core - stage: e2e Test name: content @@ -156,14 +151,9 @@ jobs: script: ./scripts/travis/e2e/content-services-e2e.sh after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: - create: - name: smartrunner-cache-content - paths: - - "$SMART_RUNNER_DIRECTORY" use: - node_modules_cache - built_artefacts_cache - - smartrunner-cache-content - stage: e2e Test name: search @@ -173,14 +163,9 @@ jobs: script: ./scripts/travis/e2e/search-e2e.sh after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: - create: - name: smartrunner-cache-search - paths: - - "$SMART_RUNNER_DIRECTORY" use: - node_modules_cache - built_artefacts_cache - - smartrunner-cache-search - stage: e2e Test name: process @@ -191,14 +176,9 @@ jobs: script: ./scripts/travis/e2e/process-services-e2e.sh after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: - create: - name: smartrunner-cache-process - paths: - - "$SMART_RUNNER_DIRECTORY" use: - node_modules_cache - built_artefacts_cache - - smartrunner-cache-process - stage: e2e Test name: process Cloud @@ -209,14 +189,9 @@ jobs: script: ./scripts/travis/e2e/process-services-cloud-e2e.sh after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: - create: - name: smartrunner-cache-process-cloud - paths: - - "$SMART_RUNNER_DIRECTORY" use: - node_modules_cache - built_artefacts_cache - - smartrunner-cache-process-cloud - stage: Check bundle script: @@ -238,6 +213,6 @@ notifications: - "Message: %{message}" cache: - npm: true + npm: false directories: - tmp diff --git a/lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter-cloud.component.ts b/lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter-cloud.component.ts index 81fd97c0f3..b44b73e002 100644 --- a/lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter-cloud.component.ts @@ -235,7 +235,7 @@ export class EditProcessFilterCloudComponent implements OnInit, OnChanges, OnDes this.filterChangeSub = this.editProcessFilterForm.valueChanges .pipe( - debounceTime(200), + debounceTime(500), filter(() => this.isFormValid()), takeUntil(this.onDestroy$) ) diff --git a/scripts/ci/job_hooks/after_e2e.sh b/scripts/ci/job_hooks/after_e2e.sh index 2db6597e7a..2986e38a84 100755 --- a/scripts/ci/job_hooks/after_e2e.sh +++ b/scripts/ci/job_hooks/after_e2e.sh @@ -1,3 +1,6 @@ #!/usr/bin/env bash +# Upload protractor-smartrunner artifact related to this particular job to S3 +./scripts/ci/utils/artifact-to-s3.sh -a "$SMART_RUNNER_DIRECTORY" -o "$S3_SMART_RUNNER_PATH/$TRAVIS_JOB_ID.tar.bz2" + ./node_modules/@alfresco/adf-cli/bin/adf-cli scan-env --host "$E2E_HOST" -u "$E2E_ADMIN_EMAIL_IDENTITY" -p "$E2E_ADMIN_PASSWORD_IDENTITY" diff --git a/scripts/ci/job_hooks/before_e2e.sh b/scripts/ci/job_hooks/before_e2e.sh index 8c98f1f8ff..bcb8a17230 100755 --- a/scripts/ci/job_hooks/before_e2e.sh +++ b/scripts/ci/job_hooks/before_e2e.sh @@ -11,4 +11,7 @@ mkdir -p ./node_modules/@alfresco/adf-testing/ && \ cp -R ./lib/dist/testing/* ./node_modules/@alfresco/adf-testing/ # ======================================= +# Download protractor-smartrunner artifact related to this particular job from S3, if exists +./scripts/ci/utils/artifact-from-s3.sh -a "$S3_SMART_RUNNER_PATH/$TRAVIS_JOB_ID.tar.bz2" -o "$SMART_RUNNER_DIRECTORY" + ./node_modules/@alfresco/adf-cli/bin/adf-cli scan-env --host "$E2E_HOST" -u "$E2E_ADMIN_EMAIL_IDENTITY" -p "$E2E_ADMIN_PASSWORD_IDENTITY" diff --git a/scripts/ci/job_hooks/before_install.sh b/scripts/ci/job_hooks/before_install.sh index a3018e8659..e025ace3f7 100755 --- a/scripts/ci/job_hooks/before_install.sh +++ b/scripts/ci/job_hooks/before_install.sh @@ -19,17 +19,18 @@ export BASE_HASH="$(git wmerge-base origin/$BRANCH_NAME HEAD)" export HEAD_HASH=${TRAVIS_PULL_REQUEST_SHA:-${TRAVIS_COMMIT}} if [ "${TRAVIS_EVENT_TYPE}" == "push" ]; then - export S3_DBP_ROOT_FOLDER="$S3_DBP_PATH/$TRAVIS_BRANCH" + echo "push" elif [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]; then - export S3_DBP_ROOT_FOLDER="$S3_DBP_PATH/$TRAVIS_PULL_REQUEST" + echo "pull_request" export BASE_HASH="origin/$TRAVIS_BRANCH" elif [ "${TRAVIS_EVENT_TYPE}" == "cron" ]; then - export S3_DBP_ROOT_FOLDER="$S3_DBP_PATH/cron" + echo "cron" else - export S3_DBP_ROOT_FOLDER="$S3_DBP_PATH/api" + echo "api" fi -export S3_DBP_FOLDER="$S3_DBP_ROOT_FOLDER/$TRAVIS_BUILD_ID" +# Cache for protractor smart-runner +export S3_SMART_RUNNER_PATH="$S3_DBP_PATH/smart-runner/$TRAVIS_BUILD_ID" # Cache for node_modules export NODE_VERSION=`node -v` @@ -38,9 +39,8 @@ export PACKAGE_LOCK_SHASUM=`shasum ./package-lock.json | cut -f 1 -d " "` export S3_NODE_MODULES_CACHE_ID=`echo $NODE_VERSION-$PACKAGE_LOCK_SHASUM | shasum | cut -f 1 -d " "` export S3_NODE_MODULES_CACHE_PATH="$S3_DBP_PATH/cache/node_modules/$S3_NODE_MODULES_CACHE_ID.tar.bz2" -echo "S3 DBP root folder: $S3_DBP_ROOT_FOLDER" -echo "S3 DBP destination: $S3_DBP_FOLDER" echo "========== Caching settings ==========" +echo "S3_SMART_RUNNER_PATH: $S3_SMART_RUNNER_PATH" echo "PACKAGE_LOCK_SHASUM: $PACKAGE_LOCK_SHASUM" echo "NODE_VERSION: $NODE_VERSION" echo "S3_NODE_MODULES_CACHE_ID: $S3_NODE_MODULES_CACHE_ID"