Read about our upcoming Code of Conduct on this issue

Commit 9944e385 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 11c305dd4c5d
......@@ -25,7 +25,7 @@ export default {
return Promise.resolve(file.content);
if (file.raw) {
if (file.raw || !file.rawPath) {
return Promise.resolve(file.raw);
......@@ -13,8 +13,6 @@
class LicenseTemplateFinder
include Gitlab::Utils::StrongMemoize
prepend_if_ee('::EE::LicenseTemplateFinder') # rubocop: disable Cop/InjectEnterpriseEditionModule
attr_reader :project, :params
def initialize(project, params = {})
......@@ -52,3 +50,5 @@ def popular_only?
params.fetch(:popular, nil)
......@@ -27,8 +27,6 @@
class ProjectsFinder < UnionFinder
include CustomAttributesFilter
prepend_if_ee('::EE::ProjectsFinder') # rubocop: disable Cop/InjectEnterpriseEditionModule
attr_accessor :params
attr_reader :current_user, :project_ids_relation
......@@ -225,3 +223,5 @@ def finder_params
{ min_access_level: params[:min_access_level] }
......@@ -3,8 +3,6 @@
class TemplateFinder
include Gitlab::Utils::StrongMemoize
prepend_if_ee('::EE::TemplateFinder') # rubocop: disable Cop/InjectEnterpriseEditionModule
dockerfiles: ::Gitlab::Template::DockerfileTemplate,
gitignores: ::Gitlab::Template::GitignoreTemplate,
......@@ -42,3 +40,5 @@ def execute
......@@ -2,6 +2,7 @@
class ContainerExpirationPolicy < ApplicationRecord
include Schedulable
include UsageStatistics
belongs_to :project, inverse_of: :container_expiration_policy
......@@ -787,7 +787,7 @@ def context_commits_enabled?
def jira_issues_import_feature_flag_enabled?
Feature.enabled?(:jira_issue_import, self)
Feature.enabled?(:jira_issue_import, self, default_enabled: true)
def team
......@@ -89,3 +89,5 @@ def link_to_cluster(html_options: {})
title: Make "Value Stream" the default page that appears when clicking the project-level "Analytics" sidebar item.
merge_request: 27279
author: Gilang Gumilar
type: added
title: Fix incorrect content returned on empty dotfile
merge_request: 28144
type: fixed
title: Add jira issues import feature
type: added
title: Move prepend to last line in finders files
merge_request: 29274
author: Rajendra Kadam
type: fixed
# frozen_string_literal: true
# See
# for more information on how to write migrations for GitLab.
class AddJsonbToGeoNodeStatusTable < ActiveRecord::Migration[6.0]
DOWNTIME = false
def change
change_table :geo_node_statuses do |t|
t.jsonb :status, null: false, default: {}
......@@ -2650,7 +2650,8 @@ CREATE TABLE public.geo_node_statuses (
design_repositories_count integer,
design_repositories_synced_count integer,
design_repositories_failed_count integer,
design_repositories_registry_count integer
design_repositories_registry_count integer,
status jsonb DEFAULT '{}'::jsonb NOT NULL
CREATE SEQUENCE public.geo_node_statuses_id_seq
......@@ -13076,6 +13077,7 @@ COPY "schema_migrations" (version) FROM STDIN;
......@@ -8353,15 +8353,20 @@ scalar Time
type Timelog {
The date when the time tracked was spent at
Timestamp of when the time tracked was spent at. Deprecated in 12.10: Use `spentAt`
date: Time!
date: Time! @deprecated(reason: "Use `spentAt`. Deprecated in 12.10")
The issue that logged time was added to
issue: Issue
Timestamp of when the time tracked was spent at
spentAt: Time
The time spent displayed in seconds
......@@ -25299,7 +25299,7 @@
"fields": [
"name": "date",
"description": "The date when the time tracked was spent at",
"description": "Timestamp of when the time tracked was spent at. Deprecated in 12.10: Use `spentAt`",
"args": [
......@@ -25312,8 +25312,8 @@
"ofType": null
"isDeprecated": false,
"deprecationReason": null
"isDeprecated": true,
"deprecationReason": "Use `spentAt`. Deprecated in 12.10"
"name": "issue",
......@@ -25329,6 +25329,20 @@
"isDeprecated": false,
"deprecationReason": null
"name": "spentAt",
"description": "Timestamp of when the time tracked was spent at",
"args": [
"type": {
"kind": "SCALAR",
"name": "Time",
"ofType": null
"isDeprecated": false,
"deprecationReason": null
"name": "timeSpent",
"description": "The time spent displayed in seconds",
......@@ -1306,8 +1306,9 @@ Completion status of tasks
| Name | Type | Description |
| --- | ---- | ---------- |
| `date` | Time! | The date when the time tracked was spent at |
| `date` **{warning-solid}** | Time! | **Deprecated:** Use `spentAt`. Deprecated in 12.10 |
| `issue` | Issue | The issue that logged time was added to |
| `spentAt` | Time | Timestamp of when the time tracked was spent at |
| `timeSpent` | Int! | The time spent displayed in seconds |
| `user` | User! | The user that logged the time |
# GitLab Status Page
> [Introduced]( in GitLab 12.10.
GitLab Status Page allows you to create and deploy a static website to communicate efficiently to users during an incident.
## How to set up
NOTE: **Note:**
Only AWS S3 is supported as a deploy target.
graph TB
subgraph GitLab Instance
issues(issue updates) -- trigger --> middleware(Background job: JSON generation)
subgraph Cloud Provider
middleware --saves data --> c1(Cloud Bucket stores JSON file)
subgraph Status Page
d(Static Site on CDN) -- fetches data --> c1
Setting up a Status Page is pretty painless but there are a few things you need to do.
### Cloud account set up
To use GitLab Status Page you first need to set up your account details for your cloud provider in the operations settings page. Today, only AWS is supported.
1. Within your AWS account, create an AWS access key.
1. Add the following permissions policies:
- [Create bucket](
- [Update bucket contents]( (Remember replace `S3_BUCKET_NAME` with your bucket name).
### Status Page project
To deploy the status page to AWS S3 you need to add the Status Page project & configure the necessary CI variables.
1. Fork the [Status Page]( project. This can also be done via [Repository Mirroring]( which will ensure you get the up-to-date Status Page features.
1. Add the following variables in **Settings > CI/CD > Variables**. (To get these variables from Amazon, use your Amazon Console):
- `S3_BUCKET_NAME` - name of the Amazon S3 bucket
- `AWS_DEFAULT_REGION` - the AWS region
- `AWS_ACCESS_KEY_ID` - the AWS access key ID
- `AWS_SECRET_ACCESS_KEY` - the AWS secret
1. Run the pipeline to deploy the status page to S3.
### Syncing incidents to the Status Page
Once the CI/CD variables are set, you'll need to set up the Project you want to use for Incident issues:
1. Navigate to **Settings > Operations > Status Page**.
1. Fill in your cloud provider's credentials and make sure the **Active** checkbox is checked.
1. Click **Save changes**.
## Status Page UI
The Status page landing page shows you an overview of the recent incidents. Clicking on an incident will take you to the incident's detail page.
![Status Page landing page](../img/status_page_incidents_v12_10.png)
### Incident detail page
The incident detail page shows detailed information about a particular incident. For example:
- Status on the incident, including when the incident was last updated.
- The incident title.
- The description of the incident.
- A chronological ordered list of updates to the incident.
![Status Page detail](../img/status_page_detail_v12_10.png)
## How it works
### Publishing Incidents
To publish an Incident, you first need to create an issue in the Project you enabled the Status Page settings in.
Once this issue is created, a background worker will publish the issue onto the status page using the credentials you provided during setup.
### Publishing updates
To publish an update to the Incident, update the incident issue's description.
### Adding comments
To add comments to the Status Page Incident, create a comment on the incident issue.
When you're ready to publish the comment, add a microphone [award emoji](../../../user/ reaction (`:microphone` 🎤) to the comment. This marks the comment as one which should be deployed to the Status Page.
CAUTION: **Caution:**
Anyone with access to view the Issue can add an Emoji Award to a comment, so you may want to keep your Issues limited to team members only.
### Changing the Incident status
To change the incident status from `open` to `closed`, close the incident issue within GitLab. This will then be updated shortly on the Status page website.
......@@ -163,8 +163,31 @@ def features_usage_data_ce
signup_enabled: alt_usage_data { Gitlab::CurrentSettings.allow_signup? },
web_ide_clientside_preview_enabled: alt_usage_data { Gitlab::CurrentSettings.web_ide_clientside_preview_enabled? },
ingress_modsecurity_enabled: Feature.enabled?(:ingress_modsecurity)
# rubocop: disable CodeReuse/ActiveRecord
def features_usage_data_container_expiration_policies
results = {}
start = ::Project.minimum(:id)
finish = ::Project.maximum(:id)
results[:projects_with_expiration_policy_disabled] = distinct_count(::ContainerExpirationPolicy.where(enabled: false), :project_id, start: start, finish: finish)
base =
results[:projects_with_expiration_policy_enabled] = distinct_count(base, :project_id, start: start, finish: finish)
%i[keep_n cadence older_than].each do |option|
::ContainerExpirationPolicy.public_send("#{option}_options").keys.each do |value| # rubocop: disable GitlabSecurity/PublicSend
results["projects_with_expiration_policy_enabled_with_#{option}_set_to_#{value}".to_sym] = distinct_count(base.where(option => value), :project_id, start: start, finish: finish)
results[:projects_with_expiration_policy_enabled_with_keep_n_unset] = distinct_count(base.where(keep_n: nil), :project_id, start: start, finish: finish)
results[:projects_with_expiration_policy_enabled_with_older_than_unset] = distinct_count(base.where(older_than: nil), :project_id, start: start, finish: finish)
# rubocop: enable CodeReuse/ActiveRecord
# @return [Hash<Symbol, Integer>]
def usage_counters
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment