Skip to content

Commit

Permalink
Add latest changes from gitlab-org/gitlab@master
Browse files Browse the repository at this point in the history
  • Loading branch information
GitLab Bot committed May 18, 2022
1 parent c9dcd65 commit a84995f
Show file tree
Hide file tree
Showing 43 changed files with 235 additions and 399 deletions.
2 changes: 1 addition & 1 deletion app/assets/stylesheets/framework/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
}

.right-sidebar {
border-left: 1px solid $gray-50;
border-left: 1px solid $gray-100;

&.right-sidebar-merge-requests {
@include media-breakpoint-up(md) {
Expand Down

This file was deleted.

This file was deleted.

9 changes: 9 additions & 0 deletions data/removals/15_0/15-0-praefect-virtual-storage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- name: "Gitaly nodes in virtual storage"
announcement_milestone: "13.12" # The milestone when this feature was first announced as deprecated.
announcement_date: "2021-04-22"
removal_milestone: "15.0" # the milestone when this feature is planned to be removed
removal_date: "2022-05-22" # the date of the milestone release when this feature is planned to be removed
breaking_change: true
body: | # Do not modify this line, instead modify the lines below.
Configuring the Gitaly nodes directly in the virtual storage's root configuration object has been deprecated in GitLab 13.12 and is no longer supported in GitLab 15.0. You must move the Gitaly nodes under the `'nodes'` key as described in [the Praefect configuration](https://docs.gitlab.com/ee/administration/gitaly/praefect.html#praefect).
tiers: [Free, Premium, Ultimate]
2 changes: 1 addition & 1 deletion db/docs/ci_job_artifact_states.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ classes:
- Geo::JobArtifactState
feature_categories:
- geo_replication
description: TODO
description: Separate table for job artifacts containing Geo verification metadata.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75264
milestone: '14.8'
2 changes: 1 addition & 1 deletion db/docs/geo_cache_invalidation_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ classes:
- Geo::CacheInvalidationEvent
feature_categories:
- geo_replication
description: TODO
description: Geo event to process feature flag toggles instantly on a secondary by invalidating the cache, belongs to geo_event_log.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/7738
milestone: '11.4'
2 changes: 1 addition & 1 deletion db/docs/geo_container_repository_updated_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ classes:
- Geo::ContainerRepositoryUpdatedEvent
feature_categories:
- geo_replication
description: TODO
description: Geo event for when a container repository (image, tag, registry) gets updated, belongs to geo_event_log.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/1902d9cc74a1dc2c87fdbb39a6cdbb67092cbb5a
milestone: '12.2'
2 changes: 1 addition & 1 deletion db/docs/geo_event_log.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ classes:
- Geo::EventLog
feature_categories:
- geo_replication
description: TODO
description: Log of all events that a Geo secondary can process. Parsed/watched through streaming replication on all secondaries.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/cb6c7cbe2a9ee05cea6926e3d8c18f6aa26f4c64
milestone: '9.3'
2 changes: 1 addition & 1 deletion db/docs/geo_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ classes:
- Geo::Event
feature_categories:
- geo_replication
description: TODO
description: Geo events implemented generically, used by the SSF where all object types can generate an event to be processed by the secondary sites.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/23447
milestone: '12.8'
2 changes: 1 addition & 1 deletion db/docs/geo_hashed_storage_attachments_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ classes:
- Geo::HashedStorageAttachmentsEvent
feature_categories:
- geo_replication
description: TODO
description: Used to replicate storage attachments migration paths on Geo secondaries from regular to hashed storage.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/3544
milestone: '10.3'
2 changes: 1 addition & 1 deletion db/docs/geo_hashed_storage_migrated_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ classes:
- Geo::HashedStorageMigratedEvent
feature_categories:
- geo_replication
description: TODO
description: Used to replicate repository migration paths on Geo secondaries from regular to hashed storage.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/3066
milestone: '10.2'
2 changes: 1 addition & 1 deletion db/docs/geo_lfs_object_deleted_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ table_name: geo_lfs_object_deleted_events
classes: []
feature_categories:
- geo_replication
description: TODO
description: Geo event for when an LFS object gets deleted, belongs to geo_event_log.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/3481
milestone: '10.2'
2 changes: 1 addition & 1 deletion db/docs/geo_node_namespace_links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ classes:
- GeoNodeNamespaceLink
feature_categories:
- geo_replication
description: TODO
description: Passthrough table for geo_nodes many-to-many namespaces relation.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/14c6128530579ca92fa79342d4119d25bcff1f2d
milestone: '9.5'
2 changes: 1 addition & 1 deletion db/docs/geo_node_statuses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ classes:
- GeoNodeStatus
feature_categories:
- geo_replication
description: TODO
description: Contains sites status and metadata for each Geo site, updated async through a scheduled worker.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/3230
milestone: '10.2'
2 changes: 1 addition & 1 deletion db/docs/geo_nodes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ classes:
- GeoNode
feature_categories:
- geo_replication
description: TODO
description: Contains Geo sites configuration data and settings.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/5ab12ad02ed753dd933485094ba45512890f0b50
milestone: '8.5'
2 changes: 1 addition & 1 deletion db/docs/geo_repositories_changed_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ classes:
- Geo::RepositoriesChangedEvent
feature_categories:
- geo_replication
description: TODO
description: Geo event for when the repositories for selective sync of a specific Geo secondary change, belongs to geo_event_log.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/312bc703a4619b87ba2ac4e59623e7747a24502c
milestone: '9.5'
2 changes: 1 addition & 1 deletion db/docs/geo_repository_created_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ classes:
- Geo::RepositoryCreatedEvent
feature_categories:
- geo_replication
description: TODO
description: Geo event for when a repository gets created, belongs to geo_event_log.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/f3eacf881659b7af97b7c7ba3289237ec6cdc1cb
milestone: '10.0'
2 changes: 1 addition & 1 deletion db/docs/geo_repository_deleted_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ classes:
- Geo::RepositoryDeletedEvent
feature_categories:
- geo_replication
description: TODO
description: Geo event for when a repository gets deleted, belongs to geo_event_log.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/04c3da24ac5975b140cf2e6a7e33414543f148f5
milestone: '9.4'
2 changes: 1 addition & 1 deletion db/docs/geo_repository_renamed_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ classes:
- Geo::RepositoryRenamedEvent
feature_categories:
- geo_replication
description: TODO
description: Geo event for when a repository gets renamed, belongs to geo_event_log.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/6e5fa040d1c689fad4e110dd10be8ddba61ea7ef
milestone: '9.4'
2 changes: 1 addition & 1 deletion db/docs/geo_repository_updated_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ classes:
- Geo::RepositoryUpdatedEvent
feature_categories:
- geo_replication
description: TODO
description: Geo event for when a repository gets updated (content changed), belongs to geo_event_log.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/71cc57b1e4b7721c93107357517235a18f7ba8e2
milestone: '9.3'
2 changes: 1 addition & 1 deletion db/docs/geo_reset_checksum_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ classes:
- Geo::ResetChecksumEvent
feature_categories:
- geo_replication
description: TODO
description: Geo event for when a project gets reverified on the primary, belongs to geo_event_log.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/7394
milestone: '11.4'
2 changes: 1 addition & 1 deletion db/docs/upload_states.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ classes:
- Geo::UploadState
feature_categories:
- geo_replication
description: TODO
description: Separate table for uploads containing Geo verification metadata.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/65921
milestone: '14.6'
4 changes: 2 additions & 2 deletions doc/install/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ services:
external_url 'http://gitlab.example.com:8929'
gitlab_rails['gitlab_shell_ssh_port'] = 2224
ports:
- '8929:80'
- '8929:8929'
- '2224:22'
volumes:
- '$GITLAB_HOME/config:/etc/gitlab'
Expand All @@ -198,7 +198,7 @@ services:
shm_size: '256m'
```

This is the same as using `--publish 8929:80 --publish 2224:22`.
This is the same as using `--publish 8929:8929 --publish 2224:22`.

### Install GitLab using Docker swarm mode

Expand Down
10 changes: 10 additions & 0 deletions doc/update/removals.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,16 @@ All functionality related to GitLab Serverless was deprecated in GitLab 14.3 and

For additional context, or to provide feedback regarding this change, please reference our [deprecation issue](https://gitlab.com/groups/gitlab-org/configure/-/epics/6).

### Gitaly nodes in virtual storage

WARNING:
This feature was changed or removed in 15.0
as a [breaking change](https://docs.gitlab.com/ee/development/contributing/#breaking-changes).
Before updating GitLab, review the details carefully to determine if you need to make any
changes to your code, settings, or workflow.

Configuring the Gitaly nodes directly in the virtual storage's root configuration object has been deprecated in GitLab 13.12 and is no longer supported in GitLab 15.0. You must move the Gitaly nodes under the `'nodes'` key as described in [the Praefect configuration](https://docs.gitlab.com/ee/administration/gitaly/praefect.html#praefect).

### GraphQL permissions change for Package settings

WARNING:
Expand Down
3 changes: 1 addition & 2 deletions lib/api/ci/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,7 @@ class Runner < ::API::Base
optional :direct_download, default: false, type: Boolean, desc: %q(Perform direct download from remote storage instead of proxying artifacts)
end
get '/:id/artifacts', feature_category: :build_artifacts do
if Feature.enabled?(:ci_authenticate_running_job_token_for_artifacts, current_job&.project) &&
request_using_running_job_token?
if request_using_running_job_token?
authenticate_job_via_dependent_job!
else
authenticate_job!(require_running: false)
Expand Down
6 changes: 1 addition & 5 deletions lib/api/entities/ci/job_request/dependency.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ class Dependency < Grape::Entity
expose :id, :name

expose :token do |job, options|
if ::Feature.enabled?(:ci_expose_running_job_token_for_artifacts, job.project)
options[:running_job]&.token
else
job.token
end
options[:running_job]&.token
end

expose :artifacts_file, using: Entities::Ci::JobArtifactFile, if: ->(job, _) { job.available_artifacts? }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class GroupAttributesPipeline

file_extraction_pipeline!

relation_name 'self'
relation_name BulkImports::FileTransfer::BaseConfig::SELF_RELATION

extractor ::BulkImports::Common::Extractors::JsonExtractor, relation: relation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ class ProjectAttributesPipeline

file_extraction_pipeline!

relation_name BulkImports::FileTransfer::BaseConfig::SELF_RELATION

transformer ::BulkImports::Common::Transformers::ProhibitedAttributesTransformer

def extract(_context)
Expand Down Expand Up @@ -57,7 +59,7 @@ def config
def download_service
@download_service ||= BulkImports::FileDownloadService.new(
configuration: context.configuration,
relative_url: context.entity.relation_download_url_path(BulkImports::FileTransfer::BaseConfig::SELF_RELATION),
relative_url: context.entity.relation_download_url_path(self.class.relation),
tmpdir: tmpdir,
filename: compressed_filename
)
Expand All @@ -72,7 +74,7 @@ def compressed_filename
end

def filename
"#{BulkImports::FileTransfer::BaseConfig::SELF_RELATION}.json"
"#{self.class.relation}.json"
end

def json_decode(string)
Expand Down
10 changes: 0 additions & 10 deletions spec/lib/api/entities/ci/job_request/dependency_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,6 @@
expect(subject[:token]).to eq(running_job.token)
end

context 'when ci_expose_running_job_token_for_artifacts is disabled' do
before do
stub_feature_flags(ci_expose_running_job_token_for_artifacts: false)
end

it 'returns the token belonging to the dependency job' do
expect(subject[:token]).to eq(job.token)
end
end

it 'returns the dependency artifacts_file', :aggregate_failures do
expect(subject[:artifacts_file][:filename]).to eq('ci_build_artifacts.zip')
expect(subject[:artifacts_file][:size]).to eq(job.artifacts_size)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,8 @@
pipeline.after_run(nil)
end
end

describe '.relation' do
it { expect(described_class.relation).to eq('self') }
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,8 @@
end
end
end

describe '.relation' do
it { expect(described_class.relation).to eq('self') }
end
end
4 changes: 3 additions & 1 deletion spec/lib/gitlab/sidekiq_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@
before do
allow(described_class).to receive(:workers).and_return(workers)
allow(Gitlab).to receive(:ee?).and_return(false)
allow(Gitlab).to receive(:jh?).and_return(false)
end

it 'returns true if the YAML file does not matcph the application code' do
it 'returns true if the YAML file does not match the application code' do
allow(YAML).to receive(:load_file)
.with(described_class::FOSS_QUEUE_CONFIG_PATH)
.and_return(workers.first(2).map(&:to_yaml))
Expand Down Expand Up @@ -101,6 +102,7 @@
].map { |worker| described_class::Worker.new(worker, ee: false) }

allow(described_class).to receive(:workers).and_return(workers)
allow(Gitlab).to receive(:jh?).and_return(false)
end

let(:expected_queues) do
Expand Down
32 changes: 0 additions & 32 deletions spec/requests/api/ci/runner/jobs_artifacts_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -895,22 +895,6 @@ def upload_artifacts(file, headers = {}, params = {})

it_behaves_like 'successful artifact download'
end

context 'when feature flag is disabled' do
before do
stub_feature_flags(ci_authenticate_running_job_token_for_artifacts: false)
end

it_behaves_like 'successful artifact download'

context 'when the job is no longer running' do
before do
job.success!
end

it_behaves_like 'successful artifact download'
end
end
end

context 'when using token belonging to the dependent job' do
Expand All @@ -928,14 +912,6 @@ def upload_artifacts(file, headers = {}, params = {})

it_behaves_like 'forbidden request'
end

context 'when feature flag is disabled' do
before do
stub_feature_flags(ci_authenticate_running_job_token_for_artifacts: false)
end

it_behaves_like 'forbidden request'
end
end

context 'when using token belonging to another job created by another project member' do
Expand All @@ -952,14 +928,6 @@ def upload_artifacts(file, headers = {}, params = {})
end

it_behaves_like 'successful artifact download'

context 'when feature flag is disabled' do
before do
stub_feature_flags(ci_authenticate_running_job_token_for_artifacts: false)
end

it_behaves_like 'forbidden request'
end
end

context 'when using token belonging to a pending dependent job' do
Expand Down
Loading

0 comments on commit a84995f

Please sign in to comment.