Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2023-11-15 00:17:14 +00:00
parent eaa1d6fdd7
commit ff45b1aea7
19 changed files with 58 additions and 48 deletions

View File

@ -101,7 +101,7 @@ export default {
<span
v-for="item in projectInfoItems"
:key="`${item.icon}`"
class="gl-display-flex gl-align-items-center gl-xs-mb-3"
class="gl-display-flex gl-align-items-center gl-mb-3 gl-sm-mb-0"
>
<gl-icon class="gl-text-primary gl-mr-2" :name="item.icon" />
<div

View File

@ -335,7 +335,7 @@ export default {
class="gl-m-0 gl-w-full gl-display-flex gl-flex-direction-column gl-sm-flex-direction-row-reverse"
>
<gl-button
class="gl-w-full gl-sm-w-auto gl-xs-mb-3! gl-sm-ml-3!"
class="gl-w-full gl-sm-w-auto gl-sm-ml-3!"
data-testid="invite-modal-submit"
v-bind="actionPrimary.attributes"
@click="onSubmit"

View File

@ -435,7 +435,7 @@ export default {
category="primary"
variant="confirm"
data-testid="reply-comment-button"
class="gl-sm-mr-3 gl-xs-mb-3 js-vue-issue-save js-comment-button"
class="gl-sm-mr-3 gl-mb-3 gl-sm-mb-0 js-vue-issue-save js-comment-button"
@click="handleUpdate()"
>
{{ saveButtonTitle }}

View File

@ -72,7 +72,9 @@ export default {
<div
class="gl-display-flex gl-flex-direction-column gl-sm-flex-direction-row gl-justify-content-space-between gl-align-items-stretch gl-flex-grow-1"
>
<div class="gl-display-flex gl-flex-direction-column gl-xs-mb-3 gl-min-w-0 gl-flex-grow-1">
<div
class="gl-display-flex gl-flex-direction-column gl-mb-3 gl-sm-mb-0 gl-min-w-0 gl-flex-grow-1"
>
<div
v-if="
$slots['left-primary'] /* eslint-disable-line @gitlab/vue-prefer-dollar-scopedslots */

View File

@ -23,7 +23,9 @@ export default {
<div
class="gl-display-flex gl-flex-direction-column gl-sm-flex-direction-row gl-justify-content-space-between gl-align-items-stretch gl-flex-grow-1"
>
<div class="gl-display-flex gl-flex-direction-column gl-xs-mb-3 gl-min-w-0 gl-flex-grow-1">
<div
class="gl-display-flex gl-flex-direction-column gl-mb-3 gl-sm-mb-0 gl-min-w-0 gl-flex-grow-1"
>
<div
v-if="
/* eslint-disable-line @gitlab/vue-prefer-dollar-scopedslots */ $slots[

View File

@ -35,4 +35,10 @@
@include gl-media-breakpoint-up(sm) {
flex-direction: row-reverse;
}
}
}
.gl-sm-mb-0 {
@include gl-media-breakpoint-up(sm) {
margin-bottom: 0;
}
}

View File

@ -2,22 +2,6 @@
module Enums
class PackageMetadata
PURL_TYPES = {
composer: 1,
conan: 2,
gem: 3,
golang: 4,
maven: 5,
npm: 6,
nuget: 7,
pypi: 8,
apk: 9,
rpm: 10,
deb: 11,
'cbl-mariner': 12,
wolfi: 13
}.with_indifferent_access.freeze
ADVISORY_SOURCES = {
glad: 1, # gitlab advisory db
trivy: 2
@ -33,14 +17,6 @@ module Enums
v2: 2
}.with_indifferent_access.freeze
def self.purl_types
PURL_TYPES
end
def self.purl_types_numerical
purl_types.invert
end
def self.advisory_sources
ADVISORY_SOURCES
end

View File

@ -31,5 +31,9 @@ module Enums
# consumers from producing invalid SQL caused by null entries
@_purl_types ||= PURL_TYPES.dup.tap { |h| h.default = 0 }
end
def self.purl_types_numerical
purl_types.invert
end
end
end

View File

@ -26,7 +26,7 @@ module BulkImports
start_export!
export.batches.destroy_all # rubocop: disable Cop/DestroyAll
enqueue_batch_exports
ensure
FinishBatchedRelationExportWorker.perform_async(export.id)
end

View File

@ -19,7 +19,7 @@
#{time_ago_with_tooltip(@commit.committed_date)}
#js-commit-comments-button{ data: { comments_count: @notes_count.to_i } }
= link_button_to _('Browse files'), project_tree_path(@project, @commit), class: 'gl-mr-3 gl-w-full gl-sm-w-auto gl-xs-mb-3'
= link_button_to _('Browse files'), project_tree_path(@project, @commit), class: 'gl-mr-3 gl-w-full gl-sm-w-auto gl-mb-3 gl-sm-mb-0'
#js-commit-options-dropdown{ data: commit_options_dropdown_data(@project, @commit) }
.commit-box{ data: { project_path: project_path(@project) } }

View File

@ -6,7 +6,7 @@
- blob_path = project_blob_path(@project, @ref)
.file-finder-holder.tree-holder.clearfix.js-file-finder.gl-pt-4{ data: { file_find_url: "#{escape_javascript(project_files_path(@project, @ref, ref_type: @ref_type, format: :json))}", find_tree_url: escape_javascript(tree_path), blob_url_template: escape_javascript(blob_path), ref_type: @ref_type } }
.nav-block.gl-xs-mr-0
.tree-ref-holder.gl-xs-mb-3.gl-max-w-26
.tree-ref-holder.gl-mb-3.gl-sm-mb-0.gl-max-w-26
#js-blob-ref-switcher{ data: { project_id: @project.id, ref: @ref, ref_type: @ref_type, namespace: "/-/find_file" } }
%ul.breadcrumb.repo-breadcrumb.gl-flex-nowrap
%li.breadcrumb-item.gl-white-space-nowrap

View File

@ -32,18 +32,16 @@ end
SOLUTIONS_LABELS = %w[Solutions].freeze
DEVELOPMENT_LABELS = ['docs::improvement', 'development guidelines'].freeze
def no_tw_review_label_message(labels)
def add_labels(labels)
helper.labels_to_add.concat(%w[documentation type::maintenance maintenance::refactor] + labels)
'You do not need tech writer review.'
end
SOLUTIONS_MESSAGE = <<~MSG.freeze
This MR contains docs in the /solutions directory and should be reviewed by a Solutions Architect approver. #{no_tw_review_label_message(SOLUTIONS_LABELS)}
SOLUTIONS_MESSAGE = <<~MSG
This MR contains docs in the /solutions directory and should be reviewed by a Solutions Architect approver. You do not need tech writer review.
MSG
DEVELOPMENT_MESSAGE = <<~MSG.freeze
This MR contains docs in the /development directory. Any Maintainer, other than the author, can merge. #{no_tw_review_label_message(DEVELOPMENT_LABELS)}
DEVELOPMENT_MESSAGE = <<~MSG
This MR contains docs in the /development directory. Any Maintainer, other than the author, can merge. You do not need tech writer review.
MSG
# For regular pages, prompt for a TW review
@ -78,8 +76,15 @@ MSG
# Output messages
warn(DOCUMENTATION_UPDATE_MISSING) if docs_paths_to_review.empty? && feature_mr?
message(SOLUTIONS_MESSAGE) if sections_with_no_tw_review["doc/solutions"].any?
message(DEVELOPMENT_MESSAGE) if sections_with_no_tw_review["doc/development"].any?
if sections_with_no_tw_review["doc/solutions"].any?
add_labels(SOLUTIONS_LABELS)
message(SOLUTIONS_MESSAGE)
end
if sections_with_no_tw_review["doc/development"].any?
add_labels(DEVELOPMENT_LABELS)
message(DEVELOPMENT_MESSAGE)
end
unless docs_paths_to_review.empty?
message(DOCS_UPDATE_SHORT_MESSAGE)

View File

@ -41,7 +41,7 @@ as it can cause the pipeline to behave unexpectedly.
| `CI_COMMIT_SHORT_SHA` | 11.7 | all | The first eight characters of `CI_COMMIT_SHA`. |
| `CI_COMMIT_TAG` | 9.0 | 0.5 | The commit tag name. Available only in pipelines for tags. |
| `CI_COMMIT_TAG_MESSAGE` | 15.5 | all | The commit tag message. Available only in pipelines for tags. |
| `CI_COMMIT_TIMESTAMP` | 13.4 | all | The timestamp of the commit in the [ISO 8601](https://www.rfc-editor.org/rfc/rfc3339#appendix-A) format. |
| `CI_COMMIT_TIMESTAMP` | 13.4 | all | The timestamp of the commit in the [ISO 8601](https://www.rfc-editor.org/rfc/rfc3339#appendix-A) format. For example, `2022-01-31T16:47:55Z`. |
| `CI_COMMIT_TITLE` | 10.8 | all | The title of the commit. The full first line of the message. |
| `CI_CONCURRENT_ID` | all | 11.10 | The unique ID of build execution in a single executor. |
| `CI_CONCURRENT_PROJECT_ID` | all | 11.10 | The unique ID of build execution in a single executor and project. |
@ -79,7 +79,7 @@ as it can cause the pipeline to behave unexpectedly.
| `CI_JOB_TIMEOUT` | 15.7 | 15.7 | The job timeout, in seconds. |
| `CI_JOB_TOKEN` | 9.0 | 1.2 | A token to authenticate with [certain API endpoints](../jobs/ci_job_token.md). The token is valid as long as the job is running. |
| `CI_JOB_URL` | 11.1 | 0.5 | The job details URL. |
| `CI_JOB_STARTED_AT` | 13.10 | all | The UTC datetime when a job started, in [ISO 8601](https://www.rfc-editor.org/rfc/rfc3339#appendix-A) format. |
| `CI_JOB_STARTED_AT` | 13.10 | all | The UTC datetime when a job started, in [ISO 8601](https://www.rfc-editor.org/rfc/rfc3339#appendix-A) format. For example, `2022-01-31T16:47:55Z`. |
| `CI_KUBERNETES_ACTIVE` | 13.0 | all | Only available if the pipeline has a Kubernetes cluster available for deployments. `true` when available. |
| `CI_NODE_INDEX` | 11.5 | all | The index of the job in the job set. Only available if the job uses [`parallel`](../yaml/index.md#parallel). |
| `CI_NODE_TOTAL` | 11.5 | all | The total number of instances of this job running in parallel. Set to `1` if the job does not use [`parallel`](../yaml/index.md#parallel). |
@ -91,7 +91,7 @@ as it can cause the pipeline to behave unexpectedly.
| `CI_PIPELINE_SOURCE` | 10.0 | all | How the pipeline was triggered. Can be `push`, `web`, `schedule`, `api`, `external`, `chat`, `webide`, `merge_request_event`, `external_pull_request_event`, `parent_pipeline`, [`trigger`, or `pipeline`](../triggers/index.md#configure-cicd-jobs-to-run-in-triggered-pipelines). For a description of each value, see [Common `if` clauses for `rules`](../jobs/job_control.md#common-if-clauses-for-rules), which uses this variable to control when jobs run. |
| `CI_PIPELINE_TRIGGERED` | all | all | `true` if the job was [triggered](../triggers/index.md). |
| `CI_PIPELINE_URL` | 11.1 | 0.5 | The URL for the pipeline details. |
| `CI_PIPELINE_CREATED_AT` | 13.10 | all | The UTC datetime when the pipeline was created, in [ISO 8601](https://www.rfc-editor.org/rfc/rfc3339#appendix-A) format. |
| `CI_PIPELINE_CREATED_AT` | 13.10 | all | The UTC datetime when the pipeline was created, in [ISO 8601](https://www.rfc-editor.org/rfc/rfc3339#appendix-A) format. For example, `2022-01-31T16:47:55Z`. |
| `CI_PIPELINE_NAME` | 16.3 | all | The pipeline name defined in [`workflow:name`](../yaml/index.md#workflowname) |
| `CI_PROJECT_DIR` | all | all | The full path the repository is cloned to, and where the job runs from. If the GitLab Runner `builds_dir` parameter is set, this variable is set relative to the value of `builds_dir`. For more information, see the [Advanced GitLab Runner configuration](https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runners-section). |
| `CI_PROJECT_ID` | all | all | The ID of the current project. This ID is unique across all projects on the GitLab instance. |

View File

@ -20,6 +20,9 @@ Prerequisites:
- **For Jira Data Center or Jira Server**, you must have one of the following:
- [Jira username and password](jira_server_configuration.md).
- Jira personal access token (GitLab 16.0 and later).
- **For Jira Cloud**, if you have enabled
[IP allowlists](https://support.atlassian.com/security-and-access-policies/docs/specify-ip-addresses-for-product-access/), ensure you have added the
[GitLab.com IP range](../../user/gitlab_com/index.md#ip-range) to the allowlist. Otherwise, you can't view the Jira issues list in a GitLab project.
You can enable the Jira issue integration by configuring your project settings in GitLab.
You can also configure these settings at the:

View File

@ -34,6 +34,7 @@ To authenticate to the Terraform Module Registry, you need either:
- A [personal access token](../../../api/rest/index.md#personalprojectgroup-access-tokens) with at least `read_api` rights.
- A [CI/CD job token](../../../ci/jobs/ci_job_token.md).
- A [deploy token](../../project/deploy_tokens/index.md) with the `read_package_registry` or `write_package_registry` scope, or both.
Do not use authentication methods other than the methods documented here. Undocumented authentication methods might be removed in the future.

View File

@ -289,7 +289,8 @@ To do this:
## Configure rules for target branches **(PREMIUM ALL)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127115) in GitLab 16.4 [with a flag](../../../../administration/feature_flags.md) named `target_branch_rules_flag`. Enabled by default.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127115) in GitLab 16.4 [with a flag](../../../../administration/feature_flags.md) named `target_branch_rules_flag`. Enabled by default.
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/136431) in GitLab 16.7.
Some projects use multiple long-term branches for development, like `develop` and `qa`.
In these projects, you might want to keep `main` as the default branch, but expect

View File

@ -12,7 +12,7 @@ exports[`packages_list_row renders 1`] = `
class="gl-align-items-stretch gl-display-flex gl-flex-direction-column gl-flex-grow-1 gl-justify-content-space-between gl-sm-flex-direction-row"
>
<div
class="gl-display-flex gl-flex-direction-column gl-flex-grow-1 gl-min-w-0 gl-xs-mb-3"
class="gl-display-flex gl-flex-direction-column gl-flex-grow-1 gl-mb-3 gl-min-w-0 gl-sm-mb-0"
>
<div
class="gl-align-items-center gl-display-flex gl-font-weight-bold gl-min-h-6 gl-min-w-0 gl-text-body"

View File

@ -20,7 +20,7 @@ exports[`packages_list_row renders 1`] = `
class="gl-align-items-stretch gl-display-flex gl-flex-direction-column gl-flex-grow-1 gl-justify-content-space-between gl-sm-flex-direction-row"
>
<div
class="gl-display-flex gl-flex-direction-column gl-flex-grow-1 gl-min-w-0 gl-xs-mb-3"
class="gl-display-flex gl-flex-direction-column gl-flex-grow-1 gl-mb-3 gl-min-w-0 gl-sm-mb-0"
>
<div
class="gl-align-items-center gl-display-flex gl-font-weight-bold gl-min-h-6 gl-min-w-0 gl-text-body"

View File

@ -57,6 +57,16 @@ RSpec.describe BulkImports::BatchedRelationExportService, feature_category: :imp
expect(export.batches.count).to eq(11)
end
end
context 'when an error occurs during batches creation' do
it 'does not enqueue FinishBatchedRelationExportWorker' do
allow(service).to receive(:enqueue_batch_exports).and_raise(StandardError)
expect(BulkImports::FinishBatchedRelationExportWorker).not_to receive(:perform_async)
expect { service.execute }.to raise_error(StandardError)
end
end
end
context 'when there are no batches to export' do