diff options
31 files changed, 515 insertions, 332 deletions
diff --git a/app/assets/javascripts/design_management/index.js b/app/assets/javascripts/design_management/index.js index f0930ade1b5..aa9f377ef16 100644 --- a/app/assets/javascripts/design_management/index.js +++ b/app/assets/javascripts/design_management/index.js @@ -1,6 +1,7 @@ import Vue from 'vue'; import App from './components/app.vue'; import apolloProvider from './graphql'; +import activeDiscussionQuery from './graphql/queries/active_discussion.query.graphql'; import createRouter from './router'; export default () => { @@ -8,7 +9,8 @@ export default () => { const { issueIid, projectPath, issuePath } = el.dataset; const router = createRouter(issuePath); - apolloProvider.clients.defaultClient.cache.writeData({ + apolloProvider.clients.defaultClient.cache.writeQuery({ + query: activeDiscussionQuery, data: { activeDiscussion: { __typename: 'ActiveDiscussion', diff --git a/app/assets/javascripts/pipelines/components/graph/constants.js b/app/assets/javascripts/pipelines/components/graph/constants.js index e44458f8f84..c7d973b5985 100644 --- a/app/assets/javascripts/pipelines/components/graph/constants.js +++ b/app/assets/javascripts/pipelines/components/graph/constants.js @@ -13,3 +13,5 @@ export const GRAPHQL = 'graphql'; export const STAGE_VIEW = 'stage'; export const LAYER_VIEW = 'layer'; + +export const IID_FAILURE = 'missing_iid'; diff --git a/app/assets/javascripts/pipelines/components/graph/graph_component_wrapper.vue b/app/assets/javascripts/pipelines/components/graph/graph_component_wrapper.vue index d5aa6f42c51..5299694ce13 100644 --- a/app/assets/javascripts/pipelines/components/graph/graph_component_wrapper.vue +++ b/app/assets/javascripts/pipelines/components/graph/graph_component_wrapper.vue @@ -4,7 +4,7 @@ import getPipelineDetails from 'shared_queries/pipelines/get_pipeline_details.qu import { __ } from '~/locale'; import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import { DEFAULT, DRAW_FAILURE, LOAD_FAILURE } from '../../constants'; -import { STAGE_VIEW } from './constants'; +import { IID_FAILURE, STAGE_VIEW } from './constants'; import PipelineGraph from './graph_component.vue'; import GraphViewSelector from './graph_view_selector.vue'; import { @@ -48,6 +48,9 @@ export default { }, errorTexts: { [DRAW_FAILURE]: __('An error occurred while drawing job relationship links.'), + [IID_FAILURE]: __( + 'The data in this pipeline is too old to be rendered as a graph. Please check the Jobs tab to access historical data.', + ), [LOAD_FAILURE]: __('We are currently unable to fetch data for this pipeline.'), [DEFAULT]: __('An unknown error occurred while loading this graph.'), }, @@ -64,6 +67,9 @@ export default { iid: this.pipelineIid, }; }, + skip() { + return !(this.pipelineProjectPath && this.pipelineIid); + }, update(data) { /* This check prevents the pipeline from being overwritten @@ -104,6 +110,11 @@ export default { text: this.$options.errorTexts[DRAW_FAILURE], variant: 'danger', }; + case IID_FAILURE: + return { + text: this.$options.errorTexts[IID_FAILURE], + variant: 'info', + }; case LOAD_FAILURE: return { text: this.$options.errorTexts[LOAD_FAILURE], @@ -129,8 +140,15 @@ export default { */ return this.$apollo.queries.pipeline.loading && !this.pipeline; }, + showGraphViewSelector() { + return Boolean(this.glFeatures.pipelineGraphLayersView && this.pipeline); + }, }, mounted() { + if (!this.pipelineIid) { + this.reportFailure({ type: IID_FAILURE, skipSentry: true }); + } + toggleQueryPollingByVisibility(this.$apollo.queries.pipeline); }, errorCaptured(err, _vm, info) { @@ -165,7 +183,7 @@ export default { {{ alert.text }} </gl-alert> <graph-view-selector - v-if="glFeatures.pipelineGraphLayersView" + v-if="showGraphViewSelector" :type="currentViewType" @updateViewType="updateViewType" /> diff --git a/app/assets/javascripts/repository/index.js b/app/assets/javascripts/repository/index.js index d0bce14c8e6..3a9a2adb417 100644 --- a/app/assets/javascripts/repository/index.js +++ b/app/assets/javascripts/repository/index.js @@ -9,6 +9,10 @@ import Breadcrumbs from './components/breadcrumbs.vue'; import DirectoryDownloadLinks from './components/directory_download_links.vue'; import LastCommit from './components/last_commit.vue'; import apolloProvider from './graphql'; +import commitsQuery from './queries/commits.query.graphql'; +import projectPathQuery from './queries/project_path.query.graphql'; +import projectShortPathQuery from './queries/project_short_path.query.graphql'; +import refsQuery from './queries/ref.query.graphql'; import createRouter from './router'; import { updateFormAction } from './utils/dom'; import { setTitle } from './utils/title'; @@ -19,13 +23,32 @@ export default function setupVueRepositoryList() { const { projectPath, projectShortPath, ref, escapedRef, fullName } = dataset; const router = createRouter(projectPath, escapedRef); - apolloProvider.clients.defaultClient.cache.writeData({ + apolloProvider.clients.defaultClient.cache.writeQuery({ + query: commitsQuery, + data: { + commits: [], + }, + }); + + apolloProvider.clients.defaultClient.cache.writeQuery({ + query: projectPathQuery, data: { projectPath, + }, + }); + + apolloProvider.clients.defaultClient.cache.writeQuery({ + query: projectShortPathQuery, + data: { projectShortPath, + }, + }); + + apolloProvider.clients.defaultClient.cache.writeQuery({ + query: refsQuery, + data: { ref, escapedRef, - commits: [], }, }); diff --git a/app/models/project.rb b/app/models/project.rb index d5ec05b07b6..d363c6c221e 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -579,7 +579,7 @@ class Project < ApplicationRecord with_issues_available_for_user(user).or(with_merge_requests_available_for_user(user)) end scope :with_merge_requests_enabled, -> { with_feature_enabled(:merge_requests) } - scope :with_remote_mirrors, -> { joins(:remote_mirrors).where(remote_mirrors: { enabled: true }).distinct } + scope :with_remote_mirrors, -> { joins(:remote_mirrors).where(remote_mirrors: { enabled: true }) } scope :with_limit, -> (maximum) { limit(maximum) } scope :with_group_runners_enabled, -> do diff --git a/changelogs/unreleased/325803-usage-ping-syntax-errors.yml b/changelogs/unreleased/325803-usage-ping-syntax-errors.yml new file mode 100644 index 00000000000..c1182eca44d --- /dev/null +++ b/changelogs/unreleased/325803-usage-ping-syntax-errors.yml @@ -0,0 +1,5 @@ +--- +title: Fix remote_mirrors usage ping metric +merge_request: 57332 +author: +type: fixed diff --git a/doc/development/usage_ping/dictionary.md b/doc/development/usage_ping/dictionary.md index 9cd3ac3dee8..bd915f9d1e2 100644 --- a/doc/development/usage_ping/dictionary.md +++ b/doc/development/usage_ping/dictionary.md @@ -10004,6 +10004,30 @@ Status: `implemented` Tiers: `premium`, `ultimate` +### `redis_hll_counters.epics_usage.g_project_management_users_updating_epic_descriptions_monthly` + +Counts of MAU changing epic descriptions + +[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210312102051_g_project_management_users_updating_epic_descriptions_monthly.yml) + +Group: `group:product planning` + +Status: `implemented` + +Tiers: `premium`, `ultimate` + +### `redis_hll_counters.epics_usage.g_project_management_users_updating_epic_descriptions_weekly` + +Counts of WAU changing epic descriptions + +[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_7d/20210312101753_g_project_management_users_updating_epic_descriptions_weekly.yml) + +Group: `group:product planning` + +Status: `implemented` + +Tiers: `premium`, `ultimate` + ### `redis_hll_counters.epics_usage.g_project_management_users_updating_epic_notes_monthly` Counts of MAU updating epic notes @@ -10028,6 +10052,30 @@ Status: `implemented` Tiers: `premium`, `ultimate` +### `redis_hll_counters.epics_usage.g_project_management_users_updating_epic_titles_monthly` + +Counts of MAU changing epic titles + +[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210312101935_g_project_management_users_updating_epic_titles_monthly.yml) + +Group: `group:product planning` + +Status: `implemented` + +Tiers: `premium`, `ultimate` + +### `redis_hll_counters.epics_usage.g_project_management_users_updating_epic_titles_weekly` + +Counts of WAU changing epic titles + +[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_7d/20210312101826_g_project_management_users_updating_epic_titles_weekly.yml) + +Group: `group:product planning` + +Status: `implemented` + +Tiers: `premium`, `ultimate` + ### `redis_hll_counters.ide_edit.g_edit_by_sfe_monthly` Missing description diff --git a/doc/integration/jira/dvcs.md b/doc/integration/jira/dvcs.md new file mode 100644 index 00000000000..8c2549fae07 --- /dev/null +++ b/doc/integration/jira/dvcs.md @@ -0,0 +1,192 @@ +--- +stage: Create +group: Ecosystem +info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments +--- + +# Jira DVCS connector + +If you're using GitLab.com and Jira Cloud, use the +[GitLab for Jira app](index.md#gitlab-for-jira-app) unless you have a specific need for the DVCS Connector. + +When configuring Jira DVCS Connector: + +- If you are using self-managed GitLab, make sure your GitLab instance is accessible by Jira. +- If you're connecting to Jira Cloud, ensure your instance is accessible through the internet. +- If you are using Jira Server, make sure your instance is accessible however your network is set up. + +## GitLab account configuration for DVCS + +NOTE: +To ensure that regular user account maintenance doesn't impact your integration, +create and use a single-purpose `jira` user in GitLab. + +1. In GitLab, create a new application to allow Jira to connect with your GitLab account. +1. Sign in to the GitLab account that you want Jira to use to connect to GitLab. +1. In the top-right corner, select your avatar. +1. Select **Edit profile**. +1. In the left sidebar, select **Applications**. +1. In the **Name** field, enter a descriptive name for the integration, such as `Jira`. +1. In the **Redirect URI** field, enter `https://<gitlab.example.com>/login/oauth/callback`, + replacing `<gitlab.example.com>` with your GitLab instance domain. For example, if you are using GitLab.com, + this would be `https://gitlab.com/login/oauth/callback`. + + NOTE: + If using a GitLab version earlier than 11.3, the `Redirect URI` must be + `https://<gitlab.example.com>/-/jira/login/oauth/callback`. If you want Jira + to have access to all projects, GitLab recommends that an administrator create the + application. + + ![GitLab application setup](img/jira_dev_panel_gl_setup_1.png) + +1. Check **API** in the **Scopes** section, and clear any other checkboxes. +1. Click **Save application**. GitLab displays the generated **Application ID** + and **Secret** values. Copy these values, which you use in Jira. + +## Jira DVCS Connector setup + +If you're using GitLab.com and Jira Cloud, use the +[GitLab for Jira app](index.md#gitlab-for-jira-app) unless you have a specific need for the DVCS Connector. + +1. Ensure you have completed the [GitLab configuration](#gitlab-account-configuration-for-dvcs). +1. If you're using Jira Server, go to **Settings (gear) > Applications > DVCS accounts**. + If you're using Jira Cloud, go to **Settings (gear) > Products > DVCS accounts**. +1. Click **Link GitHub Enterprise account** to start creating a new integration. + (We're pretending to be GitHub in this integration, until there's additional platform support in Jira.) +1. Complete the form: + +1. Select **GitHub Enterprise** for the **Host** field. + +1. In the **Team or User Account** field, enter either: + + - The relative path of a top-level GitLab group that you have access to. + - The relative path of your personal namespace. + + ![Creation of Jira DVCS integration](img/jira_dev_panel_jira_setup_2.png) + +1. In the **Host URL** field, enter `https://<gitlab.example.com>/`, + replacing `<gitlab.example.com>` with your GitLab instance domain. For example, if you are using GitLab.com, + this would be `https://gitlab.com/`. + + NOTE: + If using a GitLab version earlier than 11.3 the **Host URL** value should be `https://<gitlab.example.com>/-/jira` + +1. For the **Client ID** field, use the **Application ID** value from the previous section. + +1. For the **Client Secret** field, use the **Secret** value from the previous section. + +1. Ensure that the rest of the checkboxes are checked. + +1. Click **Add** to complete and create the integration. + + Jira takes up to a few minutes to know about (import behind the scenes) all the commits and branches + for all the projects in the GitLab group you specified in the previous step. These are refreshed + every 60 minutes. + + In the future, we plan on implementing real-time integration. If you need + to refresh the data manually, you can do this from the `Applications -> DVCS + accounts` screen where you initially set up the integration: + + ![Refresh GitLab information in Jira](img/jira_dev_panel_manual_refresh.png) + +To connect additional GitLab projects from other GitLab top-level groups (or personal namespaces), repeat the previous +steps with additional Jira DVCS accounts. + +Now that the integration is configured, read more about how to test and use it in [Usage](index.md#usage). + +## Troubleshooting your DVCS connection + +Refer to the items in this section if you're having problems with your DVCS connector. + +### Jira cannot access GitLab server + +```plaintext +Error obtaining access token. Cannot access https://gitlab.example.com from Jira. +``` + +This error message is generated in Jira, after completing the **Add New Account** +form and authorizing access. It indicates a connectivity issue from Jira to +GitLab. No other error messages appear in any logs. + +If there was an issue with SSL/TLS, this error message is generated. + +- The [GitLab Jira integration](../../user/project/integrations/jira.md) requires GitLab to connect to Jira. Any + TLS issues that arise from a private certificate authority or self-signed + certificate [are resolved on the GitLab server](https://docs.gitlab.com/omnibus/settings/ssl.html#other-certificate-authorities), + as GitLab is the TLS client. +- The Jira Development panel integration requires Jira to connect to GitLab, which + causes Jira to be the TLS client. If your GitLab server's certificate is not + issued by a public certificate authority, the Java Truststore on Jira's server + needs to have the appropriate certificate added to it (such as your organization's + root certificate). + +Refer to Atlassian's documentation and Atlassian Support for assistance setting up Jira correctly: + +- [Adding a certificate to the trust store](https://confluence.atlassian.com/kb/how-to-import-a-public-ssl-certificate-into-a-jvm-867025849.html). + - Simplest approach is to use [`keytool`](https://docs.oracle.com/javase/8/docs/technotes/tools/unix/keytool.html). + - Add additional roots to Java's default Truststore (`cacerts`) to allow Jira to + also trust public certificate authorities. + - If the integration stops working after upgrading Jira's Java runtime, this + might be because the `cacerts` Truststore got replaced. + +- [Troubleshooting connectivity up to and including TLS handshaking](https://confluence.atlassian.com/kb/unable-to-connect-to-ssl-services-due-to-pkix-path-building-failed-error-779355358.html), + using the a java class called `SSLPoke`. + +- Download the class from Atlassian's knowledge base to Jira's server, for example to `/tmp`. +- Use the same Java runtime as Jira. +- Pass all networking-related parameters that Jira is called with, such as proxy + settings or an alternative root Truststore (`-Djavax.net.ssl.trustStore`): + +```shell +${JAVA_HOME}/bin/java -Djavax.net.ssl.trustStore=/var/atlassian/application-data/jira/cacerts -classpath /tmp SSLPoke gitlab.example.com 443 +``` + +The message `Successfully connected` indicates a successful TLS handshake. + +If there are problems, the Java TLS library generates errors that you can +look up for more detail. + +### Scope error when connecting Jira via DVCS + +```plaintext +The requested scope is invalid, unknown, or malformed. +``` + +Potential resolutions: + +- Verify the URL shown in the browser after being redirected from Jira in step 5 of [Jira DVCS Connector Setup](#jira-dvcs-connector-setup) includes `scope=api` in the query string. +- If `scope=api` is missing from the URL, return to [GitLab account configuration](#gitlab-account-configuration-for-dvcs) and ensure the application you created in step 1 has the `api` box checked under scopes. + +### Jira error adding account and no repositories listed + +```plaintext +Error! +Failed adding the account: [Error retrieving list of repositories] +``` + +This error message is generated in Jira after completing the **Add New Account** +form in Jira and authorizing access. Attempting to click **Try Again** returns +`Account is already integrated with JIRA.` The account is set up in the DVCS +accounts view, but no repositories are listed. + +Potential resolutions: + +- If you're using GitLab versions 11.10-12.7, upgrade to GitLab 12.8.10 or later + to resolve an identified [issue](https://gitlab.com/gitlab-org/gitlab/-/issues/37012). +- If you're using GitLab Free or GitLab Starter, be sure you're using + GitLab 13.4 or later. + +[Contact GitLab Support](https://about.gitlab.com/support/) if none of these reasons apply. + +### Fixing synchronization issues + +If Jira displays incorrect information (such as deleted branches), you may need to +resynchronize the information. To do so: + +1. In Jira, go to **Jira Administration > Applications > DVCS accounts**. +1. At the account (group or subgroup) level, Jira displays an option to + **Refresh repositories** in the `...` (ellipsis) menu. +1. For each project, there's a sync button displayed next to the **last activity** date. + To perform a *soft resync*, click the button, or complete a *full sync* by shift clicking + the button. For more information, see + [Atlassian's documentation](https://support.atlassian.com/jira-cloud-administration/docs/synchronize-jira-cloud-to-bitbucket/). diff --git a/doc/integration/img/jira_dev_panel_gl_setup_1.png b/doc/integration/jira/img/jira_dev_panel_gl_setup_1.png Binary files differindex 75279877c93..75279877c93 100644 --- a/doc/integration/img/jira_dev_panel_gl_setup_1.png +++ b/doc/integration/jira/img/jira_dev_panel_gl_setup_1.png diff --git a/doc/integration/img/jira_dev_panel_jira_setup_2.png b/doc/integration/jira/img/jira_dev_panel_jira_setup_2.png Binary files differindex a4778a00dd5..a4778a00dd5 100644 --- a/doc/integration/img/jira_dev_panel_jira_setup_2.png +++ b/doc/integration/jira/img/jira_dev_panel_jira_setup_2.png diff --git a/doc/integration/img/jira_dev_panel_jira_setup_3.png b/doc/integration/jira/img/jira_dev_panel_jira_setup_3.png Binary files differindex 4049a65f56b..4049a65f56b 100644 --- a/doc/integration/img/jira_dev_panel_jira_setup_3.png +++ b/doc/integration/jira/img/jira_dev_panel_jira_setup_3.png diff --git a/doc/integration/img/jira_dev_panel_jira_setup_4.png b/doc/integration/jira/img/jira_dev_panel_jira_setup_4.png Binary files differindex 81d84cb173d..81d84cb173d 100644 --- a/doc/integration/img/jira_dev_panel_jira_setup_4.png +++ b/doc/integration/jira/img/jira_dev_panel_jira_setup_4.png diff --git a/doc/integration/img/jira_dev_panel_jira_setup_5.png b/doc/integration/jira/img/jira_dev_panel_jira_setup_5.png Binary files differindex 73dc867d301..73dc867d301 100644 --- a/doc/integration/img/jira_dev_panel_jira_setup_5.png +++ b/doc/integration/jira/img/jira_dev_panel_jira_setup_5.png diff --git a/doc/integration/img/jira_dev_panel_manual_refresh.png b/doc/integration/jira/img/jira_dev_panel_manual_refresh.png Binary files differindex dc92d533bde..dc92d533bde 100644 --- a/doc/integration/img/jira_dev_panel_manual_refresh.png +++ b/doc/integration/jira/img/jira_dev_panel_manual_refresh.png diff --git a/doc/integration/img/jira_dev_panel_setup_com_1.png b/doc/integration/jira/img/jira_dev_panel_setup_com_1.png Binary files differindex 18f0d5da043..18f0d5da043 100644 --- a/doc/integration/img/jira_dev_panel_setup_com_1.png +++ b/doc/integration/jira/img/jira_dev_panel_setup_com_1.png diff --git a/doc/integration/img/jira_dev_panel_setup_com_2.png b/doc/integration/jira/img/jira_dev_panel_setup_com_2.png Binary files differindex 31dc13e1271..31dc13e1271 100644 --- a/doc/integration/img/jira_dev_panel_setup_com_2.png +++ b/doc/integration/jira/img/jira_dev_panel_setup_com_2.png diff --git a/doc/integration/img/jira_dev_panel_setup_com_3_v13_9.png b/doc/integration/jira/img/jira_dev_panel_setup_com_3_v13_9.png Binary files differindex fe791637d31..fe791637d31 100644 --- a/doc/integration/img/jira_dev_panel_setup_com_3_v13_9.png +++ b/doc/integration/jira/img/jira_dev_panel_setup_com_3_v13_9.png diff --git a/doc/integration/img/jira_dev_panel_setup_com_4_v13_9.png b/doc/integration/jira/img/jira_dev_panel_setup_com_4_v13_9.png Binary files differindex 08787f12b67..08787f12b67 100644 --- a/doc/integration/img/jira_dev_panel_setup_com_4_v13_9.png +++ b/doc/integration/jira/img/jira_dev_panel_setup_com_4_v13_9.png diff --git a/doc/integration/jira/index.md b/doc/integration/jira/index.md new file mode 100644 index 00000000000..494a95fa1f0 --- /dev/null +++ b/doc/integration/jira/index.md @@ -0,0 +1,130 @@ +--- +stage: Create +group: Ecosystem +info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments +--- + +# GitLab Jira Development panel integration **(FREE)** + +> - [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/233149) to GitLab Free in 13.4. + +The Jira Development panel integration allows you to reference Jira issues in GitLab, displaying +activity in the [Development panel](https://support.atlassian.com/jira-software-cloud/docs/view-development-information-for-an-issue/) +in the issue. + +It complements the [GitLab Jira integration](../../user/project/integrations/jira.md). You may choose +to configure both integrations to take advantage of both sets of features. See a +[feature comparison](../../user/project/integrations/jira_integrations.md). + +## Features + +| Your mention of Jira issue ID in GitLab context | Automated effect in Jira issue | +|---------------------------------------------------|--------------------------------------------------------------------------------------------------------| +| In a merge request | Link to the MR is displayed in Development panel. | +| In a branch name | Link to the branch is displayed in Development panel. | +| In a commit message | Link to the commit is displayed in Development panel. | +| In a commit message with Jira Smart Commit format | Displays your custom comment or logged time spent and/or performs specified issue transition on merge. | + +With this integration, you can access related GitLab merge requests, branches, and commits directly from a Jira issue, reflecting your work in GitLab. From the Development panel, you can open a detailed view and take actions including creating a new merge request from a branch. For more information, see [Usage](#usage). + +This integration connects all GitLab projects to projects in the Jira instance in either: + +- A top-level group. A top-level GitLab group is one that does not have any parent group itself. All + the projects of that top-level group, as well as projects of the top-level group's subgroups nesting + down, are connected. +- A personal namespace, which then connects the projects in that personal namespace to Jira. + +This differs from the [Jira integration](../../user/project/integrations/jira.md), where the mapping is between one GitLab project and the entire Jira instance. + +## Configuration + +<i class="fa fa-youtube-play youtube" aria-hidden="true"></i> +For an overview of how to configure Jira Development panel integration, see [Agile Management - GitLab Jira Development panel integration](https://www.youtube.com/watch?v=VjVTOmMl85M&feature=youtu.be). + +We recommend that a GitLab group maintainer or group owner, or instance administrator (in the case of +self-managed GitLab) set up the integration to simplify administration. + +| If you use Jira on: | GitLab.com customers need: | GitLab self-managed customers need: | +|-|-|-| +| [Atlassian cloud](https://www.atlassian.com/cloud) | The [GitLab.com for Jira Cloud](https://marketplace.atlassian.com/apps/1221011/gitlab-com-for-jira-cloud?hosting=cloud&tab=overview) application installed from the [Atlassian Marketplace](https://marketplace.atlassian.com). This offers real-time sync between GitLab and Jira. | The [GitLab.com for Jira Cloud](https://marketplace.atlassian.com/apps/1221011/gitlab-com-for-jira-cloud?hosting=cloud&tab=overview), using a workaround process. See a [relevant issue](https://gitlab.com/gitlab-org/gitlab/-/issues/268278) for more information. | +| Your own server | The Jira DVCS (distributed version control system) connector. This syncs data hourly. | The [Jira DVCS Connector](dvcs.md). | + +### GitLab for Jira app **(FREE SAAS)** + +You can integrate GitLab.com and Jira Cloud using the +[GitLab for Jira](https://marketplace.atlassian.com/apps/1221011/gitlab-com-for-jira-cloud) +app in the Atlassian Marketplace. The user configuring GitLab for Jira must have +[Maintainer](../../user/permissions.md) permissions in the GitLab namespace. + +This method is recommended when using GitLab.com and Jira Cloud because data is synchronized in real-time. The DVCS connector updates data only once per hour. If you are not using both of these environments, use the [Jira DVCS Connector](dvcs.md) method. + +<i class="fa fa-youtube-play youtube" aria-hidden="true"></i> +For a walkthrough of the integration with GitLab for Jira, watch [Configure GitLab Jira Integration using Marketplace App](https://youtu.be/SwR-g1s1zTo) on YouTube. + +1. Go to **Jira Settings > Apps > Find new apps**, then search for GitLab. +1. Click **GitLab for Jira**, then click **Get it now**, or go to the + [App in the marketplace directly](https://marketplace.atlassian.com/apps/1221011/gitlab-com-for-jira-cloud). + + ![Install GitLab App on Jira](img/jira_dev_panel_setup_com_1.png) +1. After installing, click **Get started** to go to the configurations page. + This page is always available under **Jira Settings > Apps > Manage apps**. + + ![Start GitLab App configuration on Jira](img/jira_dev_panel_setup_com_2.png) +1. If not already signed in to GitLab.com, you must sign in as a user with + [Maintainer](../../user/permissions.md) permissions to add namespaces. + + ![Sign in to GitLab.com in GitLab Jira App](img/jira_dev_panel_setup_com_3_v13_9.png) +1. Select **Add namespace** to open the list of available namespaces. + +1. Identify the namespace you want to link, and select **Link**. + + ![Link namespace in GitLab Jira App](img/jira_dev_panel_setup_com_4_v13_9.png) + +NOTE: +The GitLab user only needs access when adding a new namespace. For syncing with +Jira, we do not depend on the user's token. + +After a namespace is added: + +- All future commits, branches, and merge requests of all projects under that namespace + are synced to Jira. +- From GitLab 13.8, past merge request data is synced to Jira. + +Support for syncing past branch and commit data [is planned](https://gitlab.com/gitlab-org/gitlab/-/issues/263240). + +For more information, see [Usage](#usage). + +#### Troubleshooting GitLab for Jira + +The GitLab for Jira App uses an iframe to add namespaces on the settings page. Some browsers block cross-site cookies. This can lead to a message saying that the user needs to log in on GitLab.com even though the user is already logged in. + +> "You need to sign in or sign up before continuing." + +In this case, use [Firefox](https://www.mozilla.org/en-US/firefox/) or enable cross-site cookies in your browser. + +## Usage + +After the integration is set up on GitLab and Jira, you can: + +- Refer to any Jira issue by its ID in GitLab branch names, commit messages, and merge request + titles. +- See the linked branches, commits, and merge requests in Jira issues (merge requests are + called "pull requests" in Jira issues). + +Jira issue IDs must be formatted in uppercase for the integration to work. + +![Branch, Commit and Pull Requests links on Jira issue](img/jira_dev_panel_jira_setup_3.png) + +Click the links to see your GitLab repository data. + +![GitLab commits details on a Jira issue](img/jira_dev_panel_jira_setup_4.png) + +![GitLab merge requests details on a Jira issue](img/jira_dev_panel_jira_setup_5.png) + +For more information on using Jira Smart Commits to track time against an issue, specify an issue transition, or add a custom comment, see the Atlassian page [Using Smart Commits](https://confluence.atlassian.com/fisheye/using-smart-commits-960155400.html). + +## Limitations + +This integration is not supported on GitLab instances under a +[relative URL](https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-a-relative-url-for-gitlab). +For example, `http://example.com/gitlab`. diff --git a/doc/integration/jira_development_panel.md b/doc/integration/jira_development_panel.md index 3322be45f53..152c1df3538 100644 --- a/doc/integration/jira_development_panel.md +++ b/doc/integration/jira_development_panel.md @@ -1,317 +1,8 @@ --- -stage: Create -group: Ecosystem -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments +redirect_to: 'jira/index.md' --- -# GitLab Jira Development panel integration **(FREE)** +This document was moved to [another location](jira/index.md). -> - [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/233149) to GitLab Free in 13.4. - -The Jira Development panel integration allows you to reference Jira issues in GitLab, displaying -activity in the [Development panel](https://support.atlassian.com/jira-software-cloud/docs/view-development-information-for-an-issue/) -in the issue. - -It complements the [GitLab Jira integration](../user/project/integrations/jira.md). You may choose -to configure both integrations to take advantage of both sets of features. See a -[feature comparison](../user/project/integrations/jira_integrations.md). - -## Features - -| Your mention of Jira issue ID in GitLab context | Automated effect in Jira issue | -|---------------------------------------------------|--------------------------------------------------------------------------------------------------------| -| In a merge request | Link to the MR is displayed in Development panel. | -| In a branch name | Link to the branch is displayed in Development panel. | -| In a commit message | Link to the commit is displayed in Development panel. | -| In a commit message with Jira Smart Commit format | Displays your custom comment or logged time spent and/or performs specified issue transition on merge. | - -With this integration, you can access related GitLab merge requests, branches, and commits directly from a Jira issue, reflecting your work in GitLab. From the Development panel, you can open a detailed view and take actions including creating a new merge request from a branch. For more information, see [Usage](#usage). - -This integration connects all GitLab projects to projects in the Jira instance in either: - -- A top-level group. A top-level GitLab group is one that does not have any parent group itself. All - the projects of that top-level group, as well as projects of the top-level group's subgroups nesting - down, are connected. -- A personal namespace, which then connects the projects in that personal namespace to Jira. - -This differs from the [Jira integration](../user/project/integrations/jira.md), where the mapping is between one GitLab project and the entire Jira instance. - -## Configuration - -<i class="fa fa-youtube-play youtube" aria-hidden="true"></i> -For an overview of how to configure Jira Development panel integration, see [Agile Management - GitLab Jira Development panel integration](https://www.youtube.com/watch?v=VjVTOmMl85M&feature=youtu.be). - -We recommend that a GitLab group maintainer or group owner, or instance administrator (in the case of -self-managed GitLab) set up the integration to simplify administration. - -| If you use Jira on: | GitLab.com customers need: | GitLab self-managed customers need: | -|-|-|-| -| [Atlassian cloud](https://www.atlassian.com/cloud) | The [GitLab.com for Jira Cloud](https://marketplace.atlassian.com/apps/1221011/gitlab-com-for-jira-cloud?hosting=cloud&tab=overview) application installed from the [Atlassian Marketplace](https://marketplace.atlassian.com). This offers real-time sync between GitLab and Jira. | The [GitLab.com for Jira Cloud](https://marketplace.atlassian.com/apps/1221011/gitlab-com-for-jira-cloud?hosting=cloud&tab=overview), using a workaround process. See a [relevant issue](https://gitlab.com/gitlab-org/gitlab/-/issues/268278) for more information. | -| Your own server | The Jira DVCS (distributed version control system) connector. This syncs data hourly. | The Jira DVCS connector. | - -### Jira DVCS configuration - -If you're using GitLab.com and Jira Cloud, use the -[GitLab for Jira app](#gitlab-for-jira-app) unless you have a specific need for the DVCS Connector. - -When configuring Jira DVCS Connector: - -- If you are using self-managed GitLab, make sure your GitLab instance is accessible by Jira. -- If you're connecting to Jira Cloud, ensure your instance is accessible through the internet. -- If you are using Jira Server, make sure your instance is accessible however your network is set up. - -#### GitLab account configuration for DVCS - -NOTE: -To ensure that regular user account maintenance doesn't impact your integration, -create and use a single-purpose `jira` user in GitLab. - -1. In GitLab, create a new application to allow Jira to connect with your GitLab account. -1. Sign in to the GitLab account that you want Jira to use to connect to GitLab. -1. In the top-right corner, select your avatar. -1. Select **Edit profile**. -1. In the left sidebar, select **Applications**. -1. In the **Name** field, enter a descriptive name for the integration, such as `Jira`. -1. In the **Redirect URI** field, enter `https://<gitlab.example.com>/login/oauth/callback`, - replacing `<gitlab.example.com>` with your GitLab instance domain. For example, if you are using GitLab.com, - this would be `https://gitlab.com/login/oauth/callback`. - - NOTE: - If using a GitLab version earlier than 11.3, the `Redirect URI` must be - `https://<gitlab.example.com>/-/jira/login/oauth/callback`. If you want Jira - to have access to all projects, GitLab recommends that an administrator create the - application. - - ![GitLab application setup](img/jira_dev_panel_gl_setup_1.png) - -1. Check **API** in the **Scopes** section, and clear any other checkboxes. -1. Click **Save application**. GitLab displays the generated **Application ID** - and **Secret** values. Copy these values, which you use in Jira. - -#### Jira DVCS Connector setup - -If you're using GitLab.com and Jira Cloud, use the -[GitLab for Jira app](#gitlab-for-jira-app) unless you have a specific need for the DVCS Connector. - -1. Ensure you have completed the [GitLab configuration](#gitlab-account-configuration-for-dvcs). -1. If you're using Jira Server, go to **Settings (gear) > Applications > DVCS accounts**. - If you're using Jira Cloud, go to **Settings (gear) > Products > DVCS accounts**. -1. Click **Link GitHub Enterprise account** to start creating a new integration. - (We're pretending to be GitHub in this integration, until there's additional platform support in Jira.) -1. Complete the form: - -1. Select **GitHub Enterprise** for the **Host** field. - -1. In the **Team or User Account** field, enter either: - - - The relative path of a top-level GitLab group that you have access to. - - The relative path of your personal namespace. - - ![Creation of Jira DVCS integration](img/jira_dev_panel_jira_setup_2.png) - -1. In the **Host URL** field, enter `https://<gitlab.example.com>/`, - replacing `<gitlab.example.com>` with your GitLab instance domain. For example, if you are using GitLab.com, - this would be `https://gitlab.com/`. - - NOTE: - If using a GitLab version earlier than 11.3 the **Host URL** value should be `https://<gitlab.example.com>/-/jira` - -1. For the **Client ID** field, use the **Application ID** value from the previous section. - -1. For the **Client Secret** field, use the **Secret** value from the previous section. - -1. Ensure that the rest of the checkboxes are checked. - -1. Click **Add** to complete and create the integration. - - Jira takes up to a few minutes to know about (import behind the scenes) all the commits and branches - for all the projects in the GitLab group you specified in the previous step. These are refreshed - every 60 minutes. - - In the future, we plan on implementing real-time integration. If you need - to refresh the data manually, you can do this from the `Applications -> DVCS - accounts` screen where you initially set up the integration: - - ![Refresh GitLab information in Jira](img/jira_dev_panel_manual_refresh.png) - -To connect additional GitLab projects from other GitLab top-level groups (or personal namespaces), repeat the previous -steps with additional Jira DVCS accounts. - -Now that the integration is configured, read more about how to test and use it in [Usage](#usage). - -#### Troubleshooting your DVCS connection - -Refer to the items in this section if you're having problems with your DVCS connector. - -##### Jira cannot access GitLab server - -```plaintext -Error obtaining access token. Cannot access https://gitlab.example.com from Jira. -``` - -This error message is generated in Jira, after completing the **Add New Account** -form and authorizing access. It indicates a connectivity issue from Jira to -GitLab. No other error messages appear in any logs. - -If there was an issue with SSL/TLS, this error message is generated. - -- The [GitLab Jira integration](../user/project/integrations/jira.md) requires GitLab to connect to Jira. Any - TLS issues that arise from a private certificate authority or self-signed - certificate [are resolved on the GitLab server](https://docs.gitlab.com/omnibus/settings/ssl.html#other-certificate-authorities), - as GitLab is the TLS client. -- The Jira Development panel integration requires Jira to connect to GitLab, which - causes Jira to be the TLS client. If your GitLab server's certificate is not - issued by a public certificate authority, the Java Truststore on Jira's server - needs to have the appropriate certificate added to it (such as your organization's - root certificate). - -Refer to Atlassian's documentation and Atlassian Support for assistance setting up Jira correctly: - -- [Adding a certificate to the trust store](https://confluence.atlassian.com/kb/how-to-import-a-public-ssl-certificate-into-a-jvm-867025849.html). - - Simplest approach is to use [`keytool`](https://docs.oracle.com/javase/8/docs/technotes/tools/unix/keytool.html). - - Add additional roots to Java's default Truststore (`cacerts`) to allow Jira to - also trust public certificate authorities. - - If the integration stops working after upgrading Jira's Java runtime, this - might be because the `cacerts` Truststore got replaced. - -- [Troubleshooting connectivity up to and including TLS handshaking](https://confluence.atlassian.com/kb/unable-to-connect-to-ssl-services-due-to-pkix-path-building-failed-error-779355358.html), - using the a java class called `SSLPoke`. - -- Download the class from Atlassian's knowledge base to Jira's server, for example to `/tmp`. -- Use the same Java runtime as Jira. -- Pass all networking-related parameters that Jira is called with, such as proxy - settings or an alternative root Truststore (`-Djavax.net.ssl.trustStore`): - -```shell -${JAVA_HOME}/bin/java -Djavax.net.ssl.trustStore=/var/atlassian/application-data/jira/cacerts -classpath /tmp SSLPoke gitlab.example.com 443 -``` - -The message `Successfully connected` indicates a successful TLS handshake. - -If there are problems, the Java TLS library generates errors that you can -look up for more detail. - -##### Scope error when connecting Jira via DVCS - -```plaintext -The requested scope is invalid, unknown, or malformed. -``` - -Potential resolutions: - -- Verify the URL shown in the browser after being redirected from Jira in step 5 of [Jira DVCS Connector Setup](#jira-dvcs-connector-setup) includes `scope=api` in the query string. -- If `scope=api` is missing from the URL, return to [GitLab account configuration](#gitlab-account-configuration-for-dvcs) and ensure the application you created in step 1 has the `api` box checked under scopes. - -##### Jira error adding account and no repositories listed - -```plaintext -Error! -Failed adding the account: [Error retrieving list of repositories] -``` - -This error message is generated in Jira after completing the **Add New Account** -form in Jira and authorizing access. Attempting to click **Try Again** returns -`Account is already integrated with JIRA.` The account is set up in the DVCS -accounts view, but no repositories are listed. - -Potential resolutions: - -- If you're using GitLab versions 11.10-12.7, upgrade to GitLab 12.8.10 or later - to resolve an identified [issue](https://gitlab.com/gitlab-org/gitlab/-/issues/37012). -- If you're using GitLab Free or GitLab Starter, be sure you're using - GitLab 13.4 or later. - -[Contact GitLab Support](https://about.gitlab.com/support/) if none of these reasons apply. - -#### Fixing synchronization issues - -If Jira displays incorrect information (such as deleted branches), you may need to -resynchronize the information. To do so: - -1. In Jira, go to **Jira Administration > Applications > DVCS accounts**. -1. At the account (group or subgroup) level, Jira displays an option to - **Refresh repositories** in the `...` (ellipsis) menu. -1. For each project, there's a sync button displayed next to the **last activity** date. - To perform a *soft resync*, click the button, or complete a *full sync* by shift clicking - the button. For more information, see - [Atlassian's documentation](https://support.atlassian.com/jira-cloud-administration/docs/synchronize-jira-cloud-to-bitbucket/). - -### GitLab for Jira app **(FREE SAAS)** - -You can integrate GitLab.com and Jira Cloud using the -[GitLab for Jira](https://marketplace.atlassian.com/apps/1221011/gitlab-com-for-jira-cloud) -app in the Atlassian Marketplace. The user configuring GitLab for Jira must have -[Maintainer](../user/permissions.md) permissions in the GitLab namespace. - -This method is recommended when using GitLab.com and Jira Cloud because data is synchronized in real-time. The DVCS connector updates data only once per hour. If you are not using both of these environments, use the [Jira DVCS Connector](#jira-dvcs-configuration) method. - -<i class="fa fa-youtube-play youtube" aria-hidden="true"></i> -For a walkthrough of the integration with GitLab for Jira, watch [Configure GitLab Jira Integration using Marketplace App](https://youtu.be/SwR-g1s1zTo) on YouTube. - -1. Go to **Jira Settings > Apps > Find new apps**, then search for GitLab. -1. Click **GitLab for Jira**, then click **Get it now**, or go to the - [App in the marketplace directly](https://marketplace.atlassian.com/apps/1221011/gitlab-com-for-jira-cloud). - - ![Install GitLab App on Jira](img/jira_dev_panel_setup_com_1.png) -1. After installing, click **Get started** to go to the configurations page. - This page is always available under **Jira Settings > Apps > Manage apps**. - - ![Start GitLab App configuration on Jira](img/jira_dev_panel_setup_com_2.png) -1. If not already signed in to GitLab.com, you must sign in as a user with - [Maintainer](../user/permissions.md) permissions to add namespaces. - - ![Sign in to GitLab.com in GitLab Jira App](img/jira_dev_panel_setup_com_3_v13_9.png) -1. Select **Add namespace** to open the list of available namespaces. - -1. Identify the namespace you want to link, and select **Link**. - - ![Link namespace in GitLab Jira App](img/jira_dev_panel_setup_com_4_v13_9.png) - -NOTE: -The GitLab user only needs access when adding a new namespace. For syncing with -Jira, we do not depend on the user's token. - -After a namespace is added: - -- All future commits, branches, and merge requests of all projects under that namespace - are synced to Jira. -- From GitLab 13.8, past merge request data is synced to Jira. - -Support for syncing past branch and commit data [is planned](https://gitlab.com/gitlab-org/gitlab/-/issues/263240). - -For more information, see [Usage](#usage). - -#### Troubleshooting GitLab for Jira - -The GitLab for Jira App uses an iframe to add namespaces on the settings page. Some browsers block cross-site cookies. This can lead to a message saying that the user needs to log in on GitLab.com even though the user is already logged in. - -> "You need to sign in or sign up before continuing." - -In this case, use [Firefox](https://www.mozilla.org/en-US/firefox/) or enable cross-site cookies in your browser. - -## Usage - -After the integration is set up on GitLab and Jira, you can: - -- Refer to any Jira issue by its ID in GitLab branch names, commit messages, and merge request - titles. -- See the linked branches, commits, and merge requests in Jira issues (merge requests are - called "pull requests" in Jira issues). - -Jira issue IDs must be formatted in uppercase for the integration to work. - -![Branch, Commit and Pull Requests links on Jira issue](img/jira_dev_panel_jira_setup_3.png) - -Click the links to see your GitLab repository data. - -![GitLab commits details on a Jira issue](img/jira_dev_panel_jira_setup_4.png) - -![GitLab merge requests details on a Jira issue](img/jira_dev_panel_jira_setup_5.png) - -For more information on using Jira Smart Commits to track time against an issue, specify an issue transition, or add a custom comment, see the Atlassian page [Using Smart Commits](https://confluence.atlassian.com/fisheye/using-smart-commits-960155400.html). - -## Limitations - -This integration is not supported on GitLab instances under a -[relative URL](https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-a-relative-url-for-gitlab). -For example, `http://example.com/gitlab`. +<!-- This redirect file can be deleted after <2021-06-24>. --> +<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/#move-or-rename-a-page --> diff --git a/doc/user/application_security/dast/dast_troubleshooting.md b/doc/user/application_security/dast/dast_troubleshooting.md index b3f853ab2c0..48b48392e65 100644 --- a/doc/user/application_security/dast/dast_troubleshooting.md +++ b/doc/user/application_security/dast/dast_troubleshooting.md @@ -9,7 +9,7 @@ type: reference, howto The following troubleshooting scenarios have been collected from customer support cases. If you experience a problem not addressed here, or the information here does not fix your problem, create a -support ticket. +support ticket. For more details, see the [GitLab Support](https://about.gitlab.com/support/) page. ## Running out of memory diff --git a/doc/user/group/epics/epic_boards.md b/doc/user/group/epics/epic_boards.md index c216d4c2419..343f7c496b1 100644 --- a/doc/user/group/epics/epic_boards.md +++ b/doc/user/group/epics/epic_boards.md @@ -4,7 +4,7 @@ group: Product Planning info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments --- -# Epic Boards **(ULTIMATE)** +# Epic Boards **(PREMIUM)** > - [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/2864) in GitLab 13.10. > - It's [deployed behind a feature flag](../../feature_flags.md), disabled by default. @@ -24,7 +24,7 @@ labels. To view an epic board, in a group, select **Epics > Boards**. -![GitLab epic board - Ultimate](img/epic_board_v13_10.png) +![GitLab epic board - Premium](img/epic_board_v13_10.png) ## Create an epic board diff --git a/doc/user/project/integrations/jira.md b/doc/user/project/integrations/jira.md index ad31e7ca784..2f6aa06007f 100644 --- a/doc/user/project/integrations/jira.md +++ b/doc/user/project/integrations/jira.md @@ -12,7 +12,7 @@ process of working across these systems more efficient. The GitLab Jira integration, available in every GitLab project by default, allows you to connect to any Jira instance, whether on Atlassian cloud or self-managed. -You can also install the [Jira Development Panel integration](../../../integration/jira_development_panel.md). +You can also install the [Jira Development Panel integration](../../../integration/jira/index.md). For more information about the differences between the two integrations, see [Jira integrations](jira_integrations.md). diff --git a/doc/user/project/integrations/jira_integrations.md b/doc/user/project/integrations/jira_integrations.md index 6e8c0a07fde..6b95fb00656 100644 --- a/doc/user/project/integrations/jira_integrations.md +++ b/doc/user/project/integrations/jira_integrations.md @@ -23,7 +23,7 @@ GitLab activity and Jira issues, with additional features: - [Jira integration](jira.md), built in to GitLab. In a given GitLab project, it can be configured to connect to any Jira instance, either hosted by you or hosted in [Atlassian cloud](https://www.atlassian.com/cloud). -- [Jira development panel integration](../../../integration/jira_development_panel.md). Connects all +- [Jira development panel integration](../../../integration/jira/index.md). Connects all GitLab projects under a specified group or personal namespace. Jira development panel integration configuration depends on whether you are @@ -38,7 +38,7 @@ using Jira on [Atlassian cloud](https://www.atlassian.com/cloud) or on your own [this workaround process](#install-the-gitlab-jira-cloud-application-for-self-managed-instances). Read the [relevant issue](https://gitlab.com/gitlab-org/gitlab/-/issues/268278) for more information. - *If your Jira instance is hosted on your own server:* - Use the [Jira DVCS connector](../../../integration/jira_development_panel.md). + Use the [Jira DVCS connector](../../../integration/jira/index.md). ### Install the GitLab Jira Cloud application for self-managed instances **(FREE SELF)** diff --git a/lib/gitlab/usage_data_counters/known_events/epic_events.yml b/lib/gitlab/usage_data_counters/known_events/epic_events.yml index 836621511f1..600c849db1f 100644 --- a/lib/gitlab/usage_data_counters/known_events/epic_events.yml +++ b/lib/gitlab/usage_data_counters/known_events/epic_events.yml @@ -9,6 +9,18 @@ aggregation: daily feature_flag: track_epics_activity +- name: g_project_management_users_updating_epic_titles + category: epics_usage + redis_slot: project_management + aggregation: daily + feature_flag: track_epics_activity + +- name: g_project_management_users_updating_epic_descriptions + category: epics_usage + redis_slot: project_management + aggregation: daily + feature_flag: track_epics_activity + - name: g_project_management_users_creating_epic_notes category: epics_usage redis_slot: project_management @@ -50,7 +62,7 @@ redis_slot: project_management aggregation: daily feature_flag: track_epics_activity - + - name: g_project_management_epic_reopened category: epics_usage redis_slot: project_management diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 9030bfa66b0..a7df3acceda 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -30072,6 +30072,9 @@ msgstr "" msgid "The current user is not authorized to access the job log." msgstr "" +msgid "The data in this pipeline is too old to be rendered as a graph. Please check the Jobs tab to access historical data." +msgstr "" + msgid "The data source is connected, but there is no data to display. %{documentationLink}" msgstr "" diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb index de6b24e8477..b2b37fcd424 100644 --- a/qa/qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb +++ b/qa/qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb @@ -48,7 +48,7 @@ module QA Resource::Issue.fabricate_via_api!.visit! end - it 'comments on an issue with an attachment', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/393' do + it 'comments on an issue with an attachment', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1742' do Page::Project::Issue::Show.perform do |show| show.comment('See attached banana for scale', attachment: file_to_attach) diff --git a/qa/qa/specs/features/browser_ui/4_verify/testing/view_code_coverage_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/testing/view_code_coverage_spec.rb index 5bfc88e45f2..d6d8729114d 100644 --- a/qa/qa/specs/features/browser_ui/4_verify/testing/view_code_coverage_spec.rb +++ b/qa/qa/specs/features/browser_ui/4_verify/testing/view_code_coverage_spec.rb @@ -33,7 +33,7 @@ module QA runner.remove_via_api! end - it 'creates an MR with code coverage statistics', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/807' do + it 'creates an MR with code coverage statistics', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1740' do runner.project.visit! configure_code_coverage(simplecov) merge_request.visit! @@ -42,7 +42,7 @@ module QA Support::Retrier.retry_until(max_attempts: 5, sleep_interval: 5) do mr_widget.has_pipeline_status?(/Pipeline #\d+ passed/) end - expect(mr_widget).to have_content('Coverage 66.67%') + expect(mr_widget).to have_content('Test coverage 66.67%') end end end diff --git a/spec/frontend/pipelines/graph/graph_component_wrapper_spec.js b/spec/frontend/pipelines/graph/graph_component_wrapper_spec.js index adb7eda9587..ce78ee3bc51 100644 --- a/spec/frontend/pipelines/graph/graph_component_wrapper_spec.js +++ b/spec/frontend/pipelines/graph/graph_component_wrapper_spec.js @@ -4,6 +4,7 @@ import Vue from 'vue'; import VueApollo from 'vue-apollo'; import createMockApollo from 'helpers/mock_apollo_helper'; import getPipelineDetails from 'shared_queries/pipelines/get_pipeline_details.query.graphql'; +import { IID_FAILURE } from '~/pipelines/components/graph/constants'; import PipelineGraph from '~/pipelines/components/graph/graph_component.vue'; import PipelineGraphWrapper from '~/pipelines/components/graph/graph_component_wrapper.vue'; import GraphViewSelector from '~/pipelines/components/graph/graph_view_selector.vue'; @@ -126,6 +127,31 @@ describe('Pipeline graph wrapper', () => { }); }); + describe('when there is no pipeline iid available', () => { + beforeEach(async () => { + createComponentWithApollo({ + provide: { + pipelineIid: '', + }, + }); + jest.runOnlyPendingTimers(); + await wrapper.vm.$nextTick(); + }); + + it('does not display the loading icon', () => { + expect(getLoadingIcon().exists()).toBe(false); + }); + + it('displays the no iid alert', () => { + expect(getAlert().exists()).toBe(true); + expect(getAlert().text()).toBe(wrapper.vm.$options.errorTexts[IID_FAILURE]); + }); + + it('does not display the graph', () => { + expect(getGraph().exists()).toBe(false); + }); + }); + describe('when refresh action is emitted', () => { beforeEach(async () => { createComponentWithApollo(); diff --git a/spec/lib/gitlab/usage_data_spec.rb b/spec/lib/gitlab/usage_data_spec.rb index 24aeb1e495a..e835cec7728 100644 --- a/spec/lib/gitlab/usage_data_spec.rb +++ b/spec/lib/gitlab/usage_data_spec.rb @@ -167,7 +167,10 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do create(:key, user: user) create(:project, creator: user, disable_overriding_approvers_per_merge_request: true) create(:project, creator: user, disable_overriding_approvers_per_merge_request: false) - create(:remote_mirror, project: project) + create(:remote_mirror, project: project, enabled: true) + another_user = create(:user) + another_project = create(:project, :repository, creator: another_user) + create(:remote_mirror, project: another_project, enabled: false) create(:snippet, author: user) end @@ -176,7 +179,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do keys: 2, merge_requests: 2, projects_with_disable_overriding_approvers_per_merge_request: 2, - projects_without_disable_overriding_approvers_per_merge_request: 4, + projects_without_disable_overriding_approvers_per_merge_request: 6, remote_mirrors: 2, snippets: 2 ) @@ -185,7 +188,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do keys: 1, merge_requests: 1, projects_with_disable_overriding_approvers_per_merge_request: 1, - projects_without_disable_overriding_approvers_per_merge_request: 2, + projects_without_disable_overriding_approvers_per_merge_request: 3, remote_mirrors: 1, snippets: 1 ) diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index e4295d2ab40..6c95fb6c52e 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -1351,6 +1351,34 @@ RSpec.describe Project, factory_default: :keep do end end + describe '.with_remote_mirrors' do + let_it_be(:project) { create(:project, :repository) } + + subject { described_class.with_remote_mirrors } + + context 'when some remote mirrors are enabled for the project' do + let!(:remote_mirror) { create(:remote_mirror, project: project, enabled: true) } + + it "returns a project" do + is_expected.to eq([project]) + end + end + + context 'when some remote mirrors exists but disabled for the project' do + let!(:remote_mirror) { create(:remote_mirror, project: project, enabled: false) } + + it "returns a project" do + is_expected.to be_empty + end + end + + context 'when no remote mirrors exist for the project' do + it "returns an empty list" do + is_expected.to be_empty + end + end + end + describe '.with_active_jira_services' do it 'returns the correct project' do active_jira_service = create(:jira_service) |