diff --git a/CHANGELOG.md b/CHANGELOG.md index ed401b55537..8c8d2417bb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,29 @@ documentation](doc/development/changelog.md) for instructions on adding your own entry. +## 15.0.2 (2022-06-06) + +### Added (1 change) + +- [Add event type in audit event streaming](gitlab-org/gitlab@55ba03fc8342a608e774db01ecadfa0441ea7f76) ([merge request](gitlab-org/gitlab!89266)) **GitLab Enterprise Edition** + +### Fixed (10 changes) + +- [Fix Advanced Search Opensearch detection](gitlab-org/gitlab@38b58801fed210cef048daf30b4d52542fefb1cf) ([merge request](gitlab-org/gitlab!89266)) **GitLab Enterprise Edition** +- [Fix 500 on issues list page](gitlab-org/gitlab@d02cc074f6c3aa0da972d6a368aca423fe50f437) ([merge request](gitlab-org/gitlab!89266)) +- [Include inherited owners when calculating User#solo_owned_groups](gitlab-org/gitlab@d38405007bb4b36441bdb4f15acc5d0093c63115) ([merge request](gitlab-org/gitlab!89266)) +- [Fix issue description list item styling](gitlab-org/gitlab@e1077027f1a2616026e7297ae5742a8ddc09d794) ([merge request](gitlab-org/gitlab!89266)) +- [Fix focus for linked issues input field & IDE cursor](gitlab-org/gitlab@3249749eec2dddde761532d2d899e45c39db815c) ([merge request](gitlab-org/gitlab!89266)) +- [docs: Fix DS_DEFAULT_ANALYZERS variable docs](gitlab-org/gitlab@b5aad346a987a6135e05a0fb6b21b5928101fd7f) ([merge request](gitlab-org/gitlab!89266)) +- [Remove existing repository backups when creating a full backup](gitlab-org/gitlab@d12ab4c65b7a99b94220716e9a0f60fe74296010) ([merge request](gitlab-org/gitlab!89266)) +- [Move LFK scheduling out from EE check](gitlab-org/gitlab@43f352382e3dbeb445732e4d8752c161e3e26088) ([merge request](gitlab-org/gitlab!89266)) +- [Fix drag and drop list item bugs](gitlab-org/gitlab@75957edfd741f0e96645871d73e09a87938b0012) ([merge request](gitlab-org/gitlab!89266)) +- [Hide internal note checkbox on unsupported issuable types](gitlab-org/gitlab@4eaed3e11797c8f1e0c6a710b3a411fe9c38090d) ([merge request](gitlab-org/gitlab!89266)) **GitLab Enterprise Edition** + +### Changed (1 change) + +- [Update auto-deploy-image to v2.28.2](gitlab-org/gitlab@881ef5713a6a16f6ed5e77cf91f9a82dff788b02) ([merge request](gitlab-org/gitlab!89266)) + ## 15.0.1 (2022-06-01) ### Security (8 changes) diff --git a/app/controllers/projects/compare_controller.rb b/app/controllers/projects/compare_controller.rb index aa102e4cb53..09a06aaed8c 100644 --- a/app/controllers/projects/compare_controller.rb +++ b/app/controllers/projects/compare_controller.rb @@ -102,7 +102,11 @@ class Projects::CompareController < Projects::ApplicationController # source == head_ref == to def source_project - project + strong_memoize(:source_project) do + # Eager load project's avatar url to prevent batch loading + # for all forked projects + project&.tap(&:avatar_url) + end end def compare diff --git a/app/views/projects/tags/_tag.html.haml b/app/views/projects/tags/_tag.html.haml index f9d49b36a68..7654150509e 100644 --- a/app/views/projects/tags/_tag.html.haml +++ b/app/views/projects/tags/_tag.html.haml @@ -21,7 +21,7 @@ .text-secondary = sprite_icon("rocket", size: 12) = _("Release") - = link_to release.name, ::Feature.enabled?(:fix_release_path_in_tag_index_page, @project) ? project_release_path(@project, release) : project_releases_path(@project, anchor: release.tag), class: 'gl-text-blue-600!' + = link_to release.name, project_release_path(@project, release), class: 'gl-text-blue-600!' - if tag.message.present? %pre.wrap diff --git a/config/feature_flags/development/fix_release_path_in_tag_index_page.yml b/config/feature_flags/development/fix_release_path_in_tag_index_page.yml deleted file mode 100644 index 2af6d391983..00000000000 --- a/config/feature_flags/development/fix_release_path_in_tag_index_page.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: fix_release_path_in_tag_index_page -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/87736 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/362915 -milestone: '15.1' -type: development -group: group::release -default_enabled: false diff --git a/doc/api/index.md b/doc/api/index.md index 85530066fa6..f7c835f2128 100644 --- a/doc/api/index.md +++ b/doc/api/index.md @@ -342,13 +342,14 @@ The following table gives an overview of how the API functions generally behave. | `GET` | Access one or more resources and return the result as JSON. | | `POST` | Return `201 Created` if the resource is successfully created and return the newly created resource as JSON. | | `GET` / `PUT` | Return `200 OK` if the resource is accessed or modified successfully. The (modified) result is returned as JSON. | -| `DELETE` | Returns `204 No Content` if the resource was deleted successfully. | +| `DELETE` | Returns `204 No Content` if the resource was deleted successfully or `202 Accepted` if the resource is scheduled to be deleted. | The following table shows the possible return codes for API requests. | Return values | Description | |--------------------------|-------------| | `200 OK` | The `GET`, `PUT` or `DELETE` request was successful, and the resource itself is returned as JSON. | +| `202 Accepted` | The `GET`, `PUT` or `DELETE` request was successful, and the resource is scheduled for processing. | | `204 No Content` | The server has successfully fulfilled the request, and there is no additional content to send in the response payload body. | | `201 Created` | The `POST` request was successful, and the resource is returned as JSON. | | `304 Not Modified` | The resource hasn't been modified since the last request. | diff --git a/doc/development/query_recorder.md b/doc/development/query_recorder.md index 263bcf66fad..371d6e0e49e 100644 --- a/doc/development/query_recorder.md +++ b/doc/development/query_recorder.md @@ -24,10 +24,27 @@ it "avoids N+1 database queries" do end ``` +You can if you wish, have both the expectation and the control as +`QueryRecorder` instances: + +```ruby +it "avoids N+1 database queries" do + control = ActiveRecord::QueryRecorder.new { visit_some_page } + create_list(:issue, 5) + action = ActiveRecord::QueryRecorder.new { visit_some_page } + + expect(action).not_to exceed_query_limit(control) +end +``` + As an example you might create 5 issues in between counts, which would cause the query count to increase by 5 if an N+1 problem exists. In some cases the query count might change slightly between runs for unrelated reasons. In this case you might need to test `exceed_query_limit(control_count + acceptable_change)`, but this should be avoided if possible. +If this test fails, and the control was passed as a `QueryRecorder`, then the +failure message indicates where the extra queries are by matching queries on +the longest common prefix, grouping similar queries together. + ## Cached queries By default, QueryRecorder ignores [cached queries](merge_request_performance_guidelines.md#cached-queries) in the count. However, it may be better to count diff --git a/doc/integration/jira/dvcs.md b/doc/integration/jira/dvcs.md index 538330cde56..d35c21f6187 100644 --- a/doc/integration/jira/dvcs.md +++ b/doc/integration/jira/dvcs.md @@ -69,17 +69,14 @@ you can still perform multiple actions in a single commit. For example: ## Configure a GitLab application for DVCS -We recommend you create and use a `jira` user in GitLab, and use the account +For projects in a single group we recommend you create a [group application](../oauth_provider.md#group-owned-applications). +For projects across multiple groups we recommend you create and use a `jira` user in GitLab, and use the account only for integration work. A separate account ensures regular account -maintenance does not affect your integration. If a `jira` user is not feasible, -you can set up this integration with your own account instead. +maintenance does not affect your integration. If a `jira` user or group application is not feasible, +you can set up this integration as an [instance-wide application](../oauth_provider.md#instance-wide-applications) +or with a [user owned application](../oauth_provider.md#user-owned-applications) instead. -1. In GitLab, [create a user](../../user/profile/account/create_accounts.md) for Jira to - use to connect to GitLab. This user must be added to each project you want Jira to have access to, - or be an administrator to access all projects. -1. Sign in as the `jira` user. -1. On the top bar, in the top right corner, select the user's avatar, and select **Edit profile**. -1. On the left sidebar, select **Applications**. +1. Navigate to the [appropriate **Applications** section](../oauth_provider.md#introduction-to-oauth). 1. In the **Name** field, enter a descriptive name for the integration, such as `Jira`. 1. In the **Redirect URI** field, enter the URI appropriate for your version of GitLab, replacing `` with your GitLab instance domain: diff --git a/doc/integration/jira/index.md b/doc/integration/jira/index.md index 1d45577da85..8ff9b68facd 100644 --- a/doc/integration/jira/index.md +++ b/doc/integration/jira/index.md @@ -113,3 +113,9 @@ authenticate with the Jira site. To fix this error, sign in to your Jira instance and complete the CAPTCHA. + +### Jira integration does not work for imported project + +There is a [known bug](https://gitlab.com/gitlab-org/gitlab/-/issues/341571) +where the Jira integration sometimes does not work for a project that has been imported. +As a workaround, disable the integration and then re-enable it. diff --git a/doc/tutorials/index.md b/doc/tutorials/index.md index 55f8321b559..1b4762052c0 100644 --- a/doc/tutorials/index.md +++ b/doc/tutorials/index.md @@ -16,7 +16,7 @@ and running quickly. | Topic | Description | Good for beginners | |-------|-------------|--------------------| | [Introduction to GitLab](https://youtu.be/_4SmIyQ5eis?t=90) (59m 51s) | Walk through recommended processes and example workflows for using GitLab. | **{star}** | -| [GitLab 101](https://gitlab.edcast.com/pathways/copy-of-gitlab-certification) | Learn the basics of GitLab in this certification course. | **{star}** | +| [GitLab 101](https://gitlab.edcast.com/pathways/ECL-ce65e759-d9e7-459f-83d0-1765459395d2) | Learn the basics of GitLab in this certification course. | **{star}** | | [Use GitLab for DevOps](https://www.youtube.com/watch?v=7q9Y1Cv-ib0) (12m 34s) | Use GitLab through the entire DevOps lifecycle, from planning to monitoring. | **{star}** | | [Use Markdown at GitLab](../user/markdown.md) | GitLab Flavored Markdown (GLFM) is used in many areas of GitLab, for example, in merge requests. | **{star}** | | [GitLab 201](https://gitlab.edcast.com/pathways/ECL-44010cf6-7a9c-4b9b-b684-fa08508a3252) | Go beyond the basics to learn more about using GitLab for your work. | | diff --git a/spec/views/projects/tags/index.html.haml_spec.rb b/spec/views/projects/tags/index.html.haml_spec.rb index 3169199b56a..aff233b697f 100644 --- a/spec/views/projects/tags/index.html.haml_spec.rb +++ b/spec/views/projects/tags/index.html.haml_spec.rb @@ -25,38 +25,28 @@ RSpec.describe 'projects/tags/index.html.haml' do end context 'when tag is associated with a release' do - context 'with feature flag disabled' do - before do - stub_feature_flags(fix_release_path_in_tag_index_page: false) - end - - it 'renders a link to the release page with anchor' do + context 'when name does not contain a backslash' do + it 'renders a link to the release page' do render - expect(rendered).to have_link(release.name, href: project_releases_path(project, anchor: release)) + expect(rendered).to have_link(release.name, href: project_release_path(project, release)) end end - context 'with feature flag enabled' do - before do - stub_feature_flags(fix_release_path_in_tag_index_page: true) + context 'when name contains backslash' do + let_it_be(:release) { create(:release, project: project, tag: 'test/v1') } + + before_all do + project.repository.add_tag(project.owner, 'test/v1', project.default_branch_or_main) + project.repository.expire_tags_cache + + project.releases.reload + + assign(:tags, Kaminari.paginate_array(tags).page(0)) end - context 'when name contains backslash' do - let_it_be(:release) { create(:release, project: project, tag: 'test/v1') } - - before_all do - project.repository.add_tag(project.owner, 'test/v1', project.default_branch_or_main) - project.repository.expire_tags_cache - - project.releases.reload - - assign(:tags, Kaminari.paginate_array(tags).page(0)) - end - - it 'renders a link to the release page with backslash escaped' do - render - expect(rendered).to have_link(release.name, href: project_release_path(project, release)) - end + it 'renders a link to the release page with backslash escaped' do + render + expect(rendered).to have_link(release.name, href: project_release_path(project, release)) end end end