diff --git a/.gitlab/ci/version.yml b/.gitlab/ci/version.yml index b27315b73c1b8e6118ed9b05aa871f1a09781eb3..751f8821216c61424000ed833f5f92b74978909a 100644 --- a/.gitlab/ci/version.yml +++ b/.gitlab/ci/version.yml @@ -1,10 +1,10 @@ variables: BUILD_OS: "debian" - CHROME_VERSION: "123" + CHROME_VERSION: "133" DOCKER_VERSION: "27.4.1" EXIFTOOL_VERSION: "12.60" GCLOUD_VERSION: "413" - GIT_VERSION: "2.49" + GIT_VERSION: "2.51" GO_VERSION: "1.23" GRAPHICSMAGICK_VERSION: "1.3.36" HELM_VERSION: "3.16" diff --git a/.gitlab/ci/workhorse.gitlab-ci.yml b/.gitlab/ci/workhorse.gitlab-ci.yml index 140d98c7202ef79ed93a0af7a5b0410463a1f791..54c9821b5ed68ad4a200c06e8ba66bb234f8c592 100644 --- a/.gitlab/ci/workhorse.gitlab-ci.yml +++ b/.gitlab/ci/workhorse.gitlab-ci.yml @@ -46,7 +46,7 @@ workhorse:test go: extends: .workhorse:test parallel: matrix: - - GO_VERSION: ["1.22", "1.23", "1.24"] + - GO_VERSION: ["1.23", "1.24", "1.25"] REDIS_VERSION: ["7.0", "6.2"] script: - make -C workhorse test-coverage @@ -70,7 +70,7 @@ workhorse:test fips: - setup-test-env-fips parallel: matrix: - - GO_VERSION: ["1.22", "1.23", "1.24"] + - GO_VERSION: ["1.23", "1.24", "1.25"] REDIS_VERSION: ["7.0", "6.2"] image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/${BUILD_OS}-${OS_VERSION}-ruby-${RUBY_VERSION}-golang-${GO_VERSION}-rust-${RUST_VERSION}:rubygems-${RUBYGEMS_VERSION}-git-${GIT_VERSION}-exiftool-${EXIFTOOL_VERSION} variables: diff --git a/ee/spec/features/work_items/detail/work_item_detail_spec.rb b/ee/spec/features/work_items/detail/work_item_detail_spec.rb index a4f1d432dd0cce5d2b6b2afafe66f4632c038e06..76b4ed9728f34e1a0da91c2e91d314fb2410a884 100644 --- a/ee/spec/features/work_items/detail/work_item_detail_spec.rb +++ b/ee/spec/features/work_items/detail/work_item_detail_spec.rb @@ -5,7 +5,7 @@ RSpec.describe 'Work item detail', :js, feature_category: :team_planning do include ListboxHelpers - let_it_be_with_reload(:user) { create(:user) } + let_it_be_with_refind(:user) { create(:user) } let_it_be(:group) { create(:group, :nested) } let_it_be(:root_group) { group.root_ancestor } diff --git a/ee/spec/features/work_items/epics/epic_work_item_detail_spec.rb b/ee/spec/features/work_items/epics/epic_work_item_detail_spec.rb index 4d96aaec99219cc7e9be1a7e9bf3b94cc8e86756..4f930c7cf8cb214feabcd2e61db16ccab89161e0 100644 --- a/ee/spec/features/work_items/epics/epic_work_item_detail_spec.rb +++ b/ee/spec/features/work_items/epics/epic_work_item_detail_spec.rb @@ -6,8 +6,8 @@ include DragTo include ListboxHelpers - let_it_be_with_reload(:user) { create(:user) } - let_it_be_with_reload(:user2) { create(:user, name: 'John') } + let_it_be_with_refind(:user) { create(:user) } + let_it_be_with_refind(:user2) { create(:user, name: 'John') } let_it_be(:group) { create(:group, :nested, developers: user) } let_it_be(:label) { create(:group_label, group: group) } diff --git a/qa/Dockerfile b/qa/Dockerfile index 63d08e6468175eca9299140bbf82ecb1b569cca3..e0f3f5047dd0d7b215c48060c7dc3856d87e93a5 100644 --- a/qa/Dockerfile +++ b/qa/Dockerfile @@ -1,5 +1,5 @@ ARG BUILD_OS=debian -ARG CHROME_VERSION=123 +ARG CHROME_VERSION=133 ARG DOCKER_VERSION=24.0.5 ARG GCLOUD_VERSION=413 ARG GIT_VERSION=2.45 diff --git a/spec/features/group_variables_spec.rb b/spec/features/group_variables_spec.rb index c2222be1e901e3d826500f954db00a3910a88818..189ec46871ec801bc901e989925957b047096c05 100644 --- a/spec/features/group_variables_spec.rb +++ b/spec/features/group_variables_spec.rb @@ -10,7 +10,7 @@ before do group.add_owner(user) - gitlab_sign_in(user) + sign_in(user) visit page_path wait_for_requests diff --git a/spec/features/snippets/user_creates_snippet_spec.rb b/spec/features/snippets/user_creates_snippet_spec.rb index e49b4707e2ed865c2dddc8682120118d19d8813e..4245839cfd93b4f6ef5d9b6e280fdb78fac0ee30 100644 --- a/spec/features/snippets/user_creates_snippet_spec.rb +++ b/spec/features/snippets/user_creates_snippet_spec.rb @@ -146,9 +146,7 @@ def fill_form # not anymore as requests when they come straight from memory cache. # accept_confirm is needed because of https://gitlab.com/gitlab-org/gitlab/-/issues/262102 reqs = inspect_requests do - visit("#{link}?ran=#{SecureRandom.base64(20)}") do - page.driver.browser.switch_to.alert.accept - end + visit("#{link}?ran=#{SecureRandom.base64(20)}") end expect(reqs.first.status_code).to eq(200) end diff --git a/spec/features/work_items/detail/work_item_detail_spec.rb b/spec/features/work_items/detail/work_item_detail_spec.rb index 6b67e5d933e34787e86d364f22517259bdb46695..3a86cba20029ce8e61dde9627e0bf0b7c94907ef 100644 --- a/spec/features/work_items/detail/work_item_detail_spec.rb +++ b/spec/features/work_items/detail/work_item_detail_spec.rb @@ -5,8 +5,8 @@ RSpec.describe 'Work item detail', :js, feature_category: :team_planning do include ListboxHelpers - let_it_be_with_reload(:user) { create(:user) } - let_it_be_with_reload(:user2) { create(:user, name: 'John') } + let_it_be_with_refind(:user) { create(:user) } + let_it_be_with_refind(:user2) { create(:user, name: 'John') } let_it_be(:group) { create(:group) } let_it_be(:project) { create(:project, :public, :repository, group: group) } diff --git a/spec/support/capybara.rb b/spec/support/capybara.rb index 10bf75f577f0f8e99c1bd287645c2a1ca343cd5b..572d1af6661ac342abcfa60cb2357b640785ef63 100644 --- a/spec/support/capybara.rb +++ b/spec/support/capybara.rb @@ -42,6 +42,25 @@ # Chrome won't work properly in a Docker container in sandbox mode options.add_argument("no-sandbox") + # Limit renderer processes without breaking WebDriver + options.add_argument('--renderer-process-limit=3') + + # Reduce memory allocation + options.add_argument('--memory-pressure-off') + options.add_argument('--max_old_space_size=512') + options.add_argument('--js-flags=--max-old-space-size=512') + + # Disable features that spawn extra processes + options.add_argument('--disable-features=IsolateOrigins,site-per-process') + options.add_argument('--disable-site-isolation-trials') + + # Run GPU in-process (less breaking than full single-process) + options.add_argument('--in-process-gpu') + + # Limit virtual memory pre-allocation + options.add_argument('--disable-gpu-memory-buffer-video-frames') + options.add_argument('--disable-gpu-memory-buffer-compositor-resources') + options.add_argument("disable-search-engine-choice-screen") # Ensure the Chrome locale is `en` so all dates are deterministic regardless of local settings @@ -63,9 +82,6 @@ # Disable /dev/shm use in CI. See https://gitlab.com/gitlab-org/gitlab/issues/4252 options.add_argument("disable-dev-shm-usage") if ENV['CI'] || ENV['CI_SERVER'] - # Explicitly set user-data-dir to prevent crashes. See https://gitlab.com/gitlab-org/gitlab-foss/issues/58882#note_179811508 - options.add_argument("user-data-dir=/tmp/chrome") if ENV['CI'] || ENV['CI_SERVER'] - # Set chrome default download path if ENV['DEFAULT_CHROME_DOWNLOAD_PATH'] options.add_preference("download.default_directory", ENV['DEFAULT_CHROME_DOWNLOAD_PATH']) diff --git a/spec/support/generate-seed-repo-rb b/spec/support/generate-seed-repo-rb index 59931e900a97f1bc96a6984d5a7e267513a6fae6..22ff8b94255049f8e069ab92ab48f936e6022383 100755 --- a/spec/support/generate-seed-repo-rb +++ b/spec/support/generate-seed-repo-rb @@ -43,6 +43,8 @@ end main __END__ +# frozen_string_literal: true + # This file is generated by <%= SCRIPT_NAME %>. Do not edit this file manually. # # Seed repo: @@ -50,58 +52,58 @@ __END__ module SeedRepo module BigCommit - ID = "913c66a37b4a45b9769037c55c2d238bd0942d2e".freeze - PARENT_ID = "cfe32cf61b73a0d5e9f13e774abde7ff789b1660".freeze - MESSAGE = "Files, encoding and much more".freeze - AUTHOR_FULL_NAME = "Dmitriy Zaporozhets".freeze + ID = "913c66a37b4a45b9769037c55c2d238bd0942d2e" + PARENT_ID = "cfe32cf61b73a0d5e9f13e774abde7ff789b1660" + MESSAGE = "Files, encoding and much more" + AUTHOR_FULL_NAME = "Dmitriy Zaporozhets" FILES_COUNT = 2 end module Commit - ID = "570e7b2abdd848b95f2f578043fc23bd6f6fd24d".freeze - PARENT_ID = "6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9".freeze - MESSAGE = "Change some files\n\nSigned-off-by: Dmitriy Zaporozhets \n".freeze - AUTHOR_FULL_NAME = "Dmitriy Zaporozhets".freeze + ID = "570e7b2abdd848b95f2f578043fc23bd6f6fd24d" + PARENT_ID = "6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9" + MESSAGE = "Change some files\n\nSigned-off-by: Dmitriy Zaporozhets \n" + AUTHOR_FULL_NAME = "Dmitriy Zaporozhets" FILES = ["files/ruby/popen.rb", "files/ruby/regex.rb"].freeze FILES_COUNT = 2 - C_FILE_PATH = "files/ruby".freeze + C_FILE_PATH = "files/ruby" C_FILES = ["popen.rb", "regex.rb", "version_info.rb"].freeze - BLOB_FILE = %{%h3= @key.title\n%hr\n%pre= @key.key\n.actions\n = link_to 'Remove', @key, :confirm => 'Are you sure?', :method => :delete, :class => \"btn danger delete-key\"\n\n\n}.freeze - BLOB_FILE_PATH = "app/views/keys/show.html.haml".freeze + BLOB_FILE = %(%h3= @key.title\n%hr\n%pre= @key.key\n.actions\n = link_to 'Remove', @key, :confirm => 'Are you sure?', :method => :delete, :class => \"btn danger delete-key\"\n\n\n) + BLOB_FILE_PATH = "app/views/keys/show.html.haml" end module EmptyCommit - ID = "b0e52af38d7ea43cf41d8a6f2471351ac036d6c9".freeze - PARENT_ID = "40f4a7a617393735a95a0bb67b08385bc1e7c66d".freeze - MESSAGE = "Empty commit".freeze - AUTHOR_FULL_NAME = "Rémy Coutable".freeze + ID = "b0e52af38d7ea43cf41d8a6f2471351ac036d6c9" + PARENT_ID = "40f4a7a617393735a95a0bb67b08385bc1e7c66d" + MESSAGE = "Empty commit" + AUTHOR_FULL_NAME = "Rémy Coutable" FILES = [].freeze FILES_COUNT = FILES.count end module EncodingCommit - ID = "40f4a7a617393735a95a0bb67b08385bc1e7c66d".freeze - PARENT_ID = "66028349a123e695b589e09a36634d976edcc5e8".freeze - MESSAGE = "Add ISO-8859-encoded file".freeze - AUTHOR_FULL_NAME = "Stan Hu".freeze + ID = "40f4a7a617393735a95a0bb67b08385bc1e7c66d" + PARENT_ID = "66028349a123e695b589e09a36634d976edcc5e8" + MESSAGE = "Add ISO-8859-encoded file" + AUTHOR_FULL_NAME = "Stan Hu" FILES = ["encoding/iso8859.txt"].freeze FILES_COUNT = FILES.count end module FirstCommit - ID = "1a0b36b3cdad1d2ee32457c102a8c0b7056fa863".freeze + ID = "1a0b36b3cdad1d2ee32457c102a8c0b7056fa863" PARENT_ID = nil - MESSAGE = "Initial commit".freeze - AUTHOR_FULL_NAME = "Dmitriy Zaporozhets".freeze + MESSAGE = "Initial commit" + AUTHOR_FULL_NAME = "Dmitriy Zaporozhets" FILES = ["LICENSE", ".gitignore", "README.md"].freeze FILES_COUNT = 3 end module LastCommit - ID = <%= capture!(%w[git show -s --format=%H HEAD], repo).inspect %>.freeze - PARENT_ID = <%= capture!(%w[git show -s --format=%P HEAD], repo).split.last.inspect %>.freeze - MESSAGE = <%= capture!(%w[git show -s --format=%s HEAD], repo).inspect %>.freeze - AUTHOR_FULL_NAME = <%= capture!(%w[git show -s --format=%an HEAD], repo).inspect %>.freeze + ID = <%= capture!(%w[git show -s --format=%H HEAD], repo).inspect %> + PARENT_ID = <%= capture!(%w[git show -s --format=%P HEAD], repo).split.last.inspect %> + MESSAGE = <%= capture!(%w[git show -s --format=%s HEAD], repo).inspect %> + AUTHOR_FULL_NAME = <%= capture!(%w[git show -s --format=%an HEAD], repo).inspect %> FILES = <%= parents = capture!(%w[git show -s --format=%P HEAD], repo).split merge_base = parents.size > 1 ? capture!(%w[git merge-base] + parents, repo) : parents.first @@ -111,7 +113,7 @@ module SeedRepo end module Repo - HEAD = "master".freeze + HEAD = "master" BRANCHES = %w[ <%= capture!(%W[git for-each-ref --format=#{' ' * 3}%(refname:strip=2) refs/heads/], repo) %> ].freeze @@ -121,9 +123,9 @@ module SeedRepo end module RubyBlob - ID = "7e3e39ebb9b2bf433b4ad17313770fbe4051649c".freeze - NAME = "popen.rb".freeze - CONTENT = <<-eos.freeze + ID = "7e3e39ebb9b2bf433b4ad17313770fbe4051649c" + NAME = "popen.rb" + CONTENT = <<-EOS require 'fileutils' require 'open3' @@ -161,6 +163,6 @@ module Popen return @cmd_output, @cmd_status end end - eos + EOS end end diff --git a/spec/support/unpack-gitlab-git-test b/spec/support/unpack-gitlab-git-test index 5d5f1b7d0829536de3822d3b888769f205a3e4b9..43457e1024b7a505cb6d43cc3878243918b5e2b6 100755 --- a/spec/support/unpack-gitlab-git-test +++ b/spec/support/unpack-gitlab-git-test @@ -13,7 +13,9 @@ def main # We want to store the refs in a packed-refs file because if we don't # they can get mangled by filesystems. abort unless system(*GIT, *%w[pack-refs --all]) - abort unless system(*GIT, 'fsck') + # Disable the fsck for now because this fails due to the presence + # of refs/{heads,tags}/.gitkeep + # abort unless system(*GIT, 'fsck') end # We don't want contributors to commit new pack files because those