Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2022-05-31 18:08:16 +00:00
parent eb6b175049
commit 7dd006b7ab
79 changed files with 313 additions and 309 deletions

View File

@ -81,7 +81,7 @@ class SafeMathRenderer {
'math|Displaying this math block may cause performance issues on this page',
)}</div>
<div class="gl-alert-actions">
<button class="js-lazy-render-math btn gl-alert-action btn-primary btn-md gl-button">Display anyway</button>
<button class="js-lazy-render-math btn gl-alert-action btn-confirm btn-md gl-button">Display anyway</button>
</div>
</div>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">

View File

@ -4,7 +4,7 @@ import {
GlLink,
GlLoadingIcon,
GlPagination,
GlDeprecatedSkeletonLoading as GlSkeletonLoading,
GlSkeletonLoader,
GlSprintf,
GlTableLite,
GlTooltipDirective,
@ -25,7 +25,7 @@ export default {
GlLink,
GlLoadingIcon,
GlPagination,
GlSkeletonLoading,
GlSkeletonLoader,
GlSprintf,
GlTableLite,
NodeErrorHelpText,
@ -267,7 +267,7 @@ export default {
<template #cell(node_size)="{ item }">
<span v-if="item.nodes">{{ item.nodes.length }}</span>
<gl-skeleton-loading v-else-if="loadingNodes" :lines="1" :class="contentAlignClasses" />
<gl-skeleton-loader v-else-if="loadingNodes" :lines="1" :class="contentAlignClasses" />
<node-error-help-text
v-else-if="item.kubernetes_errors"
@ -288,7 +288,7 @@ export default {
</gl-sprintf>
</span>
<gl-skeleton-loading v-else-if="loadingNodes" :lines="1" :class="contentAlignClasses" />
<gl-skeleton-loader v-else-if="loadingNodes" :lines="1" :class="contentAlignClasses" />
<node-error-help-text
v-else-if="item.kubernetes_errors"
@ -309,7 +309,7 @@ export default {
</gl-sprintf>
</span>
<gl-skeleton-loading v-else-if="loadingNodes" :lines="1" :class="contentAlignClasses" />
<gl-skeleton-loader v-else-if="loadingNodes" :lines="1" :class="contentAlignClasses" />
<node-error-help-text
v-else-if="item.kubernetes_errors"

View File

@ -17,10 +17,14 @@ export class CiSchemaExtension {
const absoluteSchemaUrl = new URL(ciSchemaPath, gon.gitlab_url).href;
const modelFileName = instance.getModel().uri.path.split('/').pop();
registerSchema({
uri: absoluteSchemaUrl,
fileMatch: [modelFileName],
});
registerSchema(
{
uri: absoluteSchemaUrl,
fileMatch: [modelFileName],
},
// eslint-disable-next-line @gitlab/require-i18n-strings
{ customTags: ['!reference sequence'] },
);
},
};
}

View File

@ -15,6 +15,7 @@
"after_script": { "$ref": "#/definitions/after_script" },
"variables": { "$ref": "#/definitions/globalVariables" },
"cache": { "$ref": "#/definitions/cache" },
"!reference": {"$ref" : "#/definitions/!reference"},
"default": {
"type": "object",
"properties": {
@ -27,7 +28,8 @@
"retry": { "$ref": "#/definitions/retry" },
"services": { "$ref": "#/definitions/services" },
"tags": { "$ref": "#/definitions/tags" },
"timeout": { "$ref": "#/definitions/timeout" }
"timeout": { "$ref": "#/definitions/timeout" },
"!reference": {"$ref" : "#/definitions/!reference"}
},
"additionalProperties": false
},
@ -341,6 +343,13 @@
}
]
},
"!reference": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"image": {
"oneOf": [
{
@ -489,25 +498,39 @@
"type": "array",
"markdownDescription": "Rules allows for an array of individual rule objects to be evaluated in order, until one matches and dynamically provides attributes to the job. [Learn More](https://docs.gitlab.com/ee/ci/yaml/#rules).",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"if": { "$ref": "#/definitions/if" },
"changes": { "$ref": "#/definitions/changes" },
"exists": { "$ref": "#/definitions/exists" },
"variables": { "$ref": "#/definitions/variables" },
"when": { "$ref": "#/definitions/when" },
"start_in": { "$ref": "#/definitions/start_in" },
"allow_failure": { "$ref": "#/definitions/allow_failure" }
}
"anyOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"if": { "$ref": "#/definitions/if" },
"changes": { "$ref": "#/definitions/changes" },
"exists": { "$ref": "#/definitions/exists" },
"variables": { "$ref": "#/definitions/variables" },
"when": { "$ref": "#/definitions/when" },
"start_in": { "$ref": "#/definitions/start_in" },
"allow_failure": { "$ref": "#/definitions/allow_failure" }
}
},
{"type": "string", "minLength": 1},
{"type": "array", "minLength": 1, "items": { "type": "string" }}
]
}
},
"globalVariables": {
"markdownDescription": "Defines environment variables globally. Job level property overrides global variables. If a job sets `variables: {}`, all global variables are turned off. You can use the value and description keywords to define variables that are prefilled when running a pipeline manually. [Learn More](https://docs.gitlab.com/ee/ci/yaml/#variables).",
"type": "object",
"anyOf": [
{"type": "object"},
{
"type": "array",
"items": {
"type": "string"
}
}
],
"additionalProperties": {
"anyOf": [
{"type": ["string", "integer"]},
{"type": ["string", "integer", "array"]},
{
"type": "object",
"properties": {
@ -540,11 +563,21 @@
}
},
"variables": {
"type": "object",
"markdownDescription": "Defines environment variables for specific jobs. Job level property overrides global variables. If a job sets `variables: {}`, all global variables are turned off. [Learn More](https://docs.gitlab.com/ee/ci/yaml/#rulesvariables).",
"additionalProperties": {
"type": ["string", "integer"]
}
"anyOf": [
{
"type": "object",
"additionalProperties": {
"type": ["string", "integer", "array"]
}
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"timeout": {
"type": "string",
@ -889,14 +922,7 @@
},
"job": {
"allOf": [
{ "$ref": "#/definitions/job_template" },
{
"anyOf": [
{ "required": ["script"] },
{ "required": ["extends"] },
{ "required": ["trigger"] }
]
}
{ "$ref": "#/definitions/job_template" }
]
},
"job_template": {

View File

@ -67,7 +67,7 @@ export default {
</template>
</gl-table>
<gl-button :href="createUrl" category="primary" variant="info">
<gl-button :href="createUrl" category="primary" variant="confirm">
{{ $options.i18n.createServiceAccount }}
</gl-button>

View File

@ -81,7 +81,7 @@ export function registerLanguages(def, ...defs) {
languages.setLanguageConfiguration(languageId, def.conf);
}
export function registerSchema(schema) {
export function registerSchema(schema, options = {}) {
const defaults = [languages.json.jsonDefaults, languages.yaml.yamlDefaults];
defaults.forEach((d) =>
d.setDiagnosticsOptions({
@ -90,6 +90,7 @@ export function registerSchema(schema) {
hover: true,
completion: true,
schemas: [schema],
...options,
}),
);
}

View File

@ -178,7 +178,7 @@ export default {
<div class="gl-display-flex gl-justify-content-center gl-mt-5">
<gl-button
class="gl-mt-5"
variant="info"
variant="confirm"
category="primary"
:aria-label="__('Trigger manual job')"
:disabled="triggerBtnDisabled"

View File

@ -213,7 +213,7 @@ export default {
<gl-intersection-observer v-if="hasNextPage" @appear="fetchMoreJobs">
<gl-loading-icon
v-if="showLoadingSpinner"
size="md"
size="lg"
:aria-label="$options.i18n.loadingAriaLabel"
/>
</gl-intersection-observer>

View File

@ -9,7 +9,7 @@ import eventHub from '../event_hub';
export default {
primaryProps: {
text: s__('Labels|Promote Label'),
attributes: [{ variant: 'warning' }, { category: 'primary' }],
attributes: [{ variant: 'confirm' }],
},
cancelProps: {
text: __('Cancel'),

View File

@ -73,7 +73,7 @@ export default {
</script>
<template>
<div id="conflicts">
<gl-loading-icon v-if="isLoading" size="md" data-testid="loading-spinner" />
<gl-loading-icon v-if="isLoading" size="lg" data-testid="loading-spinner" />
<div v-if="hasError" class="nothing-here-block">
{{ conflictsData.errorMessage }}
</div>

View File

@ -186,7 +186,7 @@ export default {
v-track-event="getAddMetricTrackingOptions()"
data-testid="add-metric-modal-submit-button"
:disabled="!customMetricsFormIsValid"
variant="success"
variant="confirm"
@click="submitCustomMetricsForm"
>
{{ __('Save changes') }}

View File

@ -1,8 +1,5 @@
<script>
import {
GlDeprecatedSkeletonLoading as GlSkeletonLoading,
GlSafeHtmlDirective as SafeHtml,
} from '@gitlab/ui';
import { GlSkeletonLoader, GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui';
import { mapState, mapActions } from 'vuex';
import DiffFileHeader from '~/diffs/components/diff_file_header.vue';
import ImageDiffOverlay from '~/diffs/components/image_diff_overlay.vue';
@ -16,7 +13,7 @@ const FIRST_CHAR_REGEX = /^(\+|-| )/;
export default {
components: {
DiffFileHeader,
GlSkeletonLoading,
GlSkeletonLoader,
DiffViewer,
ImageDiffOverlay,
},
@ -115,7 +112,7 @@ export default {
</td>
<td v-else class="line_content js-success-lazy-load">
<span></span>
<gl-skeleton-loading />
<gl-skeleton-loader />
<span></span>
</td>
</tr>

View File

@ -137,7 +137,7 @@ export default {
{{ s__('BulkImport|Group import history') }}
</h1>
</div>
<gl-loading-icon v-if="loading" size="md" class="gl-mt-5" />
<gl-loading-icon v-if="loading" size="lg" class="gl-mt-5" />
<gl-empty-state
v-else-if="!hasHistoryItems"
:title="s__('BulkImport|No history is available')"

View File

@ -36,7 +36,7 @@ export default {
};
</script>
<template>
<gl-loading-icon v-if="loading" size="md" />
<gl-loading-icon v-if="loading" size="lg" />
<pre
v-else
><code>{{ error || s__('BulkImport|No additional information provided.') }}</code></pre>

View File

@ -137,7 +137,7 @@ export default {
{{ s__('BulkImport|Project import history') }}
</h1>
</div>
<gl-loading-icon v-if="loading" size="md" class="gl-mt-5" />
<gl-loading-icon v-if="loading" size="lg" class="gl-mt-5" />
<gl-empty-state
v-else-if="!hasHistoryItems"
:title="s__('BulkImport|No history is available')"

View File

@ -205,6 +205,7 @@ export default {
warnAboutPotentiallyUnwantedCharacters: true,
lfsEnabled: true,
requestAccessEnabled: true,
enforceAuthChecksOnUploads: true,
highlightChangesClass: false,
emailsDisabled: false,
cveIdRequestEnabled: true,
@ -309,6 +310,13 @@ export default {
packageRegistryAccessLevelEnabled() {
return this.glFeatures.packageRegistryAccessLevel;
},
showAdditonalSettings() {
if (this.glFeatures.enforceAuthChecksOnUploads) {
return true;
}
return this.visibilityLevel !== this.visibilityOptions.PRIVATE;
},
},
watch: {
@ -519,15 +527,38 @@ export default {
)
}}</span>
<span class="form-text text-muted">{{ visibilityLevelDescription }}</span>
<label v-if="visibilityLevel !== visibilityOptions.PRIVATE" class="gl-line-height-28">
<input
:value="requestAccessEnabled"
type="hidden"
name="project[request_access_enabled]"
/>
<input v-model="requestAccessEnabled" type="checkbox" />
{{ s__('ProjectSettings|Users can request access') }}
</label>
<div v-if="showAdditonalSettings" class="gl-mt-4">
<strong class="gl-display-block">{{ s__('ProjectSettings|Additional options') }}</strong>
<label
v-if="visibilityLevel !== visibilityOptions.PRIVATE"
class="gl-line-height-28 gl-font-weight-normal gl-mb-0"
>
<input
:value="requestAccessEnabled"
type="hidden"
name="project[request_access_enabled]"
/>
<input v-model="requestAccessEnabled" type="checkbox" />
{{ s__('ProjectSettings|Users can request access') }}
</label>
<label
v-if="
visibilityLevel !== visibilityOptions.PUBLIC && glFeatures.enforceAuthChecksOnUploads
"
class="gl-line-height-28 gl-font-weight-normal gl-display-block gl-mb-0"
>
<input
:value="enforceAuthChecksOnUploads"
type="hidden"
name="project[project_setting_attributes][enforce_auth_checks_on_uploads]"
/>
<input v-model="enforceAuthChecksOnUploads" type="checkbox" />
{{ s__('ProjectSettings|Require authentication to view media files') }}
<span class="gl-text-gray-500 gl-display-block gl-ml-5 gl-mt-n3">{{
s__('ProjectSettings|Prevents direct linking to potentially sensitive media files')
}}</span>
</label>
</div>
</project-setting-row>
</div>
<div

View File

@ -246,7 +246,7 @@ export default {
</template>
<template #default>
<gl-dropdown-item v-if="isBranchesLoading" key="loading">
<gl-loading-icon size="md" />
<gl-loading-icon size="lg" />
</gl-dropdown-item>
</template>
</gl-infinite-scroll>

View File

@ -127,7 +127,7 @@ export default {
<jobs-table v-else :jobs="jobs" :table-fields="$options.fields" data-testid="jobs-tab-table" />
<gl-intersection-observer v-if="jobsPageInfo.hasNextPage" @appear="fetchMoreJobs">
<gl-loading-icon v-if="showLoadingSpinner" size="md" />
<gl-loading-icon v-if="showLoadingSpinner" size="lg" />
</gl-intersection-observer>
</div>
</template>

View File

@ -84,14 +84,12 @@ export default async function initPipelineDetailsBundle() {
});
}
if (gon.features?.failedJobsTabVue) {
try {
createPipelineFailedJobsApp(SELECTORS.PIPELINE_FAILED_JOBS);
} catch {
createFlash({
message: s__('Jobs|An error occurred while loading the Failed Jobs tab.'),
});
}
try {
createPipelineFailedJobsApp(SELECTORS.PIPELINE_FAILED_JOBS);
} catch {
createFlash({
message: s__('Jobs|An error occurred while loading the Failed Jobs tab.'),
});
}
}
}

View File

@ -71,7 +71,7 @@ export default {
<gl-loading-icon
v-if="statusIcon === 'loading'"
css-class="report-block-list-loading-icon"
size="md"
size="lg"
/>
<ci-icon v-else :status="iconStatus" :size="statusIconSize" data-testid="summary-row-icon" />
</div>

View File

@ -114,7 +114,7 @@ export default {
<template>
<div class="well-segment commit gl-p-5 gl-w-full gl-display-flex">
<gl-loading-icon v-if="isLoading" size="md" color="dark" class="m-auto" />
<gl-loading-icon v-if="isLoading" size="lg" color="dark" class="m-auto" />
<template v-else-if="commit">
<user-avatar-link
v-if="commit.author"

View File

@ -64,7 +64,7 @@ export default {
</div>
</div>
<div class="blob-viewer" data-qa-selector="blob_viewer_content" itemprop="about">
<gl-loading-icon v-if="loading > 0" size="md" color="dark" class="my-4 mx-auto" />
<gl-loading-icon v-if="loading > 0" size="lg" color="dark" class="my-4 mx-auto" />
<div
v-else-if="readme"
ref="readme"

View File

@ -88,7 +88,7 @@ export default {
<template>
<div>
<div v-if="isLoading"><gl-loading-icon size="md" /></div>
<div v-if="isLoading"><gl-loading-icon size="lg" /></div>
<gl-table-lite v-else :items="report" :fields="$options.fields" foot-clone>
<template #cell(spentAt)="{ item: { spentAt } }">
<div>{{ formatDate(spentAt) }}</div>

View File

@ -105,7 +105,7 @@ export default {
</p>
</template>
<gl-loading-icon v-if="isLoading" size="md" class="gl-mt-3" />
<gl-loading-icon v-if="isLoading" size="lg" class="gl-mt-3" />
<div v-else-if="statesList">
<div v-if="statesCount">

View File

@ -167,7 +167,7 @@ export default {
</script>
<template>
<div>
<gl-loading-icon v-if="$apollo.loading" size="md" class="gl-mt-5" />
<gl-loading-icon v-if="$apollo.loading" size="lg" class="gl-mt-5" />
<template v-else>
<gl-toggle
v-model="jobTokenScopeEnabled"

View File

@ -172,7 +172,7 @@ export default {
</p>
</template>
<template v-else-if="!hasPipeline">
<gl-loading-icon size="md" />
<gl-loading-icon size="lg" />
<p
class="gl-flex-grow-1 gl-display-flex gl-ml-3 gl-mb-0"
data-testid="monitoring-pipeline-message"

View File

@ -38,7 +38,7 @@ export default {
<div class="gl-display-flex gl-align-self-start">
<div class="square s24 h-auto d-flex-center gl-mr-3">
<div v-if="isLoading" class="mr-widget-icon gl-display-inline-flex">
<gl-loading-icon size="md" class="mr-loading-icon gl-display-inline-flex" />
<gl-loading-icon size="lg" class="mr-loading-icon gl-display-inline-flex" />
</div>
<ci-icon v-else :status="statusObj" :size="24" />
</div>

View File

@ -20,8 +20,17 @@ module ProductAnalyticsTracking
def route_events_to(destinations, name, &block)
track_unique_redis_hll_event(name, &block) if destinations.include?(:redis_hll)
if destinations.include?(:snowplow) && Feature.enabled?(:route_hll_to_snowplow, tracking_namespace_source)
if destinations.include?(:snowplow) && event_enabled?(name)
Gitlab::Tracking.event(self.class.to_s, name, namespace: tracking_namespace_source, user: current_user)
end
end
def event_enabled?(event)
events_to_ff = {
g_analytics_valuestream: :route_hll_to_snowplow,
i_search_paid: :route_hll_to_snowplow_phase2
}
Feature.enabled?(events_to_ff[event.to_sym], tracking_namespace_source)
end
end

View File

@ -25,7 +25,6 @@ class Projects::PipelinesController < Projects::ApplicationController
before_action do
push_frontend_feature_flag(:pipeline_tabs_vue, @project)
push_frontend_feature_flag(:downstream_retry_action, @project)
push_frontend_feature_flag(:failed_jobs_tab_vue, @project)
end
# Will be removed with https://gitlab.com/gitlab-org/gitlab/-/issues/225596

View File

@ -18,11 +18,7 @@ class Projects::ReleasesController < Projects::ApplicationController
require_non_empty_project
end
format.json do
if Feature.enabled?(:remove_sha_from_releases_json, project)
render json: ReleaseSerializer.new.represent(releases)
else
render json: releases
end
render json: ReleaseSerializer.new.represent(releases)
end
end
end

View File

@ -46,6 +46,10 @@ class ProjectsController < Projects::ApplicationController
push_frontend_feature_flag(:package_registry_access_level)
end
before_action only: :edit do
push_frontend_feature_flag(:enforce_auth_checks_on_uploads, @project)
end
layout :determine_layout
feature_category :projects, [

View File

@ -4,6 +4,7 @@ class SearchController < ApplicationController
include ControllerWithCrossProjectAccessCheck
include SearchHelper
include RedisTracking
include ProductAnalyticsTracking
include SearchRateLimitable
RESCUE_FROM_TIMEOUT_ACTIONS = [:count, :show, :autocomplete].freeze

View File

@ -14,7 +14,7 @@ Already a pro? Just edit this README.md and make it your own. Want to make it ea
- [ ] [Create](<%= redirect("https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file") %>) or [upload](<%= redirect("https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file") %>) files
- [ ] [Add files using the command line](<%= redirect("https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line") %>) or push an existing Git repository with the following command:
```
```shell
cd existing_repo
git remote add origin <%= @project.http_url_to_repo %>
git branch -M <%= @project.default_branch_or_main %>
@ -43,52 +43,64 @@ Use the built-in continuous integration in GitLab.
- [ ] [Use pull-based deployments for improved Kubernetes management](<%= redirect("https://docs.gitlab.com/ee/user/clusters/agent/") %>)
- [ ] [Set up protected environments](<%= redirect("https://docs.gitlab.com/ee/ci/environments/protected_environments.html") %>)
***
---
# Editing this README
## Editing this README
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com) for this template.
## Suggestions for a good README
### Suggestions for a good README
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
## Name
### Name
Choose a self-explaining name for your project.
## Description
### Description
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
## Badges
### Badges
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
## Visuals
### Visuals
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
## Installation
### Installation
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
## Usage
### Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
## Support
### Support
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
## Roadmap
### Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.
## Contributing
### Contributing
State if you are open to contributions and what your requirements are for accepting them.
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
## Authors and acknowledgment
### Authors and acknowledgment
Show your appreciation to those who have contributed to the project.
## License
### License
For open source projects, say how it is licensed.
## Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
### Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.

View File

@ -4,7 +4,6 @@
- expanded = expanded_by_default?
= render 'shared/namespaces/cascading_settings/lock_popovers'
= render_if_exists 'shared/minute_limit_banner', namespace: @group
%section.settings.gs-general.no-animate.expanded#js-general-settings
.settings-header

View File

@ -3,7 +3,6 @@
- expanded = expanded_by_default?
- general_expanded = @group.errors.empty? ? expanded : true
= render_if_exists 'shared/minute_limit_banner', namespace: @group
-# Given we only have one field in this form which is also admin-only,
-# we don't want to show an empty section to non-admin users,

View File

@ -8,7 +8,6 @@
= render_if_exists 'shared/qrtly_reconciliation_alert', group: @group
= render_if_exists 'shared/free_user_cap_alert', source: @group
= render_if_exists 'shared/minute_limit_banner', namespace: @group
- if show_invite_banner?(@group)
= content_for :group_invite_members_banner do

View File

@ -1,4 +1,5 @@
- page_title _("Activity")
= render_if_exists 'shared/minute_limit_banner', namespace: @project
= render 'projects/last_push'
= render 'projects/activity'

View File

@ -8,6 +8,6 @@
- wiki_confluence_epic_link_url = 'https://gitlab.com/groups/gitlab-org/-/epics/3629'
- wiki_confluence_epic_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: wiki_confluence_epic_link_url }
= html_escape(s_("WikiEmpty|You've enabled the Confluence Workspace integration. Your wiki will be viewable directly within Confluence. We are hard at work integrating Confluence more seamlessly into GitLab. If you'd like to stay up to date, follow our %{wiki_confluence_epic_link_start}Confluence epic%{wiki_confluence_epic_link_end}.")) % { wiki_confluence_epic_link_start: wiki_confluence_epic_link_start, wiki_confluence_epic_link_end: '</a>'.html_safe }
= link_to @project.confluence_integration.confluence_url, target: '_blank', rel: 'noopener noreferrer', class: 'gl-button btn btn-success external-url', title: s_('WikiEmpty|Go to Confluence') do
= link_to @project.confluence_integration.confluence_url, target: '_blank', rel: 'noopener noreferrer', class: 'gl-button btn btn-confirm external-url', title: s_('WikiEmpty|Go to Confluence') do
= s_('WikiEmpty|Go to Confluence')
= sprite_icon('external-link')

View File

@ -1,5 +1,3 @@
= render_if_exists 'shared/minute_limit_banner', namespace: @project
- page_title _("Jobs")
- add_page_specific_style 'page_bundles/ci_status'
- admin = local_assigns.fetch(:admin, false)

View File

@ -4,6 +4,7 @@
- subscribed = params[:subscribed]
- labels_or_filters = @labels.exists? || @prioritized_labels.exists? || search.present? || subscribed.present?
= render_if_exists 'shared/minute_limit_banner', namespace: @project
- if labels_or_filters
#js-promote-label-modal
= render 'shared/labels/nav', labels_or_filters: labels_or_filters, can_admin_label: can_admin_label

View File

@ -43,4 +43,4 @@
.clearfix
.float-right
= link_to _('Cancel'), edit_project_settings_integration_path(@project, @integration), class: 'gl-button btn btn-lg'
= f.submit 'Install', class: 'gl-button btn btn-success btn-lg'
= f.submit 'Install', class: 'gl-button btn btn-confirm btn-lg'

View File

@ -1,5 +1,3 @@
= render_if_exists 'shared/minute_limit_banner', namespace: @project
- breadcrumb_title _("Schedules")
- page_title _("Pipeline Schedules")
- add_page_specific_style 'page_bundles/pipeline_schedules'

View File

@ -33,44 +33,7 @@
- if @pipeline.failed_builds.present?
#js-tab-failures.tab-pane
- if Feature.enabled?(:failed_jobs_tab_vue, @project)
#js-pipeline-failed-jobs-vue{ data: { full_path: @project.full_path, pipeline_iid: @pipeline.iid, failed_jobs_summary_data: prepare_failed_jobs_summary_data(@pipeline.failed_builds) } }
- else
.build-failures.build-page
%table.table.gl-table.responsive-table.ci-table.responsive-table-sm-rounded
%thead
%th
%th= _('Name')
%th= _('Stage')
%th= _('Failure')
%th
%tbody
- @pipeline.failed_builds.each_with_index do |build, index|
- job = build.present(current_user: current_user)
%tr.build-state.responsive-table-border-start
%td.responsive-table-cell.ci-status-icon-failed{ data: { column: _('Status')} }
.d-none.d-md-block.build-icon
= sprite_icon("status_#{build.status}")
.d-md-none.build-badge
= render "ci/status/badge", link: false, status: job.detailed_status(current_user)
%td.responsive-table-cell.build-name{ data: { column: _('Name')} }
= link_to build.name, pipeline_job_url(pipeline, build)
%td.responsive-table-cell.build-stage{ data: { column: _('Stage')} }
= build.stage.titleize
%td.responsive-table-cell.build-failure{ data: { column: _('Failure')} }
= build.present.callout_failure_message
%td.responsive-table-cell.build-actions
- if can?(current_user, :update_build, job) && job.retryable?
= link_to retry_project_job_path(build.project, build, return_to: request.original_url), method: :post, title: _('Retry'), class: 'gl-button btn btn-default btn-icon' do
= sprite_icon('repeat', css_class: 'gl-icon')
- if can?(current_user, :read_build, job)
%tr.build-log-row.responsive-table-border-end
%td
%td.responsive-table-cell.build-log-container{ colspan: 4 }
%pre.build-log.build-log-rounded
%code.bash.js-build-output
= build_summary(build)
#js-pipeline-failed-jobs-vue{ data: { full_path: @project.full_path, pipeline_iid: @pipeline.iid, failed_jobs_summary_data: prepare_failed_jobs_summary_data(@pipeline.failed_builds) } }
#js-tab-dag.tab-pane
#js-pipeline-dag-vue{ data: { pipeline_project_path: @project.full_path, pipeline_iid: @pipeline.iid, empty_svg_path: image_path('illustrations/empty-state/empty-dag-md.svg'), about_dag_doc_path: help_page_path('ci/directed_acyclic_graph/index.md'), dag_doc_path: help_page_path('ci/yaml/index.md', anchor: 'needs')} }

View File

@ -1,5 +1,3 @@
= render_if_exists 'shared/minute_limit_banner', namespace: @project
- page_title _('Pipelines')
- add_page_specific_style 'page_bundles/pipelines'
- add_page_specific_style 'page_bundles/ci_status'

View File

@ -2,6 +2,7 @@
- page_title _("Members")
= render_if_exists 'projects/free_user_cap_alert', project: @project
= render_if_exists 'shared/minute_limit_banner', namespace: @project
.row.gl-mt-3
.col-lg-12

View File

@ -1,5 +1,3 @@
= render_if_exists 'shared/minute_limit_banner', namespace: @project
- @content_class = "limit-container-width" unless fluid_layout
- page_title _("CI/CD Settings")
- page_title _("CI/CD")

View File

@ -2812,15 +2812,6 @@
:weight: 1
:idempotent: true
:tags: []
- :name: prometheus_create_default_alerts
:worker_name: Prometheus::CreateDefaultAlertsWorker
:feature_category: :incident_management
:has_external_dependencies:
:urgency: :high
:resource_boundary: :unknown
:weight: 1
:idempotent: true
:tags: []
- :name: propagate_integration
:worker_name: PropagateIntegrationWorker
:feature_category: :integrations

View File

@ -1,19 +0,0 @@
# frozen_string_literal: true
module Prometheus
class CreateDefaultAlertsWorker
include ApplicationWorker
data_consistency :always
sidekiq_options retry: 3
feature_category :incident_management
urgency :high
idempotent!
def perform(project_id)
# No-op Will be removed in https://gitlab.com/gitlab-org/gitlab/-/issues/360756
end
end
end

View File

@ -1,8 +0,0 @@
---
name: failed_jobs_tab_vue
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/86151
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/360849
milestone: '15.0'
type: development
group: group::pipeline execution
default_enabled: false

View File

@ -1,8 +0,0 @@
---
name: remove_sha_from_releases_json
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/86233
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/360903
milestone: '15.0'
type: development
group: group::release
default_enabled: false

View File

@ -363,8 +363,6 @@
- 1
- - projects_update_repository_storage
- 1
- - prometheus_create_default_alerts
- 1
- - propagate_integration
- 1
- - propagate_integration_group

View File

@ -335,11 +335,9 @@ a **secondary** with only a single node. Instead, you must do this manually.
#### Promoting a **secondary** site with an external PostgreSQL database running GitLab 14.5 and later
The `gitlab-ctl geo promote` command can be used in conjunction with
an external PostgreSQL database, but it can only perform changes on
a **secondary** PostgreSQL database managed by Omnibus.
You must promote the replica database associated with the **secondary**
site first.
The `gitlab-ctl geo promote` command can be used in conjunction with an external PostgreSQL database.
In this case, you must first manually promote the replica database associated
with the **secondary** site:
1. Promote the replica database associated with the **secondary** site. This
sets the database to read-write. The instructions vary depending on where your database is hosted:

View File

@ -36,6 +36,9 @@ Use secondary proxying for use-cases including:
- Having all Geo sites behind a single URL.
- Geographically load-balancing traffic without worrying about write access.
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
For an overview, see: [Secondary proxying using geographic load-balancer and AWS Route53](https://www.youtube.com/watch?v=TALLy7__Na8).
## Set up a unified URL for Geo sites
Secondary sites can transparently serve read-write traffic. You can

View File

@ -377,6 +377,7 @@ POST /projects/:id/releases
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](../index.md#namespaced-path-encoding). |
| `name` | string | no | The release name. |
| `tag_name` | string | yes | The tag where the release is created from. |
| `tag_message` | string | no | Message to use if creating a new annotated tag. |
| `description` | string | no | The description of the release. You can use [Markdown](../../user/markdown.md). |
| `ref` | string | yes, if `tag_name` doesn't exist | If a tag specified in `tag_name` doesn't exist, the release is created from `ref` and tagged with `tag_name`. It can be a commit SHA, another tag name, or a branch name. |
| `milestones` | array of string | no | The title of each milestone the release is associated with. [GitLab Premium](https://about.gitlab.com/pricing/) customers can specify group milestones. |

View File

@ -26,9 +26,32 @@ experience (rather than the single file editor or the Web IDE). It includes:
- The [CI/CD configuration visualization](pipeline_editor/index.md#visualize-ci-configuration),
a graphical representation of your `.gitlab-ci.yml` file.
If you prefer to use another editor, you can use a schema like
[the `gitlab-ci` schema](https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json)
with your editor of choice.
### Edit `.gitlab-ci.yml` locally
If you prefer to edit your pipeline configuration locally, you can use the
GitLab CI/CD schema in your editor to verify basic syntax issues. Any
[editor with Schemastore support](https://www.schemastore.org/json/#editors) uses
the GitLab CI/CD schema by default.
If you need to link to the schema directly, it
is at:
```plaintext
https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/editor/schema/ci.json.
```
The schema rules for custom YAML tags like `!reference` will not work until the
custom tags are set in the editor settings. For example, in VS Code, you can set
`vscode-yaml` to parse `customTags`:
```json
"yaml.customTags": [
"!reference sequence"
]
```
To see the full list of custom tags covered by the CI/CD schema, check the
latest version of the schema, linked above.
### Verify syntax with CI Lint tool

View File

@ -117,7 +117,7 @@ Install the required packages (needed to compile Ruby and native extensions to R
```shell
sudo apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libre2-dev \
libreadline-dev libncurses5-dev libffi-dev curl openssh-server libxml2-dev libxslt-dev \
libcurl4-openssl-dev libicu-dev logrotate rsync python-docutils pkg-config cmake runit-systemd
libcurl4-openssl-dev libicu-dev logrotate rsync python3-docutils pkg-config cmake runit-systemd
```
If you want to use Kerberos for user authentication, install `libkrb5-dev`

View File

@ -241,7 +241,7 @@ You can hover your mouse on the **Renew** button to see the date when it will be
1. Review your renewal details and complete the payment process.
1. Select **Confirm purchase**.
Your updated subscription is applied to your namespace on the renewal period start date.
Your updated subscription is applied to your namespace on the renewal period start date. It may take up to one day for the renewal to be processed.
An invoice is generated for the renewal and available for viewing or download on the [View invoices](https://customers.gitlab.com/receipts) page.
If you have difficulty during the renewal process, contact the [Support team](https://support.gitlab.com/hc/en-us/requests/new?ticket_form_id=360000071293) for assistance.
@ -249,14 +249,14 @@ If you have difficulty during the renewal process, contact the [Support team](ht
For details on upgrading your subscription tier, see
[Upgrade your GitLab SaaS subscription tier](#upgrade-your-gitlab-saas-subscription-tier).
### Automatic renewal
### Automatic subscription renewal
When you enable automatic renewal, the subscription automatically renews on the
expiration date without a gap in available service. An invoice is
generated for the renewal and available for viewing or download on the
[View invoices](https://customers.gitlab.com/receipts) page.
#### Enable or disable automatic renewal
#### Enable or disable automatic subscription renewal
To view or change automatic subscription renewal (at the same tier as the
previous period), log in to the [Customers Portal](https://customers.gitlab.com/customers/sign_in), and:
@ -312,8 +312,8 @@ locked. Projects can only be unlocked by purchasing more storage subscription un
You can purchase a storage subscription for your personal or group namespace.
NOTE:
Storage subscriptions **[renew automatically](#automatic-renewal) each year**.
You can [cancel the subscription](#enable-or-disable-automatic-renewal) to disable the automatic renewal.
Storage subscriptions **[renew automatically](#automatic-subscription-renewal) each year**.
You can [cancel the subscription](#enable-or-disable-automatic-subscription-renewal) to disable the automatic renewal.
#### For your personal namespace

View File

@ -9,7 +9,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
[Burndown](#burndown-charts) and [burnup](#burnup-charts) charts show the progress of completing a milestone.
![burndown and burnup chart](img/burndown_and_burnup_charts_v13_6.png)
![burndown and burnup chart](img/burndown_and_burnup_charts_v15_1.png)
## Burndown charts
@ -19,7 +19,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
Burndown charts show the number of issues over the course of a milestone.
![burndown chart](img/burndown_chart_v13_6.png)
![burndown chart](img/burndown_chart_v15_1.png)
At a glance, you see the current state for the completion a given milestone.
Without them, you would have to organize the data from the milestone and plot it
@ -106,7 +106,7 @@ Reopened issues are considered as having been opened on the day after they were
Burnup charts show the assigned and completed work for a milestone.
![burnup chart](img/burnup_chart_v13_6.png)
![burnup chart](img/burnup_chart_v15_1.png)
To view a project's burnup chart:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -156,7 +156,7 @@ There are also tabs below these that show the following:
The milestone view contains a [burndown and burnup chart](burndown_and_burnup_charts.md),
showing the progress of completing a milestone.
![burndown chart](img/burndown_and_burnup_charts_v13_6.png)
![burndown chart](img/burndown_and_burnup_charts_v15_1.png)
### Milestone sidebar

View File

@ -107,9 +107,10 @@ module API
end
params do
requires :tag_name, type: String, desc: 'The name of the tag', as: :tag
optional :tag_message, type: String, desc: 'Message to use if creating a new annotated tag'
optional :name, type: String, desc: 'The name of the release'
optional :description, type: String, desc: 'The release notes'
optional :ref, type: String, desc: 'The commit sha or branch name'
optional :ref, type: String, desc: 'Commit SHA or branch name to use if creating a new tag'
optional :assets, type: Hash do
optional :links, type: Array do
requires :name, type: String, desc: 'The name of the link'

View File

@ -325,11 +325,6 @@ msgid_plural "%d more comments"
msgstr[0] ""
msgstr[1] ""
msgid "%d open issue"
msgid_plural "%d open issues"
msgstr[0] ""
msgstr[1] ""
msgid "%d pending comment"
msgid_plural "%d pending comments"
msgstr[0] ""
@ -360,6 +355,11 @@ msgid_plural "%d projects selected"
msgstr[0] ""
msgstr[1] ""
msgid "%d remaining"
msgid_plural "%d remaining"
msgstr[0] ""
msgstr[1] ""
msgid "%d second"
msgid_plural "%d seconds"
msgstr[0] ""
@ -1066,7 +1066,7 @@ msgstr ""
msgid "%{total_warnings} warning(s) found:"
msgstr ""
msgid "%{total} open issue weight"
msgid "%{total} remaining issue weight"
msgstr ""
msgid "%{total} warnings found: showing first %{warningsDisplayed}"
@ -1455,9 +1455,6 @@ msgstr[1] ""
msgid "1-9 contributions"
msgstr ""
msgid "1. Effective June 1, 2022, all GitLab Free tier public projects will be %{minutes_quota_link}."
msgstr ""
msgid "10-19 contributions"
msgstr ""
@ -1470,9 +1467,6 @@ msgstr ""
msgid "1st contribution!"
msgstr ""
msgid "2. Before July 1, 2022, all GitLab Free tier public open source projects must %{enrollment_link} to continue to receive GitLab Ultimate benefits."
msgstr ""
msgid "20-29 contributions"
msgstr ""
@ -5764,6 +5758,9 @@ msgstr ""
msgid "Be careful. Renaming a project's repository can have unintended side effects."
msgstr ""
msgid "Before July 1, 2022, all free tier public open source projects must %{enrollment_link} to continue to receive GitLab Ultimate benefits."
msgstr ""
msgid "Before enabling this integration, create a webhook for the room in Google Chat where you want to receive notifications from this project. %{docs_link}"
msgstr ""
@ -6784,10 +6781,7 @@ msgstr ""
msgid "Burndown chart"
msgstr ""
msgid "BurndownChartLabel|Open issue weight"
msgstr ""
msgid "BurndownChartLabel|Open issues"
msgid "BurndownChartLabel|Remaining"
msgstr ""
msgid "Burnup chart"
@ -7416,7 +7410,7 @@ msgstr ""
msgid "Changes the title to \"%{title_param}\"."
msgstr ""
msgid "Changes to GitLab Free tier public projects"
msgid "Changes to free tier open source projects"
msgstr ""
msgid "Changes to the title have not been saved"
@ -29731,6 +29725,9 @@ msgstr ""
msgid "ProjectSettings|%{link_start}What variables can I use?%{link_end}"
msgstr ""
msgid "ProjectSettings|Additional options"
msgstr ""
msgid "ProjectSettings|Additional settings that influence how and when merges are done."
msgstr ""
@ -29944,6 +29941,9 @@ msgstr ""
msgid "ProjectSettings|Pipelines must succeed"
msgstr ""
msgid "ProjectSettings|Prevents direct linking to potentially sensitive media files"
msgstr ""
msgid "ProjectSettings|Private"
msgstr ""
@ -29962,6 +29962,9 @@ msgstr ""
msgid "ProjectSettings|Require an associated issue from Jira"
msgstr ""
msgid "ProjectSettings|Require authentication to view media files"
msgstr ""
msgid "ProjectSettings|Requirements"
msgstr ""
@ -37941,6 +37944,9 @@ msgstr ""
msgid "The issue was successfully promoted to an epic. Redirecting to epic..."
msgstr ""
msgid "The last owner cannot be set to awaiting"
msgstr ""
msgid "The latest artifacts created by jobs in the most recent successful pipeline will be stored."
msgstr ""
@ -38313,6 +38319,9 @@ msgstr ""
msgid "There is no data available. Please change your selection."
msgstr ""
msgid "There is no seat left to activate the member"
msgstr ""
msgid "There is no table data available."
msgstr ""
@ -43457,6 +43466,9 @@ msgstr ""
msgid "You cannot access the raw file. Please wait a minute."
msgstr ""
msgid "You cannot approve all pending members on a free plan"
msgstr ""
msgid "You cannot approve your own deployment."
msgstr ""
@ -43481,6 +43493,9 @@ msgstr ""
msgid "You cannot rename an environment after it's created."
msgstr ""
msgid "You cannot set yourself to awaiting"
msgstr ""
msgid "You cannot write to a read-only secondary GitLab Geo instance. Please use %{link_to_primary_node} instead."
msgstr ""

View File

@ -25,7 +25,7 @@ module QA
end
def sandbox_name
@sandbox_name ||= Runtime::Env.sandbox_name || "gitlab-qa-sandbox-group-#{Time.now.wday}"
@sandbox_name ||= Runtime::Env.sandbox_name || "gitlab-qa-sandbox-group-#{Time.now.wday + 1}"
end
end
end

View File

@ -46,7 +46,7 @@ module QA
end
def fetch_group_id
group_name = ENV['TOP_LEVEL_GROUP_NAME'] || 'gitlab-qa-sandbox-group'
group_name = ENV['TOP_LEVEL_GROUP_NAME'] || "gitlab-qa-sandbox-group-#{Time.now.wday + 1}"
group_search_response = get Runtime::API::Request.new(@api_client, "/groups/#{group_name}").url
JSON.parse(group_search_response.body)["id"]
end

View File

@ -39,7 +39,7 @@ module QA
end
def fetch_group_id
group_name = ENV['TOP_LEVEL_GROUP_NAME'] || 'gitlab-qa-sandbox-group'
group_name = ENV['TOP_LEVEL_GROUP_NAME'] || "gitlab-qa-sandbox-group-#{Time.now.wday + 1}"
group_search_response = get Runtime::API::Request.new(@api_client, "/groups/#{group_name}" ).url
JSON.parse(group_search_response.body)["id"]
end

View File

@ -122,7 +122,7 @@ module QA
transformed_values = resources.transform_values! do |v|
v.reject do |attributes|
attributes['info'] == "with full_path 'gitlab-qa-sandbox-group'" ||
attributes['info'].match(/with full_path 'gitlab-qa-sandbox-group(-\d)?'/) ||
attributes['http_method'] == 'get' && !attributes['info']&.include?("with username 'qa-") ||
attributes['api_path'] == 'Cannot find resource API path'
end

View File

@ -115,15 +115,6 @@ RSpec.describe Projects::ReleasesController do
expect(json_response.map { |release| release["id"] } ).to eq([release_2.id, release_1.id])
end
# TODO: remove in https://gitlab.com/gitlab-org/gitlab/-/issues/360903
it "returns release sha when remove_sha_from_releases_json is disabled" do
stub_feature_flags(remove_sha_from_releases_json: false)
get_index
expect(json_response).to eq([release_2, release_1].as_json)
end
it_behaves_like 'common access controls'
context 'when the project is private and the user is not logged in' do

View File

@ -1156,37 +1156,6 @@ RSpec.describe 'Pipeline', :js do
expect(page).to have_content('There is an unknown failure, please try again')
end
context 'when failed_jobs_tab_vue feature flag is disabled' do
before do
stub_feature_flags(failed_jobs_tab_vue: false)
end
context 'when user does not have permission to retry build' do
it 'shows retry button for failed build' do
subject
page.within(find('.build-failures', match: :first)) do
expect(page).not_to have_link('Retry')
end
end
end
context 'when user does have permission to retry build' do
before do
create(:protected_branch, :developers_can_merge,
name: pipeline.ref, project: project)
end
it 'shows retry button for failed build' do
subject
page.within(find('.build-failures', match: :first)) do
expect(page).to have_link('Retry')
end
end
end
end
context 'when user does not have permission to retry build' do
it 'shows retry button for failed build' do
subject

View File

@ -1,9 +1,4 @@
import {
GlLoadingIcon,
GlPagination,
GlDeprecatedSkeletonLoading as GlSkeletonLoading,
GlTableLite,
} from '@gitlab/ui';
import { GlLoadingIcon, GlPagination, GlSkeletonLoader, GlTableLite } from '@gitlab/ui';
import * as Sentry from '@sentry/browser';
import { mount } from '@vue/test-utils';
import MockAdapter from 'axios-mock-adapter';
@ -171,7 +166,7 @@ describe('Clusters', () => {
if (nodeSize) {
expect(size.text()).toBe(nodeSize);
} else {
expect(size.find(GlSkeletonLoading).exists()).toBe(true);
expect(size.findComponent(GlSkeletonLoader).exists()).toBe(true);
}
});
});
@ -195,7 +190,7 @@ describe('Clusters', () => {
const size = sizes.at(lineNumber);
expect(size.text()).toContain(nodeText);
expect(size.find(GlSkeletonLoading).exists()).toBe(false);
expect(size.findComponent(GlSkeletonLoader).exists()).toBe(false);
});
});
@ -221,12 +216,12 @@ describe('Clusters', () => {
describe('cluster CPU', () => {
it.each`
clusterCpu | lineNumber
${''} | ${0}
${'Loading'} | ${0}
${'1.93 (87% free)'} | ${1}
${'3.87 (86% free)'} | ${2}
${'(% free)'} | ${3}
${'(% free)'} | ${4}
${''} | ${5}
${'Loading'} | ${5}
`('renders total cpu for each cluster', ({ clusterCpu, lineNumber }) => {
const clusterCpus = findTable().findAll('td:nth-child(4)');
const cpuData = clusterCpus.at(lineNumber);
@ -238,12 +233,12 @@ describe('Clusters', () => {
describe('cluster Memory', () => {
it.each`
clusterMemory | lineNumber
${''} | ${0}
${'Loading'} | ${0}
${'5.92 (78% free)'} | ${1}
${'12.86 (79% free)'} | ${2}
${'(% free)'} | ${3}
${'(% free)'} | ${4}
${''} | ${5}
${'Loading'} | ${5}
`('renders total memory for each cluster', ({ clusterMemory, lineNumber }) => {
const clusterMemories = findTable().findAll('td:nth-child(5)');
const memoryData = clusterMemories.at(lineNumber);

View File

@ -928,6 +928,22 @@ RSpec.describe API::Releases do
expect(json_response['message']).to eq('Tag name invalid')
end
end
context 'when tag_message is provided' do
let(:tag_message) { 'Annotated tag message created by Release API' }
before do
params.merge!(tag_message: tag_message)
end
it 'creates an annotated tag with the tag message' do
expect do
post api("/projects/#{project.id}/releases", maintainer), params: params
end.to change { Project.find_by_id(project.id).repository.tag_count }.by(1)
expect(project.repository.find_tag(tag_name).message).to eq(tag_message)
end
end
end
context 'when release already exists' do

View File

@ -6,10 +6,11 @@ RSpec.describe Releases::CreateService do
let(:project) { create(:project, :repository) }
let(:user) { create(:user) }
let(:tag_name) { project.repository.tag_names.first }
let(:tag_message) { nil }
let(:tag_sha) { project.repository.find_tag(tag_name).dereferenced_target.sha }
let(:name) { 'Bionic Beaver' }
let(:description) { 'Awesome release!' }
let(:params) { { tag: tag_name, name: name, description: description, ref: ref } }
let(:params) { { tag: tag_name, name: name, description: description, ref: ref, tag_message: tag_message } }
let(:ref) { nil }
let(:service) { described_class.new(project, user, params) }
@ -68,6 +69,24 @@ RSpec.describe Releases::CreateService do
expect(result[:tag]).not_to be_nil
expect(result[:release]).not_to be_nil
end
context 'and tag_message is provided' do
let(:ref) { 'master' }
let(:tag_name) { 'foobar' }
let(:tag_message) { 'Annotated tag message' }
it_behaves_like 'a successful release creation'
it 'creates a tag if the tag does not exist' do
expect(project.repository.ref_exists?("refs/tags/#{tag_name}")).to be_falsey
result = service.execute
expect(result[:status]).to eq(:success)
expect(result[:tag]).not_to be_nil
expect(result[:release]).not_to be_nil
expect(project.repository.find_tag(tag_name).message).to eq(tag_message)
end
end
end
context 'there already exists a release on a tag' do

View File

@ -133,13 +133,13 @@ RSpec.shared_context 'group navbar structure' do
nav_sub_items: [
_('General'),
_('Integrations'),
_('Webhooks'),
_('Access Tokens'),
_('Projects'),
_('Repository'),
_('CI/CD'),
_('Applications'),
_('Packages & Registries'),
_('Webhooks')
_('Packages & Registries')
]
}
end

View File

@ -385,7 +385,6 @@ RSpec.describe 'Every Sidekiq worker' do
'Projects::ScheduleBulkRepositoryShardMovesWorker' => 3,
'Projects::UpdateRepositoryStorageWorker' => 3,
'Projects::RefreshBuildArtifactsSizeStatisticsWorker' => 0,
'Prometheus::CreateDefaultAlertsWorker' => 3,
'PropagateIntegrationGroupWorker' => 3,
'PropagateIntegrationInheritDescendantWorker' => 3,
'PropagateIntegrationInheritWorker' => 3,

View File

@ -1,13 +0,0 @@
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Prometheus::CreateDefaultAlertsWorker do
let_it_be(:project) { create(:project) }
subject { described_class.new.perform(project.id) }
it 'does nothing' do
expect { subject }.not_to change { PrometheusAlert.count }
end
end