Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
28b119a4b4
commit
e0096a0ef1
|
@ -660,7 +660,6 @@ $tabs-holder-z-index: 250;
|
|||
|
||||
.mr-widget-workflow {
|
||||
margin-top: $gl-padding;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
&:not(:last-child)::before {
|
||||
|
|
|
@ -413,12 +413,10 @@ class Namespace < ApplicationRecord
|
|||
return { scope: :group, status: auto_devops_enabled } unless auto_devops_enabled.nil?
|
||||
|
||||
strong_memoize(:first_auto_devops_config) do
|
||||
if has_parent? && cache_first_auto_devops_config?
|
||||
if has_parent?
|
||||
Rails.cache.fetch(first_auto_devops_config_cache_key_for(id), expires_in: 1.day) do
|
||||
parent.first_auto_devops_config
|
||||
end
|
||||
elsif has_parent?
|
||||
parent.first_auto_devops_config
|
||||
else
|
||||
{ scope: :instance, status: Gitlab::CurrentSettings.auto_devops_enabled? }
|
||||
end
|
||||
|
@ -661,8 +659,6 @@ class Namespace < ApplicationRecord
|
|||
end
|
||||
|
||||
def expire_first_auto_devops_config_cache
|
||||
return unless cache_first_auto_devops_config?
|
||||
|
||||
descendants_to_expire = self_and_descendants.as_ids
|
||||
return if descendants_to_expire.load.empty?
|
||||
|
||||
|
@ -670,10 +666,6 @@ class Namespace < ApplicationRecord
|
|||
Rails.cache.delete_multi(keys)
|
||||
end
|
||||
|
||||
def cache_first_auto_devops_config?
|
||||
::Feature.enabled?(:namespaces_cache_first_auto_devops_config)
|
||||
end
|
||||
|
||||
def write_projects_repository_config
|
||||
all_projects.find_each do |project|
|
||||
project.set_full_path
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
name: namespaces_cache_first_auto_devops_config
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/80937
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/353503
|
||||
milestone: '14.9'
|
||||
type: development
|
||||
group: group::authentication and authorization
|
||||
default_enabled: false
|
|
@ -78,6 +78,30 @@ class AddUserIdAndStateIndexToMergeRequestReviewers < Gitlab::Database::Migratio
|
|||
end
|
||||
```
|
||||
|
||||
#### Example: Add a new table to store in a single database
|
||||
|
||||
1. Define the [GitLab Schema](multiple_databases.md#gitlab-schema) of the table in [`lib/gitlab/database/gitlab_schemas.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/database/gitlab_schemas.yml):
|
||||
|
||||
```yaml
|
||||
ssh_signatures: :gitlab_main
|
||||
```
|
||||
|
||||
1. Create the table in a schema migration:
|
||||
|
||||
```ruby
|
||||
class CreateSshSignatures < Gitlab::Database::Migration[2.0]
|
||||
def change
|
||||
create_table :ssh_signatures do |t|
|
||||
t.timestamps_with_timezone null: false
|
||||
t.bigint :project_id, null: false, index: true
|
||||
t.bigint :key_id, null: false, index: true
|
||||
t.integer :verification_status, default: 0, null: false, limit: 2
|
||||
t.binary :commit_sha, null: false, index: { unique: true }
|
||||
end
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
### Data Manipulation Language (DML)
|
||||
|
||||
The DML migrations are all migrations that:
|
||||
|
|
|
@ -6,6 +6,17 @@ namespace :tw do
|
|||
desc 'Generates a list of codeowners for documentation pages.'
|
||||
task :codeowners do
|
||||
CodeOwnerRule = Struct.new(:category, :writer)
|
||||
DocumentOwnerMapping = Struct.new(:path, :writer) do
|
||||
def writer_owns_all_pages?(mappings)
|
||||
mappings
|
||||
.select { |mapping| mapping.directory == directory }
|
||||
.all? { |mapping| mapping.writer == writer }
|
||||
end
|
||||
|
||||
def directory
|
||||
@directory ||= File.dirname(path)
|
||||
end
|
||||
end
|
||||
|
||||
CODE_OWNER_RULES = [
|
||||
CodeOwnerRule.new('Activation', '@kpaizee'),
|
||||
|
@ -84,6 +95,7 @@ namespace :tw do
|
|||
end
|
||||
|
||||
errors = []
|
||||
mappings = []
|
||||
|
||||
path = Rails.root.join("doc/**/*.md")
|
||||
Dir.glob(path) do |file|
|
||||
|
@ -98,9 +110,21 @@ namespace :tw do
|
|||
writer = writer_for_group(document.group)
|
||||
next unless writer
|
||||
|
||||
puts "#{file.gsub(Dir.pwd, ".")} #{writer}" if document.has_a_valid_group?
|
||||
mappings << DocumentOwnerMapping.new(file.delete_prefix(Dir.pwd), writer) if document.has_a_valid_group?
|
||||
end
|
||||
|
||||
deduplicated_mappings = Set.new
|
||||
|
||||
mappings.each do |mapping|
|
||||
if mapping.writer_owns_all_pages?(mappings)
|
||||
deduplicated_mappings.add("#{mapping.directory}/ #{mapping.writer}")
|
||||
else
|
||||
deduplicated_mappings.add("#{mapping.path} #{mapping.writer}")
|
||||
end
|
||||
end
|
||||
|
||||
deduplicated_mappings.each { |mapping| puts mapping }
|
||||
|
||||
if errors.present?
|
||||
puts "-----"
|
||||
puts "ERRORS - the following files are missing the correct metadata:"
|
||||
|
|
|
@ -34077,9 +34077,6 @@ msgstr ""
|
|||
msgid "SecurityReports|Create issue"
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityReports|Create policy"
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityReports|Development vulnerabilities"
|
||||
msgstr ""
|
||||
|
||||
|
@ -34107,6 +34104,9 @@ msgstr ""
|
|||
msgid "SecurityReports|Ensure that %{trackingStart}issue tracking%{trackingEnd} is enabled for this project and you have %{permissionsStart}permission to create new issues%{permissionsEnd}."
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityReports|Error fetching the vulnerabilities over time. Please check your network connection and try again."
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityReports|Error fetching the vulnerability counts. Please check your network connection and try again."
|
||||
msgstr ""
|
||||
|
||||
|
@ -34134,15 +34134,6 @@ msgstr ""
|
|||
msgid "SecurityReports|Manage and track vulnerabilities identified in projects within your group. Vulnerabilities in projects are shown here when security testing is configured."
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityReports|Manage and track vulnerabilities identified in your Kubernetes clusters. Vulnerabilities appear here after you create a scan execution policy in any project in this group."
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityReports|Manage and track vulnerabilities identified in your Kubernetes clusters. Vulnerabilities appear here after you create a scan execution policy in any project in this instance."
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityReports|Manage and track vulnerabilities identified in your Kubernetes clusters. Vulnerabilities appear here after you create a scan execution policy in this project."
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityReports|Manage and track vulnerabilities identified in your project. Vulnerabilities are shown here when security testing is configured."
|
||||
msgstr ""
|
||||
|
||||
|
@ -34152,9 +34143,6 @@ msgstr ""
|
|||
msgid "SecurityReports|Maximum selected projects limit reached"
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityReports|Monitor vulnerabilities across clusters"
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityReports|Monitor vulnerabilities in all of your projects"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -2420,14 +2420,6 @@ RSpec.describe Group do
|
|||
|
||||
group.update!(auto_devops_enabled: true)
|
||||
end
|
||||
|
||||
it 'does not clear cache when the feature is disabled' do
|
||||
stub_feature_flags(namespaces_cache_first_auto_devops_config: false)
|
||||
|
||||
expect(Rails.cache).not_to receive(:delete_multi)
|
||||
|
||||
parent.update!(auto_devops_enabled: true)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue