Skip to content
Snippets Groups Projects
Commit 045c0f95 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 669c24d9
No related branches found
No related tags found
No related merge requests found
Showing
with 87 additions and 61 deletions
# Make sure to update all the similar conditions in other CI config files if you modify these conditions
.if-canonical-gitlab-schedule: &if-canonical-gitlab-schedule
if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE =~ /^gitlab-org($|\/)/ && $CI_PIPELINE_SOURCE == "schedule"'
.notify:
image: ruby:2.6-alpine
stage: notification
Loading
Loading
@@ -11,13 +15,13 @@
variables:
COMMIT_NOTES_URL: "https://${CI_SERVER_HOST}/${CI_PROJECT_PATH}/commit/${CI_COMMIT_SHA}#notes-list"
 
schedule:package-and-qa:notify-failure:
extends:
- .only:variables_refs-canonical-dot-com-schedules
- .notify
package-and-qa:notify-failure:
extends: .notify
rules:
- <<: *if-canonical-gitlab-schedule
when: manual # TODO: remove notify job if not necessary
script:
- 'export NOTIFICATION_MESSAGE=":skull_and_crossbones: Scheduled QA against master failed! :skull_and_crossbones: See ${CI_PIPELINE_URL}. For downstream pipelines, see ${COMMIT_NOTES_URL}"'
- 'notify_on_job_failure schedule:package-and-qa qa-master "${NOTIFICATION_MESSAGE}" ci_failing'
needs: ["schedule:package-and-qa"]
- 'notify_on_job_failure package-and-qa qa-master "${NOTIFICATION_MESSAGE}" ci_failing'
needs: ["package-and-qa"]
allow_failure: true
when: manual # TODO: remove notify job if not necessary
# Make sure to update all the similar conditions in other CI config files if you modify these conditions
.if-canonical-gitlab-and-merge-request: &if-canonical-gitlab-and-merge-request
.if-canonical-gitlab-schedule: &if-canonical-gitlab-schedule
if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE =~ /^gitlab-org($|\/)/ && $CI_PIPELINE_SOURCE == "schedule"'
# Make sure to update all the similar conditions in other CI config files if you modify these conditions
.if-canonical-gitlab-merge-request: &if-canonical-gitlab-merge-request
if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE =~ /^gitlab-org($|\/)/ && $CI_MERGE_REQUEST_IID'
 
# Make sure to update all the similar patterns in other CI config files if you modify these patterns
Loading
Loading
@@ -68,19 +72,13 @@ qa:selectors-foss:
package-and-qa:
extends: .package-and-qa-base
rules:
- <<: *if-canonical-gitlab-and-merge-request
- <<: *if-canonical-gitlab-merge-request
changes: *qa-patterns
when: on_success
- <<: *if-canonical-gitlab-and-merge-request
- <<: *if-canonical-gitlab-merge-request
changes: *code-patterns
when: manual
needs: ["build-qa-image", "gitlab:assets:compile pull-cache"]
allow_failure: true
schedule:package-and-qa:
extends:
- .package-and-qa-base
- .default-only
- .only:variables_refs-canonical-dot-com-schedules
- <<: *if-canonical-gitlab-schedule
when: on_success
needs: ["build-qa-image", "gitlab:assets:compile pull-cache"]
allow_failure: true
# Make sure to update all the similar conditions in other CI config files if you modify these conditions
.if-canonical-gitlab: &if-canonical-gitlab
if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE =~ /^gitlab-org($|\/)/'
.if-canonical-gitlab-schedule: &if-canonical-gitlab-schedule
if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE =~ /^gitlab-org($|\/)/ && $CI_PIPELINE_SOURCE == "schedule"'
 
# Make sure to update all the similar conditions in other CI config files if you modify these conditions
.if-canonical-gitlab-and-merge-request: &if-canonical-gitlab-and-merge-request
.if-canonical-gitlab-merge-request: &if-canonical-gitlab-merge-request
if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE =~ /^gitlab-org($|\/)/ && $CI_MERGE_REQUEST_IID'
 
# Make sure to update all the similar patterns in other CI config files if you modify these patterns
Loading
Loading
@@ -44,9 +44,11 @@ build-qa-image:
extends: .review-docker
stage: prepare
rules:
- <<: *if-canonical-gitlab
- <<: *if-canonical-gitlab-merge-request
changes: *code-qa-patterns
when: on_success
- <<: *if-canonical-gitlab-schedule
when: on_success
script:
- '[[ ! -d "ee/" ]] || export GITLAB_EDITION="ee"'
- export QA_MASTER_IMAGE="${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab/gitlab-${GITLAB_EDITION}-qa:master"
Loading
Loading
@@ -157,7 +159,7 @@ schedule:review-build-cng:
review-deploy:
extends: .review-deploy-base
rules:
- <<: *if-canonical-gitlab-and-merge-request
- <<: *if-canonical-gitlab-merge-request
changes: *code-qa-patterns
when: on_success
 
Loading
Loading
@@ -184,7 +186,7 @@ review-stop-failed-deployment:
extends: .base-review-stop
stage: prepare
rules:
- <<: *if-canonical-gitlab-and-merge-request
- <<: *if-canonical-gitlab-merge-request
changes: *code-qa-patterns
when: on_success
script:
Loading
Loading
@@ -194,7 +196,7 @@ review-stop:
extends: .base-review-stop
stage: review
rules:
- <<: *if-canonical-gitlab-and-merge-request
- <<: *if-canonical-gitlab-merge-request
changes: *code-qa-patterns
when: manual
allow_failure: true
Loading
Loading
@@ -235,7 +237,7 @@ review-stop:
review-qa-smoke:
extends: .review-qa-base
rules:
- <<: *if-canonical-gitlab-and-merge-request
- <<: *if-canonical-gitlab-merge-request
changes: *code-qa-patterns
when: on_success
script:
Loading
Loading
@@ -244,7 +246,7 @@ review-qa-smoke:
review-qa-all:
extends: .review-qa-base
rules:
- <<: *if-canonical-gitlab-and-merge-request
- <<: *if-canonical-gitlab-merge-request
changes: *code-qa-patterns
when: manual
parallel: 5
Loading
Loading
@@ -276,7 +278,7 @@ review-qa-all:
review-performance:
extends: .review-performance-base
rules:
- <<: *if-canonical-gitlab-and-merge-request
- <<: *if-canonical-gitlab-merge-request
changes: *code-qa-patterns
when: on_success
needs: ["review-deploy"]
Loading
Loading
Loading
Loading
@@ -24,7 +24,7 @@ const EMPTY_STAGE_TEXTS = {
'The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.',
),
production: __(
'The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.',
'The total stage shows the time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.',
),
};
 
Loading
Loading
Loading
Loading
@@ -55,9 +55,18 @@ jQuery.ajaxSetup({
},
});
 
function disableJQueryAnimations() {
$.fx.off = true;
}
// Disable jQuery animations
if (gon && gon.disable_animations) {
disableJQueryAnimations();
}
// inject test utilities if necessary
if (process.env.NODE_ENV !== 'production' && gon && gon.test_env) {
$.fx.off = true;
disableJQueryAnimations();
import(/* webpackMode: "eager" */ './test_utils/');
}
 
Loading
Loading
Loading
Loading
@@ -46,6 +46,8 @@ class Projects::IssuesController < Projects::ApplicationController
push_frontend_feature_flag(:vue_issuable_sidebar, project.group)
end
 
around_action :allow_gitaly_ref_name_caching, only: [:discussions]
respond_to :html
 
alias_method :designs, :show
Loading
Loading
Loading
Loading
@@ -46,7 +46,7 @@
 
= stylesheet_link_tag "application", media: "all"
= stylesheet_link_tag "print", media: "print"
= stylesheet_link_tag "test", media: "all" if Rails.env.test?
= stylesheet_link_tag "disable_animations", media: "all" if Rails.env.test? || Gitlab.config.gitlab['disable_animations']
= stylesheet_link_tag 'performance_bar' if performance_bar_enabled?
 
= stylesheet_link_tag "highlight/themes/#{user_color_scheme}", media: "all"
Loading
Loading
Loading
Loading
@@ -50,7 +50,7 @@
%i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: _("The collection of events added to the data gathered for that stage."), "aria-hidden" => "true" }
%li.total-time-header.pr-5.text-right
%span.stage-name.font-weight-bold
{{ __('Total Time') }}
{{ __('Time') }}
%i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: _("The time taken by each data entry gathered by that stage."), "aria-hidden" => "true" }
.stage-panel-body
%nav.stage-nav
Loading
Loading
---
title: Fix for 500 when error stack trace is empty
merge_request: 119205
author:
type: fixed
---
title: Reduce Gitaly calls needed for issue discussions
merge_request:
author:
type: performance
---
title: Add a config for disabling CSS and jQuery animations
merge_request: 22217
author:
type: added
Loading
Loading
@@ -166,7 +166,7 @@ module Gitlab
config.assets.precompile << "page_bundles/xterm.css"
config.assets.precompile << "performance_bar.css"
config.assets.precompile << "lib/ace.js"
config.assets.precompile << "test.css"
config.assets.precompile << "disable_animations.css"
config.assets.precompile << "snippets.css"
config.assets.precompile << "locale/**/app.js"
config.assets.precompile << "emoji_sprites.css"
Loading
Loading
Loading
Loading
@@ -150,6 +150,9 @@ production: &base
## Impersonation settings
impersonation_enabled: true
 
## Disable jQuery and CSS animations
# disable_animations: true
## Reply by email
# Allow users to comment on issues and merge requests by replying to notification emails.
# For documentation on how to set this up, see http://doc.gitlab.com/ce/administration/reply_by_email.html
Loading
Loading
@@ -807,7 +810,7 @@ production: &base
# CAUTION!
# This allows users to login with the specified providers without two factor. Define the allowed providers
# using an array, e.g. ["twitter", 'google_oauth2'], or as true/false to allow all providers or none.
# This option should only be configured for providers which already have two factor.
# This option should only be configured for providers which already have two factor.
# This configration dose not apply to SAML.
# (default: false)
allow_bypass_two_factor: ["twitter", 'google_oauth2']
Loading
Loading
Loading
Loading
@@ -77,8 +77,8 @@ end
 
Some start/end event pairs are not "compatible" with each other. For example:
 
- "Issue created" to "Merge Request created": The event classes are defined on different domain models, the `object_type` method is different.
- "Issue closed" to "Issue created": Issue must be created first before it can be closed.
- "Issue created" to "Merge Request created": The event classes are defined on different domain models, the `object_type` method is different.
- "Issue closed" to "Issue created": Issue must be created first before it can be closed.
- "Issue closed" to "Issue closed": Duration is always 0.
 
The `StageEvents` module describes the allowed `start_event` and `end_event` pairings (`PAIRING_RULES` constant). If a new event is added, it needs to be registered in this module.
Loading
Loading
Loading
Loading
@@ -156,7 +156,7 @@ This is similar to the `.only:variables-canonical-dot-com` + `.except:refs-maste
CI definitions:
 
```yaml
.if-canonical-gitlab-and-merge-request: &if-canonical-gitlab-and-merge-request
.if-canonical-gitlab-merge-request: &if-canonical-gitlab-merge-request
if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE =~ /^gitlab-org($|\/)/ && $CI_MERGE_REQUEST_IID'
```
 
Loading
Loading
@@ -210,9 +210,7 @@ graph RL;
M[coverage];
N[pages];
O[static-analysis];
P["schedule:package-and-qa<br/>(master schedule only)"];
Q[package-and-qa];
R[package-and-qa-manual];
S["RSpec<br/>(e.g. rspec unit pg9)"]
T[retrieve-tests-metadata];
 
Loading
Loading
@@ -259,10 +257,6 @@ subgraph "`review` stage"
subgraph "`qa` stage"
Q --> |needs| C;
Q --> |needs| F;
R --> |needs| C;
R --> |needs| F;
P --> |needs| C;
P --> |needs| F;
review-qa-smoke -.-> |needs and depends on| G;
review-qa-all -.-> |needs and depends on| G;
review-performance -.-> |needs and depends on| G;
Loading
Loading
@@ -271,8 +265,7 @@ subgraph "`qa` stage"
end
 
subgraph "`notification` stage"
NOTIFICATION1["schedule:package-and-qa:notify-success<br>(on_success)"] -.-> |needs| P;
NOTIFICATION2["schedule:package-and-qa:notify-failure<br>(on_failure)"] -.-> |needs| P;
NOTIFICATION2["package-and-qa:notify-failure<br>(manual)"] -.-> |needs| Q;
end
 
subgraph "`post-test` stage"
Loading
Loading
Loading
Loading
@@ -27,11 +27,11 @@ You can find these nightly pipelines at `https://gitlab.com/gitlab-org/quality/s
 
### Testing code in merge requests
 
#### Using the `package-and-qa-manual` job
#### Using the `package-and-qa` job
 
It is possible to run end-to-end tests for a merge request, eventually being run in
a pipeline in the [`gitlab-qa`](https://gitlab.com/gitlab-org/gitlab-qa/) project,
by triggering the `package-and-qa-manual` manual action in the `test` stage (not
by triggering the `package-and-qa` manual action in the `test` stage (not
available for forks).
 
**This runs end-to-end tests against a custom Omnibus package built from your
Loading
Loading
@@ -53,7 +53,7 @@ graph LR
B2[`Trigger-qa` stage<br>`Trigger:qa-test` job] -.->|2. Triggers a gitlab-qa pipeline and wait for it to be done| A3
 
subgraph "gitlab-foss/gitlab pipeline"
A1[`test` stage<br>`package-and-qa-manual` job]
A1[`test` stage<br>`package-and-qa` job]
end
 
subgraph "omnibus-gitlab pipeline"
Loading
Loading
@@ -61,7 +61,7 @@ subgraph "omnibus-gitlab pipeline"
end
 
subgraph "gitlab-qa pipeline"
A3>QA jobs run] -.->|3. Reports back the pipeline result to the `package-and-qa-manual` job<br>and post the result on the original commit tested| A1
A3>QA jobs run] -.->|3. Reports back the pipeline result to the `package-and-qa` job<br>and post the result on the original commit tested| A1
end
```
 
Loading
Loading
Loading
Loading
@@ -40,7 +40,7 @@ the time it would take to build packages and test everything.
That is why when someone changes `t.text_field :login` to
`t.text_field :username` in the _new session_ view we won't know about this
change until our GitLab QA nightly pipeline fails, or until someone triggers
`package-and-qa-manual` action in their merge request.
`package-and-qa` action in their merge request.
 
Obviously such a change would break all tests. We call this problem a _fragile
tests problem_.
Loading
Loading
@@ -171,8 +171,8 @@ and we should prefer the `data-qa-selector` method of definition.
 
> Introduced in GitLab 12.5
 
A common occurrence in automated testing is selecting a single "one-of-many" element.
In a list of several items, how do you differentiate what you are selecting on?
A common occurrence in automated testing is selecting a single "one-of-many" element.
In a list of several items, how do you differentiate what you are selecting on?
The most common workaround for this is via text matching. Instead, a better practice is
by matching on that specific element by a unique identifier, rather than by text.
 
Loading
Loading
Loading
Loading
@@ -44,8 +44,8 @@ There are seven stages that are tracked as part of the Cycle Analytics calculati
- Time spent on code review
- **Staging** (Continuous Deployment)
- Time between merging and deploying to production
- **Production** (Total)
- Total lifecycle time; i.e. the velocity of the project or team
- **Total** (Total)
- Total lifecycle time. That is, the velocity of the project or team. [Previously known](https://gitlab.com/gitlab-org/gitlab/issues/38317) as **Production**.
 
## Date ranges
 
Loading
Loading
@@ -60,12 +60,12 @@ GitLab provides the ability to filter analytics based on a date range. To filter
## How the data is measured
 
Cycle Analytics records cycle time and data based on the project issues with the
exception of the staging and production stages, where only data deployed to
exception of the staging and total stages, where only data deployed to
production are measured.
 
Specifically, if your CI is not set up and you have not defined a `production`
or `production/*` [environment](../../ci/yaml/README.md#environment), then you will not have any
data for those stages.
data for this stage.
 
Each stage of Cycle Analytics is further described in the table below.
 
Loading
Loading
@@ -77,7 +77,7 @@ Each stage of Cycle Analytics is further described in the table below.
| Test | Measures the median time to run the entire pipeline for that project. It's related to the time GitLab CI takes to run every job for the commits pushed to that merge request defined in the previous stage. It is basically the start->finish time for all pipelines. |
| Review | Measures the median time taken to review the merge request that has closing issue pattern, between its creation and until it's merged. |
| Staging | Measures the median time between merging the merge request with closing issue pattern until the very first deployment to production. It's tracked by the environment set to `production` or matching `production/*` (case-sensitive, `Production` won't work) in your GitLab CI configuration. If there isn't a production environment, this is not tracked. |
| Production| The sum of all time (medians) taken to run the entire process, from issue creation to deploying the code to production. |
| Total | The sum of all time (medians) taken to run the entire process, from issue creation to deploying the code to production. [Previously known](https://gitlab.com/gitlab-org/gitlab/issues/38317) as **Production**. |
 
How this works, behind the scenes:
 
Loading
Loading
@@ -124,7 +124,7 @@ environments is configured.
1. Now that the merge request is merged, a deployment to the `production`
environment starts and finishes at 19:30 (stop of **Staging** stage).
1. The cycle completes and the sum of the median times of the previous stages
is recorded to the **Production** stage. That is the time between creating an
is recorded to the **Total** stage. That is the time between creating an
issue and deploying its relevant merge request to production.
 
From the above example you can conclude the time it took each stage to complete
Loading
Loading
@@ -136,10 +136,10 @@ as long as their total time:
- **Test**: 5min
- **Review**: 5h (19:00 - 14:00)
- **Staging**: 30min (19:30 - 19:00)
- **Production**: Since this stage measures the sum of median time off all
- **Total**: Since this stage measures the sum of median time of all
previous stages, we cannot calculate it if we don't know the status of the
stages before. In case this is the very first cycle that is run in the project,
then the **Production** time is 10h 30min (19:30 - 09:00)
then the **Total** time is 10h 30min (19:30 - 09:00)
 
A few notes:
 
Loading
Loading
Loading
Loading
@@ -18,7 +18,7 @@ module Gitlab
end
 
def title
s_('CycleAnalyticsStage|Production')
s_('CycleAnalyticsStage|Total')
end
 
def legend
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment