diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-24 21:17:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-24 21:17:30 +0300 |
commit | 0bf82aa5cb3b1ed826dd5c0d46331e17aa60d9e9 (patch) | |
tree | ee5a760877cce0189cc8e765a912a06942f3e4de /scripts | |
parent | efbf661c4224d481c57d0346e26983a805e5ec93 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/rspec_helpers.sh | 10 | ||||
-rw-r--r-- | scripts/utils.sh | 35 |
2 files changed, 30 insertions, 15 deletions
diff --git a/scripts/rspec_helpers.sh b/scripts/rspec_helpers.sh index c6ec773cf78..729892ec84e 100644 --- a/scripts/rspec_helpers.sh +++ b/scripts/rspec_helpers.sh @@ -137,6 +137,9 @@ function debug_rspec_variables() { echoinfo "SKIPPED_FLAKY_TESTS_REPORT_PATH: ${SKIPPED_FLAKY_TESTS_REPORT_PATH}" echoinfo "CRYSTALBALL: ${CRYSTALBALL:-}" + + echoinfo "RSPEC_TESTS_MAPPING_ENABLED: ${RSPEC_TESTS_MAPPING_ENABLED:-}" + echoinfo "RSPEC_TESTS_FILTER_FILE: ${RSPEC_TESTS_FILTER_FILE:-}" } function handle_retry_rspec_in_new_process() { @@ -194,12 +197,7 @@ function rspec_paralellized_job() { cp "${KNAPSACK_RSPEC_SUITE_REPORT_PATH}" "${KNAPSACK_REPORT_PATH}" - export KNAPSACK_TEST_FILE_PATTERN="spec/{,**/}*_spec.rb" - - if [[ "${test_level}" != "foss-impact" ]]; then - export KNAPSACK_TEST_FILE_PATTERN=$(ruby -r./tooling/quality/test_level.rb -e "puts Quality::TestLevel.new(${spec_folder_prefixes}).pattern(:${test_level})") - fi - + export KNAPSACK_TEST_FILE_PATTERN=$(ruby -r./tooling/quality/test_level.rb -e "puts Quality::TestLevel.new(${spec_folder_prefixes}).pattern(:${test_level})") export FLAKY_RSPEC_REPORT_PATH="${rspec_flaky_folder_path}all_${report_name}_report.json" export NEW_FLAKY_RSPEC_REPORT_PATH="${rspec_flaky_folder_path}new_${report_name}_report.json" export SKIPPED_FLAKY_TESTS_REPORT_PATH="${rspec_flaky_folder_path}skipped_flaky_tests_${report_name}_report.txt" diff --git a/scripts/utils.sh b/scripts/utils.sh index 80057842c28..b41bc18deff 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -63,6 +63,19 @@ function test_url() { fi } +function section_start () { + local section_title="${1}" + local section_description="${2:-$section_title}" + + echo -e "section_start:`date +%s`:${section_title}[collapsed=true]\r\e[0K${section_description}" +} + +function section_end () { + local section_title="${1}" + + echo -e "section_end:`date +%s`:${section_title}\r\e[0K" +} + function bundle_install_script() { local extra_install_args="${1}" @@ -72,7 +85,7 @@ function bundle_install_script() { exit 1; fi; - echo -e "section_start:`date +%s`:bundle-install[collapsed=true]\r\e[0KInstalling gems" + section_start "bundle-install" "Installing gems" gem --version bundle --version @@ -93,23 +106,23 @@ function bundle_install_script() { run_timed_command "bundle pristine pg" fi - echo -e "section_end:`date +%s`:bundle-install\r\e[0K" + section_end "bundle-install" } function yarn_install_script() { - echo -e "section_start:`date +%s`:yarn-install[collapsed=true]\r\e[0KInstalling Yarn packages" + section_start "yarn-install" "Installing Yarn packages" retry yarn install --frozen-lockfile - echo -e "section_end:`date +%s`:yarn-install\r\e[0K" + section_end "yarn-install" } function assets_compile_script() { - echo -e "section_start:`date +%s`:assets-compile[collapsed=true]\r\e[0KCompiling frontend assets" + section_start "assets-compile" "Compiling frontend assets" bin/rake gitlab:assets:compile - echo -e "section_end:`date +%s`:assets-compile\r\e[0K" + section_end "assets-compile" } function setup_db_user_only() { @@ -121,9 +134,13 @@ function setup_db_praefect() { } function setup_db() { - run_timed_command "setup_db_user_only" + section_start "setup-db" "Setting up DBs" + + setup_db_user_only run_timed_command_with_metric "bundle exec rake db:drop db:create db:schema:load db:migrate gitlab:db:lock_writes" "setup_db" - run_timed_command "setup_db_praefect" + setup_db_praefect + + section_end "setup-db" } function install_gitlab_gem() { @@ -136,7 +153,7 @@ function install_tff_gem() { } function install_activesupport_gem() { - run_timed_command "gem install activesupport --no-document --version 6.1.7.1" + run_timed_command "gem install activesupport --no-document --version 6.1.7.2" } function install_junit_merge_gem() { |