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

Add latest changes from gitlab-org/gitlab@master

parent 8b1228b0
No related branches found
No related tags found
No related merge requests found
Showing
with 187 additions and 23 deletions
# frozen_string_literal: true
class SelfMonitoringProjectDeleteWorker
include ApplicationWorker
include ExclusiveLeaseGuard
include SelfMonitoringProjectWorker
def perform
try_obtain_lease do
Gitlab::DatabaseImporters::SelfMonitoring::Project::DeleteService.new.execute
end
end
end
---
title: Migrate the database to activate projects prometheus service integration for projects with prometheus installed on shared k8s cluster.
merge_request: 19956
author:
type: fixed
---
title: "Show tag link whenever it's a tag in chat message integration for push events and pipeline events"
merge_request: 18126
author: Mats Estensen
type: fixed
---
title: Add runner information in build web hook event
merge_request: 20709
author: Gaetan Semet
type: added
---
title: |
Add allow failure in pipeline webhook event
merge_request: 20978
author: Gaetan Semet
type: added
---
title: Add GitLab commit to error detail endpoint
merge_request: 22174
author:
type: added
---
title: Add support to export and import award emojis for issues, issue notes, MR, MR notes and snippet notes
merge_request: 22493
author:
type: fixed
---
title: Remove unused index on project_mirror_data
merge_request: 22647
author:
type: performance
Loading
Loading
@@ -100,6 +100,7 @@
- [create_evidence, 2]
- [group_export, 1]
- [self_monitoring_project_create, 2]
- [self_monitoring_project_delete, 2]
 
# EE-specific queues
- [analytics, 1]
Loading
Loading
# frozen_string_literal: true
class AddTimestampSoftwarelicensespolicy < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
add_timestamps_with_timezone(:software_license_policies, null: true)
end
def down
remove_timestamps(:software_license_policies)
end
end
# frozen_string_literal: true
class RemoveIndexProjectMirrorDataOnJid < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
remove_concurrent_index :project_mirror_data, :jid
end
def down
add_concurrent_index :project_mirror_data, :jid
end
end
# frozen_string_literal: true
class PatchPrometheusServicesForSharedClusterApplications < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
MIGRATION = 'ActivatePrometheusServicesForSharedClusterApplications'.freeze
BATCH_SIZE = 500
DELAY = 2.minutes
disable_ddl_transaction!
module Migratable
module Applications
class Prometheus < ActiveRecord::Base
self.table_name = 'clusters_applications_prometheus'
enum status: {
errored: -1,
installed: 3,
updated: 5
}
end
end
class Project < ActiveRecord::Base
self.table_name = 'projects'
include ::EachBatch
scope :with_application_on_group_clusters, -> {
joins("INNER JOIN namespaces ON namespaces.id = projects.namespace_id")
.joins("INNER JOIN cluster_groups ON cluster_groups.group_id = namespaces.id")
.joins("INNER JOIN clusters ON clusters.id = cluster_groups.cluster_id AND clusters.cluster_type = #{Cluster.cluster_types['group_type']}")
.joins("INNER JOIN clusters_applications_prometheus ON clusters_applications_prometheus.cluster_id = clusters.id
AND clusters_applications_prometheus.status IN (#{Applications::Prometheus.statuses[:installed]}, #{Applications::Prometheus.statuses[:updated]})")
}
scope :without_active_prometheus_services, -> {
joins("LEFT JOIN services ON services.project_id = projects.id AND services.type = 'PrometheusService'")
.where("services.id IS NULL OR (services.active = FALSE AND services.properties = '{}')")
}
end
class Cluster < ActiveRecord::Base
self.table_name = 'clusters'
enum cluster_type: {
instance_type: 1,
group_type: 2
}
def self.has_prometheus_application?
joins("INNER JOIN clusters_applications_prometheus ON clusters_applications_prometheus.cluster_id = clusters.id
AND clusters_applications_prometheus.status IN (#{Applications::Prometheus.statuses[:installed]}, #{Applications::Prometheus.statuses[:updated]})").exists?
end
end
end
def up
projects_without_active_prometheus_service.group('projects.id').each_batch(of: BATCH_SIZE) do |batch, index|
bg_migrations_batch = batch.select('projects.id').map { |project| [MIGRATION, project.id] }
delay = index * DELAY
BackgroundMigrationWorker.bulk_perform_in(delay.seconds, bg_migrations_batch)
end
end
def down
# no-op
end
private
def projects_without_active_prometheus_service
scope = Migratable::Project.without_active_prometheus_services
return scope if migrate_instance_cluster?
scope.with_application_on_group_clusters
end
def migrate_instance_cluster?
if instance_variable_defined?('@migrate_instance_cluster')
@migrate_instance_cluster
else
@migrate_instance_cluster = Migratable::Cluster.instance_type.has_prometheus_application?
end
end
end
Loading
Loading
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
 
ActiveRecord::Schema.define(version: 2020_01_08_155731) do
ActiveRecord::Schema.define(version: 2020_01_08_233040) do
 
# These are extensions that must be enabled in order to support this database
enable_extension "pg_trgm"
Loading
Loading
@@ -3199,7 +3199,6 @@ ActiveRecord::Schema.define(version: 2020_01_08_155731) do
t.text "last_error"
t.datetime_with_timezone "last_update_at"
t.datetime_with_timezone "last_successful_update_at"
t.index ["jid"], name: "index_project_mirror_data_on_jid"
t.index ["last_successful_update_at"], name: "index_project_mirror_data_on_last_successful_update_at"
t.index ["last_update_at", "retry_count"], name: "index_project_mirror_data_on_last_update_at_and_retry_count"
t.index ["next_execution_timestamp", "retry_count"], name: "index_mirror_data_on_next_execution_and_retry_count"
Loading
Loading
@@ -3824,6 +3823,8 @@ ActiveRecord::Schema.define(version: 2020_01_08_155731) do
t.integer "project_id", null: false
t.integer "software_license_id", null: false
t.integer "classification", default: 0, null: false
t.datetime_with_timezone "created_at"
t.datetime_with_timezone "updated_at"
t.index ["project_id", "software_license_id"], name: "index_software_license_policies_unique_per_project", unique: true
t.index ["software_license_id"], name: "index_software_license_policies_on_software_license_id"
end
Loading
Loading
Loading
Loading
@@ -364,6 +364,7 @@ The following documentation relates to the DevOps **Secure** stage:
| [Dependency Scanning](user/application_security/dependency_scanning/index.md) **(ULTIMATE)** | Analyze your dependencies for known vulnerabilities. |
| [Dynamic Application Security Testing (DAST)](user/application_security/dast/index.md) **(ULTIMATE)** | Analyze running web applications for known vulnerabilities. |
| [Group Security Dashboard](user/application_security/security_dashboard/index.md#group-security-dashboard) **(ULTIMATE)** | View vulnerabilities in all the projects in a group and its subgroups. |
| [Instance Security Dashboard](user/application_security/security_dashboard/index.md#instance-security-dashboard) **(ULTIMATE)** | View vulnerabilities in all the projects you're interested in. |
| [License Compliance](user/application_security/license_compliance/index.md) **(ULTIMATE)** | Search your project's dependencies for their licenses. |
| [Pipeline Security Dashboard](user/application_security/security_dashboard/index.md#pipeline-security-dashboard) **(ULTIMATE)** | View the security reports for your project's pipelines. |
| [Project Security Dashboard](user/application_security/security_dashboard/index.md#project-security-dashboard) **(ULTIMATE)** | View the latest security reports for your project. |
Loading
Loading
Loading
Loading
@@ -80,6 +80,9 @@ From there, you can see the following actions:
- Project was archived
- Project was unarchived
- Added/removed/updated protected branches
- Release was added to a project
- Release was updated
- Release milestone associations changed
 
### Instance events **(PREMIUM ONLY)**
 
Loading
Loading
Loading
Loading
@@ -154,7 +154,7 @@ Some basic Ruby runtime metrics are available:
| `ruby_sampler_duration_seconds` | Counter | 11.1 | Time spent collecting stats |
| `ruby_process_cpu_seconds_total` | Gauge | 12.0 | Total amount of CPU time per process |
| `ruby_process_max_fds` | Gauge | 12.0 | Maximum number of open file descriptors per process |
| `ruby_process_resident_memory_bytes` | Gauge | 12.0 | Memory usage by process, measured in bytes |
| `ruby_process_resident_memory_bytes` | Gauge | 12.0 | Memory usage by process |
| `ruby_process_start_time_seconds` | Gauge | 12.0 | UNIX timestamp of process start time |
 
[GC.stat]: https://ruby-doc.org/core-2.6.5/GC.html#method-c-stat
Loading
Loading
Loading
Loading
@@ -5711,6 +5711,11 @@ type SentryDetailedError {
"""
frequency: [SentryErrorFrequency!]!
 
"""
GitLab commit SHA attributed to the Error based on the release version
"""
gitlabCommit: String
"""
ID (global ID) of the error
"""
Loading
Loading
Loading
Loading
@@ -15548,6 +15548,20 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "gitlabCommit",
"description": "GitLab commit SHA attributed to the Error based on the release version",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "id",
"description": "ID (global ID) of the error",
Loading
Loading
Loading
Loading
@@ -893,6 +893,7 @@ Autogenerated return type of RemoveAwardEmoji
| `lastReleaseLastCommit` | String | Commit the error was last seen |
| `firstReleaseShortVersion` | String | Release version the error was first seen |
| `lastReleaseShortVersion` | String | Release version the error was last seen |
| `gitlabCommit` | String | GitLab commit SHA attributed to the Error based on the release version |
 
## SentryErrorFrequency
 
Loading
Loading
Loading
Loading
@@ -210,7 +210,7 @@ For reference, GitLab.com's [auto-scaling shared runner](../user/gitlab_com/inde
 
## Supported web browsers
 
We support the current and the previous major release of:
GitLab supports the following web browsers:
 
- Firefox
- Chrome/Chromium
Loading
Loading
@@ -218,10 +218,11 @@ We support the current and the previous major release of:
- Microsoft Edge
- Internet Explorer 11
 
The browser vendors release regular minor version updates with important bug fixes and security updates.
Support is only provided for the current minor version of the major version you are running.
For the listed web browsers, GitLab supports:
 
Each time a new browser version is released, we begin supporting that version and stop supporting the third most recent version.
- The current and previous major versions of browsers except Internet Explorer.
- Only version 11 of Internet Explorer.
- The current minor version of a supported major version.
 
NOTE: **Note:** We do not support running GitLab with JavaScript disabled in the browser and have no plans of supporting that
in the future because we have features such as Issue Boards which require JavaScript extensively.
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