Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot
2023-05-28 09:09:34 +00:00
parent 4d1d3eb5e7
commit 9be7fbd46f
5 changed files with 111 additions and 1 deletions

View File

@ -57,7 +57,8 @@ NOT_AVAILABLE_TEMPLATES = {
default: 'No %{role} available',
analytics_instrumentation: group_not_available_template('#g_analyze_analytics_instrumentation', '@gitlab-org/analytics-section/analytics-instrumentation/engineers'),
import_integrate_be: group_not_available_template('#g_manage_import_and_integrate', '@gitlab-org/manage/import-and-integrate'),
import_integrate_fe: group_not_available_template('#g_manage_import_and_integrate', '@gitlab-org/manage/import-and-integrate')
import_integrate_fe: group_not_available_template('#g_manage_import_and_integrate', '@gitlab-org/manage/import-and-integrate'),
remote_development: group_not_available_template('#f_remote_development', '@gitlab-org/remote-development')
}.freeze
def note_for_spin_role(spin, role, category)

View File

@ -0,0 +1,36 @@
#!/usr/bin/env zsh
# frozen_string_literal: true
# This is a convenience script to run the Remote Development category E2E spec(s) against a local
# GDK environment. It sets default values for the necessary environment variables, but allows
# them to be overridden.
#
# For details on how to run this, see the documentation comments at the top of
# qa/qa/specs/features/ee/browser_ui/3_create/remote_development/create_new_workspace_and_terminate_spec.rb
DEFAULT_PASSWORD='5iveL!fe'
export WEBDRIVER_HEADLESS="${WEBDRIVER_HEADLESS:-0}"
export QA_SUPER_SIDEBAR_ENABLED="${QA_SUPER_SIDEBAR_ENABLED:-1}" # This is currently necessary for the test to pass
export GITLAB_USERNAME="${GITLAB_USERNAME:-root}"
export GITLAB_PASSWORD="${GITLAB_PASSWORD:-${DEFAULT_PASSWORD}}"
export DEVFILE_PROJECT="${DEVFILE_PROJECT:-Gitlab Org / Gitlab Shell}"
export AGENT_NAME="${AGENT_NAME:-remotedev}"
export TEST_INSTANCE_URL="${TEST_INSTANCE_URL:-http://gdk.test:3000}"
echo "WEBDRIVER_HEADLESS: ${WEBDRIVER_HEADLESS}"
echo "QA_SUPER_SIDEBAR_ENABLED: ${QA_SUPER_SIDEBAR_ENABLED}"
echo "GITLAB_USERNAME: ${GITLAB_USERNAME}"
echo "DEVFILE_PROJECT: ${AGENT_NAME}"
echo "AGENT_NAME: ${AGENT_NAME}"
echo "TEST_INSTANCE_URL: ${TEST_INSTANCE_URL}"
working_directory="$(git rev-parse --show-toplevel)/qa"
# TODO: https://gitlab.com/gitlab-org/gitlab/-/issues/397005
# Remove the '--tag quarantine' from below once this test is removed from quarantine
(cd "$working_directory" && \
bundle && \
bundle exec bin/qa Test::Instance::All "$TEST_INSTANCE_URL" -- \
--tag quarantine qa/specs/features/ee/browser_ui/3_create/remote_development)

View File

@ -0,0 +1,71 @@
#!/usr/bin/env bash
# This script runs a suite of non-E2E specs related to the Remote Development category, as
# a pre-commit/pre-push "Smoke Test" to catch any broken tests without having to wait
# on CI to catch them. Note that there are some shared/common specs related to
# Remote Development which are not included in this suite.
# https://en.wikipedia.org/wiki/Smoke_testing_(software)
# shellcheck disable=SC2059
set -o errexit # AKA -e - exit immediately on errors (http://mywiki.wooledge.org/BashFAQ/105)
# https://stackoverflow.com/a/28938235
BCyan='\033[1;36m' # Bold Cyan
BRed='\033[1;31m' # Bold Red
BGreen='\033[1;32m' # Bold Green
BBlue='\033[1;34m' # Bold Blue
Color_Off='\033[0m' # Text Reset
function onexit_err() {
local exit_status=${1:-$?}
printf "\n❌❌❌ ${BRed}Remote Development specs failed!${Color_Off} ❌❌❌\n"
exit "${exit_status}"
}
trap onexit_err ERR
set -o errexit
printf "${BCyan}"
printf "\nStarting Remote Development specs.\n\n"
printf "${Color_Off}"
printf "${BBlue}Running Remote Development backend specs${Color_Off}\n\n"
# NOTE: For some reason this test started causing the following spec file in the list to blow up with
# "Failed to write to log, write log/workhorse-test.log: file already closed". Just removing
# it for now.
# ee/spec/graphql/api/workspace_spec.rb
bin/spring rspec -r spec_helper \
ee/spec/features/remote_development/workspaces_spec.rb \
ee/spec/finders/remote_development/workspaces_finder_spec.rb \
ee/spec/graphql/types/query_type_spec.rb \
ee/spec/graphql/types/remote_development/workspace_type_spec.rb \
ee/spec/graphql/types/subscription_type_spec.rb \
ee/spec/lib/remote_development/workspaces/create/create_processor_spec.rb \
ee/spec/lib/remote_development/workspaces/create/devfile_processor_spec.rb \
ee/spec/lib/remote_development/workspaces/create/devfile_validator_spec.rb \
ee/spec/lib/remote_development/workspaces/reconcile/actual_state_calculator_spec.rb \
ee/spec/lib/remote_development/workspaces/reconcile/agent_info_parser_spec.rb \
ee/spec/lib/remote_development/workspaces/reconcile/agent_info_spec.rb \
ee/spec/lib/remote_development/workspaces/reconcile/desired_config_generator_spec.rb \
ee/spec/lib/remote_development/workspaces/reconcile/params_parser_spec.rb \
ee/spec/lib/remote_development/workspaces/reconcile/reconcile_processor_scenarios_spec.rb \
ee/spec/lib/remote_development/workspaces/reconcile/reconcile_processor_spec.rb \
ee/spec/lib/remote_development/workspaces/states_spec.rb \
ee/spec/lib/remote_development/workspaces/update/update_processor_spec.rb \
ee/spec/models/remote_development/remote_development_agent_config_spec.rb \
ee/spec/models/remote_development/workspace_spec.rb \
ee/spec/requests/api/graphql/mutations/remote_development/workspaces/create_spec.rb \
ee/spec/requests/api/graphql/mutations/remote_development/workspaces/update_spec.rb \
ee/spec/requests/api/graphql/remote_development/current_user_workspaces_spec.rb \
ee/spec/requests/api/graphql/remote_development/workspaces_by_ids_spec.rb \
ee/spec/requests/api/graphql/remote_development/workspace_by_id_spec.rb \
ee/spec/requests/api/internal/kubernetes_spec.rb \
ee/spec/services/remote_development/agent_config/update_service_spec.rb \
ee/spec/services/remote_development/workspaces/create_service_spec.rb \
ee/spec/services/remote_development/workspaces/reconcile_service_spec.rb \
ee/spec/services/remote_development/workspaces/update_service_spec.rb \
spec/graphql/types/subscription_type_spec.rb \
printf "\n✅✅✅ ${BGreen}All Remote Development specs passed successfully!${Color_Off} ✅✅✅\n"

View File

@ -112,6 +112,7 @@ RSpec.describe Tooling::Danger::ProjectHelper do
'scripts/glfm/bar.rb' | [:backend]
'scripts/glfm/bar.js' | [:frontend]
'scripts/remote_development/run-smoke-test-suite.sh' | [:remote_development]
'scripts/lib/glfm/bar.rb' | [:backend]
'scripts/lib/glfm/bar.js' | [:frontend]
'scripts/bar.rb' | [:backend, :tooling]

View File

@ -115,6 +115,7 @@ module Tooling
%r{\A((ee|jh)/)?scripts/(lib/)?glfm/.*\.rb} => [:backend],
%r{\A((ee|jh)/)?scripts/(lib/)?glfm/.*\.js} => [:frontend],
%r{\A((ee|jh)/)?scripts/remote_development/.*} => [:remote_development],
%r{\A((ee|jh)/)?scripts/.*\.rb} => [:backend, :tooling],
%r{\A((ee|jh)/)?scripts/.*\.js} => [:frontend, :tooling],
%r{\A((ee|jh)/)?scripts/} => :tooling,