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

Add latest changes from gitlab-org/gitlab@master

parent e40710ab
No related branches found
No related tags found
No related merge requests found
Showing
with 95 additions and 70 deletions
Loading
Loading
@@ -341,8 +341,8 @@ RSpec/HaveGitlabHttpStatus:
- 'ee/spec/features/**/*'
- 'spec/controllers/*.rb'
- 'ee/spec/controllers/*.rb'
- 'spec/controllers/projects/*.rb'
- 'ee/spec/controllers/projects/*.rb'
- 'spec/controllers/projects/**/*.rb'
- 'ee/spec/controllers/projects/**/*.rb'
- 'spec/requests/*.rb'
- 'ee/spec/requests/*.rb'
 
Loading
Loading
Loading
Loading
@@ -145,6 +145,12 @@ production: &base
# Number of seconds to wait for HTTP response after sending webhook HTTP POST request (default: 10)
# webhook_timeout: 10
 
### GraphQL Settings
# Tells the rails application how long it has to complete a GraphQL request.
# We suggest this value to be higher than the database timeout value
# and lower than the worker timeout set in unicorn/puma. (default: 30)
# graphql_timeout: 30
## Repository downloads directory
# When a user clicks e.g. 'Download zip' on a project, a temporary zip file is created in the following directory.
# The default is 'shared/cache/archive/' relative to the root of the Rails app.
Loading
Loading
Loading
Loading
@@ -2521,6 +2521,12 @@ Possible values for `when` are:
- `runner_system_failure`: Retry if there was a runner system failure (e.g. setting up the job failed).
- `missing_dependency_failure`: Retry if a dependency was missing.
- `runner_unsupported`: Retry if the runner was unsupported.
- `stale_schedule`: Retry if a delayed job could not be executed.
- `job_execution_timeout`: Retry if the script exceeded the maximum execution time set for the job.
- `archived_failure`: Retry if the job is archived and cannot be run.
- `unmet_prerequisites`: Retry if the job failed to complete prerequisite tasks.
- `scheduler_failure`: Retry if the scheduler failed to assign the job to a runner.
- `data_integrity_failure`: Retry if there was a structural integrity problem detected.
 
### `timeout`
 
Loading
Loading
Loading
Loading
@@ -531,7 +531,14 @@ Vale supports creating [custom tests](https://errata-ai.github.io/vale/styles/),
stored in the `doc/.linting/vale/styles/gitlab` directory, that extend any of
several types of checks.
 
To view linting suggestions locally, you must install Vale on your own machine, and
To view linting suggestions locally, you must install Vale on your own machine,
and from GitLab's root directory (where `.vale.ini` is located), run:
```shell
vale --glob='*.{md}' doc
```
You can also
[configure the text editor of your choice](https://errata-ai.github.io/vale/#local-use-by-a-single-writer)
to display the results.
 
Loading
Loading
Loading
Loading
@@ -39,7 +39,7 @@ describe Projects::Ci::LintsController do
end
 
it 'responds with 404' do
expect(response).to have_gitlab_http_status(404)
expect(response).to have_gitlab_http_status(:not_found)
end
end
end
Loading
Loading
@@ -115,7 +115,7 @@ describe Projects::Ci::LintsController do
end
 
it 'responds with 404' do
expect(response).to have_gitlab_http_status(404)
expect(response).to have_gitlab_http_status(:not_found)
end
end
end
Loading
Loading
Loading
Loading
@@ -42,7 +42,7 @@ describe Projects::Clusters::ApplicationsController do
expect(ClusterInstallAppWorker).to receive(:perform_async).with(application, anything).once
 
expect { subject }.to change { current_application.count }
expect(response).to have_http_status(:no_content)
expect(response).to have_gitlab_http_status(:no_content)
expect(cluster.application_helm).to be_scheduled
end
 
Loading
Loading
@@ -53,7 +53,7 @@ describe Projects::Clusters::ApplicationsController do
 
it 'return 404' do
expect { subject }.not_to change { current_application.count }
expect(response).to have_http_status(:not_found)
expect(response).to have_gitlab_http_status(:not_found)
end
end
 
Loading
Loading
@@ -61,7 +61,7 @@ describe Projects::Clusters::ApplicationsController do
let(:application) { 'unkwnown-app' }
 
it 'return 404' do
is_expected.to have_http_status(:not_found)
is_expected.to have_gitlab_http_status(:not_found)
end
end
 
Loading
Loading
@@ -71,7 +71,7 @@ describe Projects::Clusters::ApplicationsController do
end
 
it 'returns 400' do
is_expected.to have_http_status(:bad_request)
is_expected.to have_gitlab_http_status(:bad_request)
end
end
end
Loading
Loading
@@ -108,7 +108,7 @@ describe Projects::Clusters::ApplicationsController do
it "schedules an application update" do
expect(ClusterPatchAppWorker).to receive(:perform_async).with(application.name, anything).once
 
is_expected.to have_http_status(:no_content)
is_expected.to have_gitlab_http_status(:no_content)
 
expect(cluster.application_knative).to be_scheduled
end
Loading
Loading
@@ -119,13 +119,13 @@ describe Projects::Clusters::ApplicationsController do
cluster.destroy!
end
 
it { is_expected.to have_http_status(:not_found) }
it { is_expected.to have_gitlab_http_status(:not_found) }
end
 
context 'when application is unknown' do
let(:application_name) { 'unkwnown-app' }
 
it { is_expected.to have_http_status(:not_found) }
it { is_expected.to have_gitlab_http_status(:not_found) }
end
 
context 'when application is already scheduled' do
Loading
Loading
@@ -133,7 +133,7 @@ describe Projects::Clusters::ApplicationsController do
application.make_scheduled!
end
 
it { is_expected.to have_http_status(:bad_request) }
it { is_expected.to have_gitlab_http_status(:bad_request) }
end
end
 
Loading
Loading
@@ -170,7 +170,7 @@ describe Projects::Clusters::ApplicationsController do
it "schedules an application update" do
expect(worker_class).to receive(:perform_async).with(application.name, application.id).once
 
is_expected.to have_http_status(:no_content)
is_expected.to have_gitlab_http_status(:no_content)
 
expect(cluster.application_prometheus).to be_scheduled
end
Loading
Loading
@@ -181,13 +181,13 @@ describe Projects::Clusters::ApplicationsController do
cluster.destroy!
end
 
it { is_expected.to have_http_status(:not_found) }
it { is_expected.to have_gitlab_http_status(:not_found) }
end
 
context 'when application is unknown' do
let(:application_name) { 'unkwnown-app' }
 
it { is_expected.to have_http_status(:not_found) }
it { is_expected.to have_gitlab_http_status(:not_found) }
end
 
context 'when application is already scheduled' do
Loading
Loading
@@ -195,7 +195,7 @@ describe Projects::Clusters::ApplicationsController do
application.make_scheduled!
end
 
it { is_expected.to have_http_status(:bad_request) }
it { is_expected.to have_gitlab_http_status(:bad_request) }
end
end
 
Loading
Loading
Loading
Loading
@@ -69,7 +69,7 @@ describe Projects::MergeRequests::ContentController do
it 'returns 404' do
do_request
 
expect(response).to have_http_status(:not_found)
expect(response).to have_gitlab_http_status(:not_found)
end
end
 
Loading
Loading
@@ -77,7 +77,7 @@ describe Projects::MergeRequests::ContentController do
it 'returns 404' do
do_request(:widget)
 
expect(response).to have_http_status(:not_found)
expect(response).to have_gitlab_http_status(:not_found)
end
end
end
Loading
Loading
Loading
Loading
@@ -62,7 +62,7 @@ describe Projects::MergeRequests::CreationsController do
expect(assigns(:commits)).to be_an Array
expect(total).to be > 0
expect(assigns(:hidden_commit_count)).to be > 0
expect(response).to have_gitlab_http_status(200)
expect(response).to have_gitlab_http_status(:ok)
expect(response.body).to match %r(<span class="commits-count">2 commits</span>)
end
end
Loading
Loading
@@ -76,7 +76,7 @@ describe Projects::MergeRequests::CreationsController do
expect(assigns(:commits)).to be_an CommitCollection
expect(total).to be > 0
expect(assigns(:hidden_commit_count)).to eq(0)
expect(response).to have_gitlab_http_status(200)
expect(response).to have_gitlab_http_status(:ok)
expect(response.body).to match %r(<span class="commits-count">#{total} commits</span>)
end
end
Loading
Loading
@@ -173,7 +173,7 @@ describe Projects::MergeRequests::CreationsController do
end
 
it 'returns a 404' do
expect(response).to have_gitlab_http_status(404)
expect(response).to have_gitlab_http_status(:not_found)
end
end
end
Loading
Loading
@@ -196,7 +196,7 @@ describe Projects::MergeRequests::CreationsController do
}
 
expect(assigns(:commit)).not_to be_nil
expect(response).to have_gitlab_http_status(200)
expect(response).to have_gitlab_http_status(:ok)
end
 
it 'does not load the commit when the user cannot read the project' do
Loading
Loading
@@ -211,7 +211,7 @@ describe Projects::MergeRequests::CreationsController do
}
 
expect(assigns(:commit)).to be_nil
expect(response).to have_gitlab_http_status(200)
expect(response).to have_gitlab_http_status(:ok)
end
end
 
Loading
Loading
Loading
Loading
@@ -13,7 +13,7 @@ describe Projects::MergeRequests::DiffsController do
go(diff_id: unexistent_diff_id)
 
expect(MergeRequestDiff.find_by(id: unexistent_diff_id)).to be_nil
expect(response).to have_gitlab_http_status(404)
expect(response).to have_gitlab_http_status(:not_found)
end
end
end
Loading
Loading
@@ -76,7 +76,7 @@ describe Projects::MergeRequests::DiffsController do
end
 
it 'returns a 404' do
expect(response).to have_gitlab_http_status(404)
expect(response).to have_gitlab_http_status(:not_found)
end
end
end
Loading
Loading
@@ -162,7 +162,7 @@ describe Projects::MergeRequests::DiffsController do
it 'returns 404 when not a member' do
go
 
expect(response).to have_gitlab_http_status(404)
expect(response).to have_gitlab_http_status(:not_found)
end
 
it 'returns 404 when visibility level is not enough' do
Loading
Loading
@@ -170,7 +170,7 @@ describe Projects::MergeRequests::DiffsController do
 
go
 
expect(response).to have_gitlab_http_status(404)
expect(response).to have_gitlab_http_status(:not_found)
end
end
 
Loading
Loading
@@ -178,7 +178,7 @@ describe Projects::MergeRequests::DiffsController do
it 'returns success' do
go(diff_id: merge_request.merge_request_diff.id)
 
expect(response).to have_gitlab_http_status(200)
expect(response).to have_gitlab_http_status(:ok)
end
 
it 'serializes diffs metadata with expected arguments' do
Loading
Loading
@@ -207,7 +207,7 @@ describe Projects::MergeRequests::DiffsController do
it 'returns success' do
go
 
expect(response).to have_gitlab_http_status(200)
expect(response).to have_gitlab_http_status(:ok)
end
 
it 'serializes diffs metadata with expected arguments' do
Loading
Loading
@@ -236,7 +236,7 @@ describe Projects::MergeRequests::DiffsController do
it 'returns success' do
go(commit_id: merge_request.diff_head_sha)
 
expect(response).to have_gitlab_http_status(200)
expect(response).to have_gitlab_http_status(:ok)
end
 
it 'serializes diffs metadata with expected arguments' do
Loading
Loading
@@ -305,7 +305,7 @@ describe Projects::MergeRequests::DiffsController do
end
 
it 'returns a 404' do
expect(response).to have_gitlab_http_status(404)
expect(response).to have_gitlab_http_status(:not_found)
end
end
end
Loading
Loading
@@ -316,7 +316,7 @@ describe Projects::MergeRequests::DiffsController do
end
 
it 'returns a 404' do
expect(response).to have_gitlab_http_status(404)
expect(response).to have_gitlab_http_status(:not_found)
end
end
 
Loading
Loading
@@ -329,7 +329,7 @@ describe Projects::MergeRequests::DiffsController do
end
 
it 'returns a 404' do
expect(response).to have_gitlab_http_status(404)
expect(response).to have_gitlab_http_status(:not_found)
end
end
end
Loading
Loading
@@ -351,7 +351,7 @@ describe Projects::MergeRequests::DiffsController do
it 'returns success' do
subject
 
expect(response).to have_gitlab_http_status(200)
expect(response).to have_gitlab_http_status(:ok)
end
end
 
Loading
Loading
@@ -390,7 +390,7 @@ describe Projects::MergeRequests::DiffsController do
it 'returns 404' do
go
 
expect(response).to have_gitlab_http_status(404)
expect(response).to have_gitlab_http_status(:not_found)
end
end
 
Loading
Loading
@@ -404,7 +404,7 @@ describe Projects::MergeRequests::DiffsController do
it 'returns 404' do
go
 
expect(response).to have_gitlab_http_status(404)
expect(response).to have_gitlab_http_status(:not_found)
end
end
 
Loading
Loading
Loading
Loading
@@ -28,7 +28,7 @@ describe Projects::Prometheus::MetricsController do
it 'returns no content response' do
get :active_common, params: project_params(format: :json)
 
expect(response).to have_gitlab_http_status(204)
expect(response).to have_gitlab_http_status(:no_content)
end
end
 
Loading
Loading
@@ -42,7 +42,7 @@ describe Projects::Prometheus::MetricsController do
it 'returns no content response' do
get :active_common, params: project_params(format: :json)
 
expect(response).to have_gitlab_http_status(200)
expect(response).to have_gitlab_http_status(:ok)
expect(json_response).to eq(sample_response.deep_stringify_keys)
end
end
Loading
Loading
@@ -51,7 +51,7 @@ describe Projects::Prometheus::MetricsController do
it 'returns not found response' do
get :active_common, params: project_params
 
expect(response).to have_gitlab_http_status(404)
expect(response).to have_gitlab_http_status(:not_found)
end
end
end
Loading
Loading
@@ -66,7 +66,7 @@ describe Projects::Prometheus::MetricsController do
 
get :active_common, params: project_params(format: :json)
 
expect(response).to have_gitlab_http_status(404)
expect(response).to have_gitlab_http_status(:not_found)
end
end
 
Loading
Loading
@@ -74,7 +74,7 @@ describe Projects::Prometheus::MetricsController do
it 'renders 404' do
get :active_common, params: project_params(format: :json)
 
expect(response).to have_gitlab_http_status(404)
expect(response).to have_gitlab_http_status(:not_found)
end
end
end
Loading
Loading
Loading
Loading
@@ -51,7 +51,7 @@ describe Projects::Serverless::FunctionsController do
expect(json_response).to eq expected_json
end
 
it { expect(response).to have_gitlab_http_status(200) }
it { expect(response).to have_gitlab_http_status(:ok) }
end
 
context 'when cache is ready' do
Loading
Loading
@@ -83,7 +83,7 @@ describe Projects::Serverless::FunctionsController do
expect(json_response).to eq expected_json
end
 
it { expect(response).to have_gitlab_http_status(200) }
it { expect(response).to have_gitlab_http_status(:ok) }
end
 
context 'when functions were found' do
Loading
Loading
@@ -98,7 +98,7 @@ describe Projects::Serverless::FunctionsController do
expect(json_response["functions"]).not_to be_empty
end
 
it { expect(response).to have_gitlab_http_status(200) }
it { expect(response).to have_gitlab_http_status(:ok) }
end
end
end
Loading
Loading
@@ -107,7 +107,7 @@ describe Projects::Serverless::FunctionsController do
context 'invalid data' do
it 'has a bad function name' do
get :show, params: params({ format: :json, environment_id: "*", id: "foo" })
expect(response).to have_gitlab_http_status(404)
expect(response).to have_gitlab_http_status(:not_found)
end
end
 
Loading
Loading
@@ -115,7 +115,7 @@ describe Projects::Serverless::FunctionsController do
shared_examples 'GET #show with valid data' do
it 'has a valid function name' do
get :show, params: params({ format: :json, environment_id: "*", id: cluster.project.name })
expect(response).to have_gitlab_http_status(200)
expect(response).to have_gitlab_http_status(:ok)
 
expect(json_response).to include(
'name' => project.name,
Loading
Loading
@@ -164,7 +164,7 @@ describe Projects::Serverless::FunctionsController do
context 'invalid data' do
it 'has a bad function name' do
get :metrics, params: params({ format: :json, environment_id: "*", id: "foo" })
expect(response).to have_gitlab_http_status(204)
expect(response).to have_gitlab_http_status(:no_content)
end
end
end
Loading
Loading
@@ -174,7 +174,7 @@ describe Projects::Serverless::FunctionsController do
it 'has data' do
get :index, params: params({ format: :json })
 
expect(response).to have_gitlab_http_status(200)
expect(response).to have_gitlab_http_status(:ok)
 
expect(json_response).to match({
'knative_installed' => 'checking',
Loading
Loading
@@ -191,7 +191,7 @@ describe Projects::Serverless::FunctionsController do
it 'has data in html' do
get :index, params: params
 
expect(response).to have_gitlab_http_status(200)
expect(response).to have_gitlab_http_status(:ok)
end
end
 
Loading
Loading
Loading
Loading
@@ -16,7 +16,7 @@ describe Projects::Settings::CiCdController do
it 'renders show with 200 status code' do
get :show, params: { namespace_id: project.namespace, project_id: project }
 
expect(response).to have_gitlab_http_status(200)
expect(response).to have_gitlab_http_status(:ok)
expect(response).to render_template(:show)
end
 
Loading
Loading
@@ -106,7 +106,7 @@ describe Projects::Settings::CiCdController do
it 'redirects to the settings page' do
subject
 
expect(response).to have_gitlab_http_status(302)
expect(response).to have_gitlab_http_status(:found)
expect(flash[:toast]).to eq("Pipelines settings for '#{project.name}' were successfully updated.")
end
 
Loading
Loading
Loading
Loading
@@ -15,7 +15,7 @@ describe Projects::Settings::IntegrationsController do
it 'renders show with 200 status code' do
get :show, params: { namespace_id: project.namespace, project_id: project }
 
expect(response).to have_gitlab_http_status(200)
expect(response).to have_gitlab_http_status(:ok)
expect(response).to render_template(:show)
end
end
Loading
Loading
Loading
Loading
@@ -15,7 +15,7 @@ describe Projects::Settings::RepositoryController do
it 'renders show with 200 status code' do
get :show, params: { namespace_id: project.namespace, project_id: project }
 
expect(response).to have_gitlab_http_status(200)
expect(response).to have_gitlab_http_status(:ok)
expect(response).to render_template(:show)
end
end
Loading
Loading
@@ -48,7 +48,7 @@ describe Projects::Settings::RepositoryController do
it 'creates deploy token' do
expect { create_deploy_token }.to change { DeployToken.active.count }.by(1)
 
expect(response).to have_gitlab_http_status(200)
expect(response).to have_gitlab_http_status(:ok)
expect(response).to render_template(:show)
end
end
Loading
Loading
Loading
Loading
@@ -23,7 +23,7 @@ describe Projects::Tags::ReleasesController do
release = assigns(:release)
expect(release).not_to be_nil
expect(release).not_to be_persisted
expect(response).to have_http_status(:ok)
expect(response).to have_gitlab_http_status(:ok)
end
 
it 'retrieves an existing release' do
Loading
Loading
@@ -32,7 +32,7 @@ describe Projects::Tags::ReleasesController do
release = assigns(:release)
expect(release).not_to be_nil
expect(release).to be_persisted
expect(response).to have_http_status(:ok)
expect(response).to have_gitlab_http_status(:ok)
end
end
 
Loading
Loading
@@ -42,7 +42,7 @@ describe Projects::Tags::ReleasesController do
 
release = project.releases.find_by(tag: tag)
expect(release.description).to eq("description updated")
expect(response).to have_http_status(:found)
expect(response).to have_gitlab_http_status(:found)
end
 
it 'creates a release if one does not exist' do
Loading
Loading
@@ -52,7 +52,7 @@ describe Projects::Tags::ReleasesController do
update_release(tag_without_release.name, "a new release")
end.to change { project.releases.count }.by(1)
 
expect(response).to have_http_status(:found)
expect(response).to have_gitlab_http_status(:found)
end
 
it 'sets the release name, sha, and author for a new release' do
Loading
Loading
@@ -64,7 +64,7 @@ describe Projects::Tags::ReleasesController do
expect(release.name).to eq(tag_without_release.name)
expect(release.sha).to eq(tag_without_release.target_commit.sha)
expect(release.author.id).to eq(user.id)
expect(response).to have_http_status(:found)
expect(response).to have_gitlab_http_status(:found)
end
 
it 'deletes release when description is empty' do
Loading
Loading
@@ -74,7 +74,7 @@ describe Projects::Tags::ReleasesController do
 
expect(initial_releases_count).to eq(1)
expect(project.releases.count).to eq(0)
expect(response).to have_http_status(:found)
expect(response).to have_gitlab_http_status(:found)
end
 
it 'does nothing when description is empty and the tag does not have a release' do
Loading
Loading
@@ -84,7 +84,7 @@ describe Projects::Tags::ReleasesController do
update_release(tag_without_release.name, "")
end.not_to change { project.releases.count }
 
expect(response).to have_http_status(:found)
expect(response).to have_gitlab_http_status(:found)
end
end
 
Loading
Loading
Loading
Loading
@@ -95,14 +95,20 @@ describe Gitlab::Ci::Config::Entry::Retry do
# values are valid. If they are not it means the documentation and this
# array must be updated.
RETRY_WHEN_IN_DOCUMENTATION = %w[
always
unknown_failure
script_failure
api_failure
stuck_or_timeout_failure
runner_system_failure
missing_dependency_failure
runner_unsupported
always
unknown_failure
script_failure
api_failure
stuck_or_timeout_failure
runner_system_failure
missing_dependency_failure
runner_unsupported
stale_schedule
job_execution_timeout
archived_failure
unmet_prerequisites
scheduler_failure
data_integrity_failure
].freeze
 
RETRY_WHEN_IN_DOCUMENTATION.each do |reason|
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