diff --git a/.eslintrc.yml b/.eslintrc.yml index 7f45fd912a9..72c33873ada 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -99,7 +99,7 @@ rules: message: 'Migrate to GlSkeletonLoader, or import GlDeprecatedSkeletonLoading.' overrides: - files: - - '{,ee/,jh/}spec/frontend*/**/*' + - '{,ee/,jh/}spec/frontend*/**/*' rules: '@gitlab/require-i18n-strings': off '@gitlab/no-runtime-template-compiler': off @@ -139,13 +139,11 @@ overrides: parser: '@graphql-eslint/eslint-plugin' operations: - '{,ee/,jh/}app/**/*.graphql' - # You can run `bundle exec rake gitlab:graphql:schema:dump` and then uncomment this line - # schema: './tmp/tests/graphql/gitlab_schema.graphql' + # You can run `bundle exec rake gitlab:graphql:schema:dump` and then uncomment this line + # schema: './tmp/tests/graphql/gitlab_schema.graphql' rules: filenames/match-regex: off spaced-comment: off - # TODO: We need a way to include this rule + support ee_else_ce fragments - #'@graphql-eslint/unique-fragment-name': error # TODO: Uncomment these rules when then `schema` is available #'@graphql-eslint/fragments-on-composite-type': error #'@graphql-eslint/known-argument-names': error @@ -153,3 +151,4 @@ overrides: '@graphql-eslint/no-anonymous-operations': error '@graphql-eslint/unique-operation-name': error '@graphql-eslint/require-id-when-available': error + '@graphql-eslint/unique-fragment-name': error diff --git a/.gitlab/ci/reports.gitlab-ci.yml b/.gitlab/ci/reports.gitlab-ci.yml index 7ad424ec669..5535641b40f 100644 --- a/.gitlab/ci/reports.gitlab-ci.yml +++ b/.gitlab/ci/reports.gitlab-ci.yml @@ -103,7 +103,7 @@ yarn-audit-dependency_scanning: extends: .default-retry stage: test image: - name: registry.gitlab.com/gitlab-org/security-products/package-hunter-cli:v1.3.0@sha256:6cb717d1772cf5a8a68dd8268e44925f71b7867d9f3fa41a4ba2c291b7446c50 + name: registry.gitlab.com/gitlab-org/security-products/package-hunter-cli:v1.3.1@sha256:582b70bdb002075e33d63758e4c55af376b9f50278f826b4366acce922a9e357 entrypoint: [""] variables: HTR_user: '$PACKAGE_HUNTER_USER' diff --git a/.gitlab/ci/review-apps/main.gitlab-ci.yml b/.gitlab/ci/review-apps/main.gitlab-ci.yml index d083f876b03..7c018f78928 100644 --- a/.gitlab/ci/review-apps/main.gitlab-ci.yml +++ b/.gitlab/ci/review-apps/main.gitlab-ci.yml @@ -111,7 +111,6 @@ review-deploy: artifacts: paths: - environment_url.txt - - curl_output.txt expire_in: 7 days when: always diff --git a/app/assets/javascripts/alerts_settings/graphql/fragments/http_integration_payload_data.fragment.graphql b/app/assets/javascripts/alerts_settings/graphql/fragments/http_integration_payload_data.fragment.graphql index df6ad0b712d..8c0f1762d91 100644 --- a/app/assets/javascripts/alerts_settings/graphql/fragments/http_integration_payload_data.fragment.graphql +++ b/app/assets/javascripts/alerts_settings/graphql/fragments/http_integration_payload_data.fragment.graphql @@ -1,3 +1,5 @@ +# This fragment is used as ee-else-ce +# eslint-disable-next-line @graphql-eslint/unique-fragment-name fragment HttpIntegrationPayloadData on AlertManagementHttpIntegration { id } diff --git a/app/assets/javascripts/boards/graphql/board.fragment.graphql b/app/assets/javascripts/boards/graphql/board.fragment.graphql index 872a4c4afbc..c4380a8744d 100644 --- a/app/assets/javascripts/boards/graphql/board.fragment.graphql +++ b/app/assets/javascripts/boards/graphql/board.fragment.graphql @@ -1,3 +1,5 @@ +# This fragment is used as ee-else-ce +# eslint-disable-next-line @graphql-eslint/unique-fragment-name fragment BoardFragment on Board { id name diff --git a/app/assets/javascripts/boards/graphql/board_list.fragment.graphql b/app/assets/javascripts/boards/graphql/board_list.fragment.graphql index bbf3314377e..5c7442dce68 100644 --- a/app/assets/javascripts/boards/graphql/board_list.fragment.graphql +++ b/app/assets/javascripts/boards/graphql/board_list.fragment.graphql @@ -1,5 +1,7 @@ #import "./board_list_shared.fragment.graphql" +# This fragment is used as ee-else-ce +# eslint-disable-next-line @graphql-eslint/unique-fragment-name fragment BoardListFragment on BoardList { ...BoardListShared } diff --git a/app/assets/javascripts/boards/graphql/board_scope.fragment.graphql b/app/assets/javascripts/boards/graphql/board_scope.fragment.graphql index 57f51822d91..4e0a6246879 100644 --- a/app/assets/javascripts/boards/graphql/board_scope.fragment.graphql +++ b/app/assets/javascripts/boards/graphql/board_scope.fragment.graphql @@ -1,3 +1,5 @@ +# This fragment is used as ee-else-ce +# eslint-disable-next-line @graphql-eslint/unique-fragment-name fragment BoardScopeFragment on Board { id name diff --git a/app/assets/javascripts/boards/graphql/issue.fragment.graphql b/app/assets/javascripts/boards/graphql/issue.fragment.graphql index 53fe6fdc59e..8525b9065ca 100644 --- a/app/assets/javascripts/boards/graphql/issue.fragment.graphql +++ b/app/assets/javascripts/boards/graphql/issue.fragment.graphql @@ -1,5 +1,7 @@ #import "~/graphql_shared/fragments/issue.fragment.graphql" +# This fragment is used as ee-else-ce +# eslint-disable-next-line @graphql-eslint/unique-fragment-name fragment Issue on Issue { id ...IssueNode diff --git a/app/assets/javascripts/graphql_shared/fragments/iteration.fragment.graphql b/app/assets/javascripts/graphql_shared/fragments/iteration.fragment.graphql index 78a368089a8..1fe85154d8d 100644 --- a/app/assets/javascripts/graphql_shared/fragments/iteration.fragment.graphql +++ b/app/assets/javascripts/graphql_shared/fragments/iteration.fragment.graphql @@ -1,4 +1,4 @@ -fragment Iteration on Iteration { +fragment IterationShared on Iteration { id title } diff --git a/app/assets/javascripts/graphql_shared/fragments/page_info_cursors_only.fragment.graphql b/app/assets/javascripts/graphql_shared/fragments/page_info_cursors_only.fragment.graphql deleted file mode 100644 index 22bcefbecd3..00000000000 --- a/app/assets/javascripts/graphql_shared/fragments/page_info_cursors_only.fragment.graphql +++ /dev/null @@ -1,4 +0,0 @@ -fragment PageInfo on PageInfo { - startCursor - endCursor -} diff --git a/app/assets/javascripts/incidents/graphql/fragments/incident_fields.fragment.graphql b/app/assets/javascripts/incidents/graphql/fragments/incident_fields.fragment.graphql index b72941966c6..5b2f0392232 100644 --- a/app/assets/javascripts/incidents/graphql/fragments/incident_fields.fragment.graphql +++ b/app/assets/javascripts/incidents/graphql/fragments/incident_fields.fragment.graphql @@ -1,4 +1,5 @@ -# eslint-disable-next-line @graphql-eslint/require-id-when-available +# This fragment is used as ee-else-ce +# eslint-disable-next-line @graphql-eslint/require-id-when-available, @graphql-eslint/unique-fragment-name fragment IncidentFields on Issue { severity escalationStatus diff --git a/app/assets/javascripts/issues/list/queries/label.fragment.graphql b/app/assets/javascripts/issues/list/queries/label.fragment.graphql deleted file mode 100644 index bb1d8f1ac9b..00000000000 --- a/app/assets/javascripts/issues/list/queries/label.fragment.graphql +++ /dev/null @@ -1,6 +0,0 @@ -fragment Label on Label { - id - color - textColor - title -} diff --git a/app/assets/javascripts/issues/list/queries/search_labels.query.graphql b/app/assets/javascripts/issues/list/queries/search_labels.query.graphql index 44b57317161..df563fe1925 100644 --- a/app/assets/javascripts/issues/list/queries/search_labels.query.graphql +++ b/app/assets/javascripts/issues/list/queries/search_labels.query.graphql @@ -1,4 +1,4 @@ -#import "./label.fragment.graphql" +#import "~/graphql_shared/fragments/label.fragment.graphql" query searchLabels($fullPath: ID!, $search: String, $isProject: Boolean = false) { group(fullPath: $fullPath) @skip(if: $isProject) { diff --git a/app/assets/javascripts/issues/list/queries/search_users.query.graphql b/app/assets/javascripts/issues/list/queries/search_users.query.graphql index 46b48e4e41c..52c7963cb7c 100644 --- a/app/assets/javascripts/issues/list/queries/search_users.query.graphql +++ b/app/assets/javascripts/issues/list/queries/search_users.query.graphql @@ -1,4 +1,4 @@ -#import "./user.fragment.graphql" +#import "~/graphql_shared/fragments/user.fragment.graphql" query searchUsers($fullPath: ID!, $search: String, $isProject: Boolean = false) { group(fullPath: $fullPath) @skip(if: $isProject) { diff --git a/app/assets/javascripts/issues/list/queries/user.fragment.graphql b/app/assets/javascripts/issues/list/queries/user.fragment.graphql deleted file mode 100644 index 3e5bc0f7b93..00000000000 --- a/app/assets/javascripts/issues/list/queries/user.fragment.graphql +++ /dev/null @@ -1,6 +0,0 @@ -fragment User on User { - id - avatarUrl - name - username -} diff --git a/app/assets/javascripts/repository/queries/commit.fragment.graphql b/app/assets/javascripts/repository/queries/commit.fragment.graphql index b046fc1f730..a6063c689dc 100644 --- a/app/assets/javascripts/repository/queries/commit.fragment.graphql +++ b/app/assets/javascripts/repository/queries/commit.fragment.graphql @@ -1,3 +1,5 @@ +# This fragment is used as ee-else-ce +# eslint-disable-next-line @graphql-eslint/unique-fragment-name fragment TreeEntryCommit on LogTreeCommit { sha message diff --git a/app/assets/javascripts/repository/queries/path_locks.fragment.graphql b/app/assets/javascripts/repository/queries/path_locks.fragment.graphql index 868a513362d..96b6523361e 100644 --- a/app/assets/javascripts/repository/queries/path_locks.fragment.graphql +++ b/app/assets/javascripts/repository/queries/path_locks.fragment.graphql @@ -1,3 +1,5 @@ +# This fragment is used as ee-else-ce +# eslint-disable-next-line @graphql-eslint/unique-fragment-name fragment ProjectPathLocksFragment on Project { id } diff --git a/app/assets/javascripts/runner/graphql/details/runner_details.fragment.graphql b/app/assets/javascripts/runner/graphql/details/runner_details.fragment.graphql index 2449ee0fc0f..4e30e30edc5 100644 --- a/app/assets/javascripts/runner/graphql/details/runner_details.fragment.graphql +++ b/app/assets/javascripts/runner/graphql/details/runner_details.fragment.graphql @@ -1,5 +1,7 @@ #import "./runner_details_shared.fragment.graphql" +# This fragment is used as ee-else-ce +# eslint-disable-next-line @graphql-eslint/unique-fragment-name fragment RunnerDetails on CiRunner { ...RunnerDetailsShared } diff --git a/app/assets/javascripts/sidebar/queries/group_milestones.query.graphql b/app/assets/javascripts/sidebar/queries/group_milestones.query.graphql index dceab61ed26..b00ad3d483e 100644 --- a/app/assets/javascripts/sidebar/queries/group_milestones.query.graphql +++ b/app/assets/javascripts/sidebar/queries/group_milestones.query.graphql @@ -12,7 +12,7 @@ query groupMilestones($fullPath: ID!, $title: String, $state: MilestoneStateEnum includeAncestors: true ) { nodes { - ...MilestoneFragment + ...SidebarMilestoneFragment state } } diff --git a/app/assets/javascripts/sidebar/queries/merge_request_milestone.query.graphql b/app/assets/javascripts/sidebar/queries/merge_request_milestone.query.graphql index b0a16677cf2..9983c79d263 100644 --- a/app/assets/javascripts/sidebar/queries/merge_request_milestone.query.graphql +++ b/app/assets/javascripts/sidebar/queries/merge_request_milestone.query.graphql @@ -8,7 +8,7 @@ query mergeRequestMilestone($fullPath: ID!, $iid: String!) { __typename id attribute: milestone { - ...MilestoneFragment + ...SidebarMilestoneFragment } } } diff --git a/app/assets/javascripts/sidebar/queries/milestone.fragment.graphql b/app/assets/javascripts/sidebar/queries/milestone.fragment.graphql index d4f7e703692..570e88966e5 100644 --- a/app/assets/javascripts/sidebar/queries/milestone.fragment.graphql +++ b/app/assets/javascripts/sidebar/queries/milestone.fragment.graphql @@ -1,4 +1,4 @@ -fragment MilestoneFragment on Milestone { +fragment SidebarMilestoneFragment on Milestone { id title webUrl: webPath diff --git a/app/assets/javascripts/sidebar/queries/project_issue_milestone.query.graphql b/app/assets/javascripts/sidebar/queries/project_issue_milestone.query.graphql index c7f3adc9aca..d481324e56a 100644 --- a/app/assets/javascripts/sidebar/queries/project_issue_milestone.query.graphql +++ b/app/assets/javascripts/sidebar/queries/project_issue_milestone.query.graphql @@ -8,7 +8,7 @@ query projectIssueMilestone($fullPath: ID!, $iid: String!) { __typename id attribute: milestone { - ...MilestoneFragment + ...SidebarMilestoneFragment } } } diff --git a/app/assets/javascripts/sidebar/queries/project_milestones.query.graphql b/app/assets/javascripts/sidebar/queries/project_milestones.query.graphql index d9eab18628d..e431b331c5d 100644 --- a/app/assets/javascripts/sidebar/queries/project_milestones.query.graphql +++ b/app/assets/javascripts/sidebar/queries/project_milestones.query.graphql @@ -12,7 +12,7 @@ query projectMilestones($fullPath: ID!, $title: String, $state: MilestoneStateEn includeAncestors: true ) { nodes { - ...MilestoneFragment + ...SidebarMilestoneFragment state } } diff --git a/app/controllers/explore/groups_controller.rb b/app/controllers/explore/groups_controller.rb index aa4196b1c18..97791b43d41 100644 --- a/app/controllers/explore/groups_controller.rb +++ b/app/controllers/explore/groups_controller.rb @@ -4,6 +4,7 @@ class Explore::GroupsController < Explore::ApplicationController include GroupTree feature_category :subgroups + urgency :low def index render_group_tree GroupsFinder.new(current_user).execute diff --git a/app/controllers/explore/projects_controller.rb b/app/controllers/explore/projects_controller.rb index 23e0143506e..335ccce5507 100644 --- a/app/controllers/explore/projects_controller.rb +++ b/app/controllers/explore/projects_controller.rb @@ -24,8 +24,9 @@ class Explore::ProjectsController < Explore::ApplicationController rescue_from PageOutOfBoundsError, with: :page_out_of_bounds feature_category :projects - # TODO: Set higher urgency after addressing https://gitlab.com/gitlab-org/gitlab/-/issues/357913 + # and https://gitlab.com/gitlab-org/gitlab/-/issues/358945 + urgency :low, [:index, :trending] urgency :low, [:index] def index diff --git a/app/controllers/groups/shared_projects_controller.rb b/app/controllers/groups/shared_projects_controller.rb index 7acdacc2d46..2d2664c02e8 100644 --- a/app/controllers/groups/shared_projects_controller.rb +++ b/app/controllers/groups/shared_projects_controller.rb @@ -7,6 +7,7 @@ module Groups skip_cross_project_access_check :index feature_category :subgroups + urgency :low, [:index] def index shared_projects = GroupProjectsFinder.new( diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index 995d5abf045..700042614cc 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -59,8 +59,9 @@ class GroupsController < Groups::ApplicationController feature_category :importers, [:export, :download_export] urgency :high, [:unfoldered_environment_names] + # TODO: Set #show to higher urgency after resolving https://gitlab.com/gitlab-org/gitlab/-/issues/334795 - urgency :low, [:merge_requests, :show] + urgency :low, [:merge_requests, :show, :create, :new, :update] def index redirect_to(current_user ? dashboard_groups_path : explore_groups_path) diff --git a/app/controllers/profiles/emails_controller.rb b/app/controllers/profiles/emails_controller.rb index 7a88162f469..7e332d9a498 100644 --- a/app/controllers/profiles/emails_controller.rb +++ b/app/controllers/profiles/emails_controller.rb @@ -8,6 +8,7 @@ class Profiles::EmailsController < Profiles::ApplicationController only: [:resend_confirmation_instructions] feature_category :users + urgency :low, [:index] def index @primary_email = current_user.email diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 6cdfdfa9e2f..7986b42b2f8 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -57,7 +57,8 @@ class ProjectsController < Projects::ApplicationController feature_category :portfolio_management, [:planning_hierarchy] # TODO: Set high urgency for #show https://gitlab.com/gitlab-org/gitlab/-/issues/334444 - urgency :low, [:refs, :show] + urgency :low, [:refs, :show, :destroy] + urgency :high, [:unfoldered_environment_names] def index diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 228ef710749..83d66966d0a 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -34,7 +34,7 @@ class UsersController < ApplicationController feature_category :snippets, [:snippets] # TODO: Set higher urgency after resolving https://gitlab.com/gitlab-org/gitlab/-/issues/357914 - urgency :low, [:show] + urgency :low, [:show, :calendar_activities] def show respond_to do |format| diff --git a/app/graphql/queries/repository/files.query.graphql b/app/graphql/queries/repository/files.query.graphql index a83880ce696..5a352ee2a5a 100644 --- a/app/graphql/queries/repository/files.query.graphql +++ b/app/graphql/queries/repository/files.query.graphql @@ -1,4 +1,4 @@ -fragment PageInfo on PageInfo { +fragment LocalPageInfo on PageInfo { __typename hasNextPage hasPreviousPage @@ -6,7 +6,7 @@ fragment PageInfo on PageInfo { endCursor } -fragment TreeEntry on Entry { +fragment LocalTreeEntry on Entry { __typename id sha @@ -34,12 +34,12 @@ query getFiles( edges { __typename node { - ...TreeEntry + ...LocalTreeEntry webPath } } pageInfo { - ...PageInfo + ...LocalPageInfo } } submodules(first: $pageSize, after: $nextPageCursor) { @@ -47,13 +47,13 @@ query getFiles( edges { __typename node { - ...TreeEntry + ...LocalTreeEntry webUrl treeUrl } } pageInfo { - ...PageInfo + ...LocalPageInfo } } blobs(first: $pageSize, after: $nextPageCursor) { @@ -61,14 +61,14 @@ query getFiles( edges { __typename node { - ...TreeEntry + ...LocalTreeEntry mode webPath lfsOid } } pageInfo { - ...PageInfo + ...LocalPageInfo } } } diff --git a/doc/development/batched_background_migrations.md b/doc/development/batched_background_migrations.md index e7703b5dd2b..a63786b01b4 100644 --- a/doc/development/batched_background_migrations.md +++ b/doc/development/batched_background_migrations.md @@ -203,7 +203,7 @@ do this work in a regular migration. def up queue_batched_background_migration( MIGRATION, - :migrations, + :integrations, :id, job_interval: DELAY_INTERVAL ) @@ -211,7 +211,7 @@ do this work in a regular migration. def down Gitlab::Database::BackgroundMigration::BatchedMigration - .for_configuration(MIGRATION, :migrations, :id, []).delete_all + .for_configuration(MIGRATION, :integrations, :id, []).delete_all end end ``` diff --git a/doc/operations/index.md b/doc/operations/index.md index 61d38c3d6a9..ccdd58d05c8 100644 --- a/doc/operations/index.md +++ b/doc/operations/index.md @@ -11,11 +11,11 @@ your applications. ## Measure reliability and stability with metrics (DEPRECATED) -> [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/346485) in GitLab 14.7. +> [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/346541) in GitLab 14.7. WARNING: -This feature is in its end-of-life process. It is [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/346485) -in GitLab 14.7, and is planned for removal in GitLab 15.0. +This feature is in its end-of-life process. It is [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/346541) +for use in GitLab 14.7, and is planned for removal in GitLab 16.0. Metrics help you understand the health and performance of your infrastructure, applications, and systems by providing insights into your application's reliability, diff --git a/doc/operations/metrics/embed.md b/doc/operations/metrics/embed.md index 26ea7aa07eb..44b998dc3ee 100644 --- a/doc/operations/metrics/embed.md +++ b/doc/operations/metrics/embed.md @@ -6,6 +6,12 @@ info: To determine the technical writer assigned to the Stage/Group associated w # Embedding metric charts within GitLab Flavored Markdown **(FREE)** +> [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/346541) in GitLab 14.7. + +WARNING: +This feature is in its end-of-life process. It is [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/346541) +for use in GitLab 14.7, and is planned for removal in GitLab 16.0. + You can display metrics charts within [GitLab Flavored Markdown (GLFM)](../../user/markdown.md) fields such as issue or merge request descriptions. The maximum number of embedded diff --git a/doc/operations/metrics/index.md b/doc/operations/metrics/index.md index b04e19807f8..214669c05a4 100644 --- a/doc/operations/metrics/index.md +++ b/doc/operations/metrics/index.md @@ -6,6 +6,12 @@ info: To determine the technical writer assigned to the Stage/Group associated w # Monitor your environment's metrics **(FREE)** +> [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/346541) in GitLab 14.7. + +WARNING: +This feature is in its end-of-life process. It is [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/346541) +for use in GitLab 14.7, and is planned for removal in GitLab 16.0. + GitLab helps your team monitor the health and performance of your applications and infrastructure by turning statistics and log files into charts and graphs that are easy to understand, especially when time is short and decisions are diff --git a/doc/user/admin_area/broadcast_messages.md b/doc/user/admin_area/broadcast_messages.md index 69cb2f04c4d..9d6dcf30908 100644 --- a/doc/user/admin_area/broadcast_messages.md +++ b/doc/user/admin_area/broadcast_messages.md @@ -20,7 +20,7 @@ Broadcast messages can be managed using the [broadcast messages API](../../api/b Banners are shown on the top of a page and in Git remote responses. -![Broadcast Message Banner](img/broadcast_messages_banner_v12_10.png) +![Broadcast Message Banner](img/broadcast_messages_banner_v15_0.png) ```shell $ git push @@ -66,18 +66,13 @@ To add a broadcast message: - `padding` - `margin` - `text-decoration` -1. Select one of the suggested background colors, or add the hex code of a different color. The default color is orange. +1. Select a **Theme**. The default theme is `indigo`. 1. Select the **Dismissable** checkbox to enable users to dismiss the broadcast message. 1. Optional. Select **Target roles** to only show the broadcast message to users with the selected roles. The message displays on group, subgroup, and project pages, and does not display in Git remote responses. 1. If required, add a **Target Path** to only show the broadcast message on URLs matching that path. You can use the wildcard character `*` to match multiple URLs, for example `mygroup/myproject*`. 1. Select a date for the message to start and end. 1. Select **Add broadcast message**. -NOTE: -The **Background color** field expects the value to be a hexadecimal code because -the form uses the [color_field](https://api.rubyonrails.org/v6.0.3.4/classes/ActionView/Helpers/FormHelper.html#method-i-color_field) -helper method, which generates the proper HTML to render. - When a broadcast message expires, it no longer displays in the user interface but is still listed in the list of broadcast messages. diff --git a/doc/user/admin_area/img/broadcast_messages_banner_v12_10.png b/doc/user/admin_area/img/broadcast_messages_banner_v12_10.png deleted file mode 100644 index 2e893476bc6..00000000000 Binary files a/doc/user/admin_area/img/broadcast_messages_banner_v12_10.png and /dev/null differ diff --git a/doc/user/admin_area/img/broadcast_messages_banner_v15_0.png b/doc/user/admin_area/img/broadcast_messages_banner_v15_0.png new file mode 100644 index 00000000000..e1b350142b3 Binary files /dev/null and b/doc/user/admin_area/img/broadcast_messages_banner_v15_0.png differ diff --git a/doc/user/infrastructure/clusters/migrate_to_gitlab_agent.md b/doc/user/infrastructure/clusters/migrate_to_gitlab_agent.md index b956b1a6f9c..84dba6bf4e8 100644 --- a/doc/user/infrastructure/clusters/migrate_to_gitlab_agent.md +++ b/doc/user/infrastructure/clusters/migrate_to_gitlab_agent.md @@ -50,19 +50,43 @@ strategies to deploy to your cluster with restricted account access. To do so: ### Migrate from Auto DevOps -To configure your Auto DevOps project to use the GitLab agent: +In your Auto DevOps project, you can use the GitLab agent to connect with your Kubernetes cluster. -1. Follow the steps to [install an agent](../../clusters/agent/install/index.md) in your cluster. -1. Go to the project where you use Auto DevOps. -1. On the left sidebar, select **Settings > CI/CD** and expand **Variables**. -1. Select **Add new variable**. -1. Add `KUBE_CONTEXT` as the key, `path/to/agent/project:agent-name` as the value, and select the environment scope of your choice. +1. [Install an agent](../../clusters/agent/install/index.md) in your cluster. +1. In GitLab, go to the project where you use Auto DevOps. +1. Add three variables. On the left sidebar, select **Settings > CI/CD** and expand **Variables**. + - Add a key called `KUBE_INGRESS_BASE_DOMAIN` with the application deployment domain as the value. + - Add a key called `KUBE_CONTEXT` with a value like `path/to/agent/project:agent-name`. + Select the environment scope of your choice. + If you are not sure what your agent’s context is, edit your `.gitlab-ci.yml` file and add a job to see the available contexts: + + ```yaml + deploy: + image: + name: bitnami/kubectl:latest + entrypoint: [""] + script: + - kubectl config get-contexts + ``` + + - Add a key called `KUBE_NAMESPACE` with a value of the Kubernetes namespace for your deployments to target. Set the same environment scope. 1. Select **Add variable**. -1. Repeat the process to add another variable, `KUBE_NAMESPACE`, setting the value for the Kubernetes namespace you want your deployments to target, and set the same environment scope from the previous step. 1. On the left sidebar, select **Infrastructure > Kubernetes clusters**. 1. From the certificate-based clusters section, open the cluster that serves the same environment scope. 1. Select the **Details** tab and disable the cluster. -1. To activate the changes, on the left sidebar, select **CI/CD > Pipelines** and then **Run pipeline**. +1. Edit your `.gitlab-ci.yml` file and ensure it's using the Auto DevOps template. For example: + + ```yaml + include: + template: Auto-DevOps.gitlab-ci.yml + + variables: + KUBE_INGRESS_BASE_DOMAIN: 74.220.23.215.nip.io + KUBE_CONTEXT: "gitlab-examples/ops/gitops-demo/k8s-agents:demo-agent" + KUBE_NAMESPACE: "demo-agent" + ``` + +1. To test your pipeline, on the left sidebar, select **CI/CD > Pipelines** and then **Run pipeline**. For an example, [view this project](https://gitlab.com/gitlab-examples/ops/gitops-demo/hello-world-service). diff --git a/lib/api/badges.rb b/lib/api/badges.rb index d7c850c2f40..ca960a179ab 100644 --- a/lib/api/badges.rb +++ b/lib/api/badges.rb @@ -72,7 +72,7 @@ module API params do requires :badge_id, type: Integer, desc: 'The badge ID' end - get ":id/badges/:badge_id" do + get ":id/badges/:badge_id", urgency: :default do source = find_source(source_type, params[:id]) badge = find_badge(source) @@ -88,7 +88,7 @@ module API requires :image_url, type: String, desc: 'URL of the badge image' optional :name, type: String, desc: 'Name for the badge' end - post ":id/badges" do + post ":id/badges", urgency: :default do source = find_source_if_admin(source_type) badge = ::Badges::CreateService.new(declared_params(include_missing: false)).execute(source) diff --git a/lib/api/invitations.rb b/lib/api/invitations.rb index 75f63a5d98f..53c3e7403bb 100644 --- a/lib/api/invitations.rb +++ b/lib/api/invitations.rb @@ -28,7 +28,7 @@ module API optional :tasks_to_be_done, type: Array[String], coerce_with: Validations::Types::CommaSeparatedToArray.coerce, desc: 'Tasks the inviter wants the member to do' optional :tasks_project_id, type: Integer, desc: 'The project ID in which to create the task issues' end - post ":id/invitations" do + post ":id/invitations", urgency: :low do ::Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab/-/issues/354016') bad_request!('Must provide either email or user_id as a parameter') if params[:email].blank? && params[:user_id].blank? diff --git a/lib/api/projects.rb b/lib/api/projects.rb index 9f7b3f9b088..ab90b60224e 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -342,7 +342,7 @@ module API desc: 'Include project license data' end # TODO: Set higher urgency https://gitlab.com/gitlab-org/gitlab/-/issues/357622 - get ":id", feature_category: :projects, urgency: :default do + get ":id", feature_category: :projects, urgency: :low do options = { with: current_user ? Entities::ProjectWithAccess : Entities::BasicProjectDetails, current_user: current_user, diff --git a/lib/api/users.rb b/lib/api/users.rb index b26611cfe03..9c62ac69eb4 100644 --- a/lib/api/users.rb +++ b/lib/api/users.rb @@ -10,6 +10,8 @@ module API feature_category :users, ['/users/:id/custom_attributes', '/users/:id/custom_attributes/:key'] + urgency :high, ['/users/:id/custom_attributes', '/users/:id/custom_attributes/:key'] + resource :users, requirements: { uid: /[0-9]*/, id: /[0-9]*/ } do include CustomAttributesEndpoints @@ -781,7 +783,7 @@ module API optional :type, type: String, values: %w[Project Namespace] use :pagination end - get ":user_id/memberships", feature_category: :users do + get ":user_id/memberships", feature_category: :users, urgency: :high do authenticated_as_admin! user = find_user_by_id(params) diff --git a/lib/gitlab/git/diff.rb b/lib/gitlab/git/diff.rb index a66517b4ca0..bb561232ac6 100644 --- a/lib/gitlab/git/diff.rb +++ b/lib/gitlab/git/diff.rb @@ -231,11 +231,15 @@ module Gitlab def encode_diff_to_utf8(replace_invalid_utf8_chars) return unless Feature.enabled?(:convert_diff_to_utf8_with_replacement_symbol, default_enabled: :yaml) - return unless replace_invalid_utf8_chars && !detect_binary?(@diff) + return unless replace_invalid_utf8_chars && diff_should_be_converted? @diff = Gitlab::EncodingHelper.encode_utf8_with_replacement_character(@diff) end + def diff_should_be_converted? + !detect_binary?(@diff) || !@diff&.valid_encoding? + end + def init_from_hash(hash) raw_diff = hash.symbolize_keys diff --git a/scripts/review_apps/review-apps.sh b/scripts/review_apps/review-apps.sh index f529c8eaafe..829e806e378 100755 --- a/scripts/review_apps/review-apps.sh +++ b/scripts/review_apps/review-apps.sh @@ -359,11 +359,11 @@ EOF function verify_deploy() { echoinfo "Verifying deployment at ${CI_ENVIRONMENT_URL}" - if retry "test_url \"${CI_ENVIRONMENT_URL}\" curl_output.txt"; then + if retry "test_url \"${CI_ENVIRONMENT_URL}\""; then echoinfo "Review app is deployed to ${CI_ENVIRONMENT_URL}" return 0 else - echoerr "Review app is not available at ${CI_ENVIRONMENT_URL}. See curl_output.txt artifact for detail." + echoerr "Review app is not available at ${CI_ENVIRONMENT_URL}: see the logs from cURL above for more details" return 1 fi } diff --git a/scripts/utils.sh b/scripts/utils.sh index e896fe40e06..0d074dc8f2b 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -15,16 +15,18 @@ function retry() { function test_url() { local url="${1}" - local curl_output="${2}" local status - status=$(curl -s -o "${curl_output}" -L -w ''%{http_code}'' "${url}") + status=$(curl --output /dev/null -L -s -w ''%{http_code}'' "${url}") if [[ $status == "200" ]]; then return 0 + else + # We display the error in the job to allow for better debugging + curl -L --fail --output /dev/null "${url}" + echo -e "\nExpected HTTP status 200: received ${status}\n" + return 1 fi - - return 1 } function bundle_install_script() { diff --git a/spec/lib/gitlab/git/diff_spec.rb b/spec/lib/gitlab/git/diff_spec.rb index 46f544797bb..4c47912e218 100644 --- a/spec/lib/gitlab/git/diff_spec.rb +++ b/spec/lib/gitlab/git/diff_spec.rb @@ -165,17 +165,21 @@ EOT context 'when diff contains invalid characters' do let(:bad_string) { [0xae].pack("C*") } let(:bad_string_two) { [0x89].pack("C*") } + let(:bad_string_three) { "@@ -1,5 +1,6 @@\n \xFF\xFE#\x00l\x00a\x00n\x00g\x00u\x00" } let(:diff) { described_class.new(@raw_diff_hash.merge({ diff: bad_string })) } let(:diff_two) { described_class.new(@raw_diff_hash.merge({ diff: bad_string_two })) } + let(:diff_three) { described_class.new(@raw_diff_hash.merge({ diff: bad_string_three })) } context 'when replace_invalid_utf8_chars is true' do it 'will convert invalid characters and not cause an encoding error' do expect(diff.diff).to include(Gitlab::EncodingHelper::UNICODE_REPLACEMENT_CHARACTER) expect(diff_two.diff).to include(Gitlab::EncodingHelper::UNICODE_REPLACEMENT_CHARACTER) + expect(diff_three.diff).to include(Gitlab::EncodingHelper::UNICODE_REPLACEMENT_CHARACTER) expect { Oj.dump(diff) }.not_to raise_error(EncodingError) expect { Oj.dump(diff_two) }.not_to raise_error(EncodingError) + expect { Oj.dump(diff_three) }.not_to raise_error(EncodingError) end context 'when the diff is binary' do diff --git a/spec/requests/api/members_spec.rb b/spec/requests/api/members_spec.rb index 6bacb3a59b2..0db42e7439c 100644 --- a/spec/requests/api/members_spec.rb +++ b/spec/requests/api/members_spec.rb @@ -543,7 +543,7 @@ RSpec.describe API::Members do end it 'returns 409 if member does not exist' do - put api("/#{source_type.pluralize}/#{source.id}/members/123", maintainer), + put api("/#{source_type.pluralize}/#{source.id}/members/#{non_existing_record_id}", maintainer), params: { access_level: Member::MAINTAINER } expect(response).to have_gitlab_http_status(:not_found) @@ -618,7 +618,7 @@ RSpec.describe API::Members do end it 'returns 404 if member does not exist' do - delete api("/#{source_type.pluralize}/#{source.id}/members/123", maintainer) + delete api("/#{source_type.pluralize}/#{source.id}/members/#{non_existing_record_id}", maintainer) expect(response).to have_gitlab_http_status(:not_found) end