diff --git a/Gemfile b/Gemfile index 3b76862fc21..c7ed1cd4d71 100644 --- a/Gemfile +++ b/Gemfile @@ -4,9 +4,6 @@ gem 'rails', '~> 6.0.3.1' gem 'bootsnap', '~> 1.4.6' -# Improves copy-on-write performance for MRI -gem 'nakayoshi_fork', '~> 0.0.4' - # Responders respond_to and respond_with gem 'responders', '~> 3.0' diff --git a/Gemfile.lock b/Gemfile.lock index e91ea69279b..b370024b95b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -727,7 +727,6 @@ GEM ruby2_keywords (~> 0.0.1) mustermann-grape (1.0.1) mustermann (>= 1.0.0) - nakayoshi_fork (0.0.4) nap (1.1.0) nenv (0.3.0) net-http-persistent (4.0.0) @@ -1426,7 +1425,6 @@ DEPENDENCIES mini_magick (~> 4.10.1) minitest (~> 5.11.0) multi_json (~> 1.14.1) - nakayoshi_fork (~> 0.0.4) net-ldap (~> 0.16.3) net-ntp net-ssh (~> 6.0) diff --git a/app/assets/images/board-intro.svg b/app/assets/images/board-intro.svg new file mode 100644 index 00000000000..8f04077d598 --- /dev/null +++ b/app/assets/images/board-intro.svg @@ -0,0 +1 @@ + diff --git a/app/assets/images/trial-learn-gitlab-gold-board.png b/app/assets/images/trial-learn-gitlab-gold-board.png deleted file mode 100644 index 615f3662213..00000000000 Binary files a/app/assets/images/trial-learn-gitlab-gold-board.png and /dev/null differ diff --git a/app/assets/javascripts/diffs/components/diff_row.vue b/app/assets/javascripts/diffs/components/diff_row.vue index 9054a8aec04..db03da966c3 100644 --- a/app/assets/javascripts/diffs/components/diff_row.vue +++ b/app/assets/javascripts/diffs/components/diff_row.vue @@ -76,7 +76,12 @@ export default { parallelViewLeftLineType() { return utils.parallelViewLeftLineType(this.line, this.isHighlighted || this.isCommented); }, - coverageState() { + coverageStateLeft() { + if (!this.inline || !this.line.left) return {}; + return this.fileLineCoverage(this.filePath, this.line.left.new_line); + }, + coverageStateRight() { + if (!this.line.right) return {}; return this.fileLineCoverage(this.filePath, this.line.right.new_line); }, classNameMapCellLeft() { @@ -243,7 +248,12 @@ export default { > -
+
'.html_safe, name: token.name, b_end: ''.html_safe } = s_('DeployTokens|This action cannot be undone.') .modal-footer.gl-flex-direction-row - %a{ href: '#', data: { dismiss: 'modal' }, class: 'btn btn-default' }= _('Cancel') - = link_to s_('DeployTokens|Revoke %{name}') % { name: token.name }, revoke_deploy_token_path(group_or_project, token), method: :put, class: 'btn btn-danger text-truncate' + %a{ href: '#', data: { dismiss: 'modal' }, class: 'gl-button btn btn-default' }= _('Cancel') + = link_to s_('DeployTokens|Revoke %{name}') % { name: token.name }, revoke_deploy_token_path(group_or_project, token), method: :put, class: 'gl-button btn btn-danger text-truncate' diff --git a/changelogs/unreleased/297569-inline-code-coverage-visualization-not-displaying-in-inline-mr-dif.yml b/changelogs/unreleased/297569-inline-code-coverage-visualization-not-displaying-in-inline-mr-dif.yml new file mode 100644 index 00000000000..1c368613fca --- /dev/null +++ b/changelogs/unreleased/297569-inline-code-coverage-visualization-not-displaying-in-inline-mr-dif.yml @@ -0,0 +1,5 @@ +--- +title: Fix coverage not showing for inline diffs +merge_request: 51652 +author: +type: fixed diff --git a/changelogs/unreleased/ApplyGitLabUIbuttonstylestobuttonsindeploytokens_revoke_modal-html-haml.yml b/changelogs/unreleased/ApplyGitLabUIbuttonstylestobuttonsindeploytokens_revoke_modal-html-haml.yml new file mode 100644 index 00000000000..578d4128ad6 --- /dev/null +++ b/changelogs/unreleased/ApplyGitLabUIbuttonstylestobuttonsindeploytokens_revoke_modal-html-haml.yml @@ -0,0 +1,5 @@ +--- +title: Update button style of Revoke button on Deploy Tokens page +merge_request: 51079 +author: nuwe1 +type: other diff --git a/changelogs/unreleased/puma-nakayoshi_fork.yml b/changelogs/unreleased/puma-nakayoshi_fork.yml new file mode 100644 index 00000000000..f282be7a56f --- /dev/null +++ b/changelogs/unreleased/puma-nakayoshi_fork.yml @@ -0,0 +1,5 @@ +--- +title: Use Puma `nakayoshi_fork` +merge_request: 51467 +author: +type: performance diff --git a/config/feature_flags/development/merge_ref_auto_sync_lock.yml b/config/feature_flags/development/merge_ref_auto_sync_lock.yml deleted file mode 100644 index 3aec2b4e062..00000000000 --- a/config/feature_flags/development/merge_ref_auto_sync_lock.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: merge_ref_auto_sync_lock -introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/31082 -rollout_issue_url: -milestone: '12.2' -type: development -group: group::code review -default_enabled: true diff --git a/config/puma.example.development.rb b/config/puma.example.development.rb index 7e616ee4768..28c2af3acb3 100644 --- a/config/puma.example.development.rb +++ b/config/puma.example.development.rb @@ -84,6 +84,11 @@ if defined?(wait_for_less_busy_worker) wait_for_less_busy_worker ENV.fetch('PUMA_WAIT_FOR_LESS_BUSY_WORKER', 0.001).to_f end +# https://github.com/puma/puma/blob/master/5.0-Upgrade.md#nakayoshi_fork +if defined?(nakayoshi_fork) + nakayoshi_fork unless ENV['DISABLE_PUMA_NAKAYOSHI_FORK'] == 'true' +end + # Use json formatter require_relative "/home/git/gitlab/lib/gitlab/puma_logging/json_formatter" diff --git a/config/puma.rb.example b/config/puma.rb.example index 25e38626260..9fc354a8fe8 100644 --- a/config/puma.rb.example +++ b/config/puma.rb.example @@ -74,6 +74,11 @@ if defined?(wait_for_less_busy_worker) wait_for_less_busy_worker ENV.fetch('PUMA_WAIT_FOR_LESS_BUSY_WORKER', 0.001).to_f end +# https://github.com/puma/puma/blob/master/5.0-Upgrade.md#nakayoshi_fork +if defined?(nakayoshi_fork) + nakayoshi_fork unless ENV['DISABLE_PUMA_NAKAYOSHI_FORK'] == 'true' +end + # Use json formatter require_relative "/home/git/gitlab/lib/gitlab/puma_logging/json_formatter" diff --git a/config/puma_actioncable.example.development.rb b/config/puma_actioncable.example.development.rb index 106932606e0..d0da3dcd8f2 100644 --- a/config/puma_actioncable.example.development.rb +++ b/config/puma_actioncable.example.development.rb @@ -84,6 +84,11 @@ if defined?(wait_for_less_busy_worker) wait_for_less_busy_worker ENV.fetch('PUMA_WAIT_FOR_LESS_BUSY_WORKER', 0.001).to_f end +# https://github.com/puma/puma/blob/master/5.0-Upgrade.md#nakayoshi_fork +if defined?(nakayoshi_fork) + nakayoshi_fork unless ENV['DISABLE_PUMA_NAKAYOSHI_FORK'] == 'true' +end + # Use json formatter require_relative "/home/git/gitlab/lib/gitlab/puma_logging/json_formatter" diff --git a/spec/frontend/diffs/components/diff_row_spec.js b/spec/frontend/diffs/components/diff_row_spec.js index f0d335b88e5..c06d8e78316 100644 --- a/spec/frontend/diffs/components/diff_row_spec.js +++ b/spec/frontend/diffs/components/diff_row_spec.js @@ -3,6 +3,8 @@ import { getByTestId, fireEvent } from '@testing-library/dom'; import Vuex from 'vuex'; import diffsModule from '~/diffs/store/modules'; import DiffRow from '~/diffs/components/diff_row.vue'; +import diffFileMockData from '../mock_data/diff_file'; +import { mapParallel } from '~/diffs/components/diff_row_utils'; describe('DiffRow', () => { const testLines = [ @@ -157,4 +159,56 @@ describe('DiffRow', () => { expect(wrapper.emitted().stopdragging).toBeTruthy(); }); }); + + describe('sets coverage title and class', () => { + const thisLine = diffFileMockData.parallel_diff_lines[2]; + const rightLine = diffFileMockData.parallel_diff_lines[2].right; + + const mockDiffContent = { + diffFile: diffFileMockData, + shouldRenderDraftRow: jest.fn(), + hasParallelDraftLeft: jest.fn(), + hasParallelDraftRight: jest.fn(), + draftForLine: jest.fn(), + }; + + const applyMap = mapParallel(mockDiffContent); + const props = { + line: applyMap(thisLine), + fileHash: diffFileMockData.file_hash, + filePath: diffFileMockData.file_path, + contextLinesPath: 'contextLinesPath', + isHighlighted: false, + }; + const name = diffFileMockData.file_path; + const line = rightLine.new_line; + + it('for lines with coverage', () => { + const coverageFiles = { files: { [name]: { [line]: 5 } } }; + const wrapper = createWrapper({ props, state: { coverageFiles } }); + const coverage = wrapper.find('.line-coverage.right-side'); + + expect(coverage.attributes('title')).toContain('Test coverage: 5 hits'); + expect(coverage.classes('coverage')).toBeTruthy(); + }); + + it('for lines without coverage', () => { + const coverageFiles = { files: { [name]: { [line]: 0 } } }; + const wrapper = createWrapper({ props, state: { coverageFiles } }); + const coverage = wrapper.find('.line-coverage.right-side'); + + expect(coverage.attributes('title')).toContain('No test coverage'); + expect(coverage.classes('no-coverage')).toBeTruthy(); + }); + + it('for unknown lines', () => { + const coverageFiles = {}; + const wrapper = createWrapper({ props, state: { coverageFiles } }); + const coverage = wrapper.find('.line-coverage.right-side'); + + expect(coverage.attributes('title')).toBeFalsy(); + expect(coverage.classes('coverage')).toBeFalsy(); + expect(coverage.classes('no-coverage')).toBeFalsy(); + }); + }); }); diff --git a/spec/services/merge_requests/mergeability_check_service_spec.rb b/spec/services/merge_requests/mergeability_check_service_spec.rb index 5f335b3250b..17bfa9d7368 100644 --- a/spec/services/merge_requests/mergeability_check_service_spec.rb +++ b/spec/services/merge_requests/mergeability_check_service_spec.rb @@ -124,14 +124,6 @@ RSpec.describe MergeRequests::MergeabilityCheckService, :clean_gitlab_redis_shar it_behaves_like 'mergeable merge request' - context 'when lock is disabled' do - before do - stub_feature_flags(merge_ref_auto_sync_lock: false) - end - - it_behaves_like 'mergeable merge request' - end - context 'when concurrent calls' do it 'waits first lock and returns "cached" result in subsequent calls' do threads = execute_within_threads(amount: 3)