From f8b51d6580ad92144fb2e5e68542870946cb85cc Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Thu, 21 Jan 2021 00:47:13 -0800 Subject: [PATCH 1/3] Update hamlit to v2.14.2 This fixes an intermittent seg fault when `GC.compact` is used. Relates to https://gitlab.com/gitlab-com/gl-infra/production/-/issues/3370 CHANGELOG.md: https://github.com/k0kubun/hamlit/blob/master/CHANGELOG.md Diff: https://github.com/k0kubun/hamlit/compare/v2.11.1..v2.14.2 --- Gemfile | 2 +- Gemfile.lock | 4 ++-- changelogs/unreleased/sh-update-hamlit-for-gc.yml | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 changelogs/unreleased/sh-update-hamlit-for-gc.yml diff --git a/Gemfile b/Gemfile index 949802ec510c84..551cbd9d229e9f 100644 --- a/Gemfile +++ b/Gemfile @@ -103,7 +103,7 @@ gem 'hashie-forbidden_attributes' gem 'kaminari', '~> 1.0' # HAML -gem 'hamlit', '~> 2.11.0' +gem 'hamlit', '~> 2.14.2' # Files attachments gem 'carrierwave', '~> 1.3' diff --git a/Gemfile.lock b/Gemfile.lock index 974bc4181f17de..ee5cbc7e2a0b61 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -557,7 +557,7 @@ GEM rainbow rubocop (>= 0.50.0) sysexits (~> 1.1) - hamlit (2.11.0) + hamlit (2.14.2) temple (>= 0.8.2) thor tilt @@ -1388,7 +1388,7 @@ DEPENDENCIES gssapi guard-rspec haml_lint (~> 0.36.0) - hamlit (~> 2.11.0) + hamlit (~> 2.14.2) hangouts-chat (~> 0.0.5) hashie hashie-forbidden_attributes diff --git a/changelogs/unreleased/sh-update-hamlit-for-gc.yml b/changelogs/unreleased/sh-update-hamlit-for-gc.yml new file mode 100644 index 00000000000000..abfb61e0ba7a36 --- /dev/null +++ b/changelogs/unreleased/sh-update-hamlit-for-gc.yml @@ -0,0 +1,5 @@ +--- +title: Update hamlit to v2.14.2 +merge_request: 52177 +author: +type: fixed -- GitLab From 493bbf6b7283f6a8fabff11f01687ab53bb30c13 Mon Sep 17 00:00:00 2001 From: Aleksei Lipniagov Date: Thu, 21 Jan 2021 20:26:01 +0300 Subject: [PATCH 2/3] Set strict order of the classes in xpath search --- ee/spec/features/projects/new_project_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ee/spec/features/projects/new_project_spec.rb b/ee/spec/features/projects/new_project_spec.rb index b30f6e1c4b7fbb..eefb3f14a31266 100644 --- a/ee/spec/features/projects/new_project_spec.rb +++ b/ee/spec/features/projects/new_project_spec.rb @@ -214,7 +214,7 @@ def visit_create_from_group_template_tab it 'the tab shows the list of templates available' do page.within('#custom-group-project-templates') do # Show templates in case they're collapsed - page.all(:xpath, "//div[@class='js-template-group-options template-group-options']", wait: false).each(&:click) + page.all(:xpath, "//div[@class='template-group-options js-template-group-options']", wait: false).each(&:click) expect(page).to have_selector('.template-option', count: template_number) end -- GitLab From 2e7c0c680bf8bf4518f98057f5c95d8d6028ac84 Mon Sep 17 00:00:00 2001 From: Aleksei Lipniagov Date: Thu, 21 Jan 2021 21:35:46 +0300 Subject: [PATCH 3/3] Use query which is not class-order dependent --- ee/spec/features/projects/new_project_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ee/spec/features/projects/new_project_spec.rb b/ee/spec/features/projects/new_project_spec.rb index eefb3f14a31266..3df82832b154a3 100644 --- a/ee/spec/features/projects/new_project_spec.rb +++ b/ee/spec/features/projects/new_project_spec.rb @@ -214,7 +214,7 @@ def visit_create_from_group_template_tab it 'the tab shows the list of templates available' do page.within('#custom-group-project-templates') do # Show templates in case they're collapsed - page.all(:xpath, "//div[@class='template-group-options js-template-group-options']", wait: false).each(&:click) + page.find_all('div', class: ['js-template-group-options', 'template-group-options', '!expanded'], wait: false).each(&:click) expect(page).to have_selector('.template-option', count: template_number) end -- GitLab