Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-12-09 18:14:48 +00:00
parent 750deb2501
commit f6115a0f2c
22 changed files with 53 additions and 111 deletions

View File

@ -8,8 +8,8 @@ import { initIssuableApp, initIssueHeaderActions } from '~/issues/show/issue';
import { parseIssuableData } from '~/issues/show/utils/parse_data';
import initNotesApp from '~/notes';
import { store } from '~/notes/stores';
import initRelatedMergeRequestsApp from '~/related_merge_requests';
import initSentryErrorStackTraceApp from '~/sentry_error_stack_trace';
import initRelatedMergeRequestsApp from '~/issues/related_merge_requests';
import initSentryErrorStackTraceApp from '~/issues/sentry_error_stack_trace';
import initIssuableHeaderWarning from '~/issuable/init_issuable_header_warning';
import ZenMode from '~/zen_mode';

View File

@ -21,9 +21,6 @@ export const i18n = {
),
viewBtn: s__('Pipeline|View pipeline'),
viewCommit: s__('Pipeline|View commit'),
pipelineNotTriggeredMsg: s__(
'Pipeline|No pipeline was triggered for the latest changes due to the current CI/CD configuration.',
),
};
export default {
@ -79,22 +76,16 @@ export default {
result(res) {
if (res.data?.project?.pipeline) {
this.hasError = false;
} else {
this.hasError = true;
this.pipelineNotTriggered = true;
}
},
error() {
this.hasError = true;
this.networkError = true;
},
pollInterval: POLL_INTERVAL,
},
},
data() {
return {
networkError: false,
pipelineNotTriggered: false,
hasError: false,
};
},
@ -148,16 +139,8 @@ export default {
</div>
</template>
<template v-else-if="hasError">
<div v-if="networkError">
<gl-icon class="gl-mr-auto" name="warning-solid" />
<span data-testid="pipeline-error-msg">{{ $options.i18n.fetchError }}</span>
</div>
<div v-else>
<gl-icon class="gl-mr-auto" name="information-o" />
<span data-testid="pipeline-not-triggered-error-msg">
{{ $options.i18n.pipelineNotTriggeredMsg }}
</span>
</div>
<gl-icon class="gl-mr-auto" name="warning-solid" />
<span data-testid="pipeline-error-msg">{{ $options.i18n.fetchError }}</span>
</template>
<template v-else>
<div class="gl-text-truncate gl-md-max-w-50p gl-mr-1">

View File

@ -6,27 +6,29 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# GraphQL API **(FREE)**
> - [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/19008) in GitLab 11.0 (enabled by feature flag `graphql`).
> - [Always enabled](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/30444) in GitLab 12.1.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/19008) in GitLab 11.0 [with a flag](../../administration/feature_flags.md) named `graphql`.
> - [Enabled](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/30444) in GitLab 12.1.
## Getting Started
[GraphQL](https://graphql.org/) is a query language for APIs. You can use it to
request the exact data you need, and therefore limit the number of requests you need.
For those new to the GitLab GraphQL API, see
[Getting started with GitLab GraphQL API](getting_started.md).
GraphQL data is arranged in types, so your client can use
[client-side GraphQL libraries](https://graphql.org/code/#graphql-clients)
to consume the API and avoid manual parsing.
### Quick Reference
There are no fixed endpoints and no data model, so you can add
to the API without creating [breaking changes](../../development/contributing/#breaking-changes).
This enables us to have a [versionless API](https://graphql.org/learn/best-practices/#versioning).
- The GitLab GraphQL API endpoint is located at `/api/graphql`.
- Get an [introduction to GraphQL from graphql.org](https://graphql.org/).
- GitLab supports a wide range of resources, listed in the [GraphQL API Reference](reference/index.md).
## Work with GraphQL
### Examples
If you're new to the GitLab GraphQL API, see [Get started with GitLab GraphQL API](getting_started.md).
To work with sample queries that pull data from public projects on GitLab.com,
see the menu options in the left-hand
documentation menu, under API > GraphQL at `https://docs.gitlab.com/ee/api/graphql/`.
You can view the available resources in the [GraphQL API reference](reference/index.md).
The reference is automatically generated from the GitLab GraphQL schema and
written to a Markdown file.
The [Getting started](getting_started.md) page includes different methods to customize GraphQL queries.
The GitLab GraphQL API endpoint is located at `/api/graphql`.
### GraphiQL
@ -34,23 +36,26 @@ Explore the GraphQL API using the interactive [GraphiQL explorer](https://gitlab
or on your self-managed GitLab instance on
`https://<your-gitlab-site.com>/-/graphql-explorer`.
See the [GitLab GraphQL overview](getting_started.md#graphiql) for more information about the GraphiQL Explorer.
For more information, see [GraphiQL](getting_started.md#graphiql).
## What is GraphQL?
### View GraphQL examples
[GraphQL](https://graphql.org/) is a query language for APIs that
allows clients to request exactly the data they need, making it
possible to get all required data in a limited number of requests.
You can work with sample queries that pull data from public projects on GitLab.com:
The GraphQL data (fields) can be described in the form of types,
allowing clients to use [client-side GraphQL
libraries](https://graphql.org/code/#graphql-clients) to consume the
API and avoid manual parsing.
- [Create an audit report](audit_report.md)
- [Identify issue boards](sample_issue_boards.md)
- [Query users](users_example.md)
- [Use custom emojis](custom_emoji.md)
Since there's no fixed endpoints and data model, new abilities can be
added to the API without creating [breaking changes](../../development/contributing/#breaking-changes). This allows us to
have a versionless API as described in [the GraphQL
documentation](https://graphql.org/learn/best-practices/#versioning).
The [get started](getting_started.md) page includes different methods to customize GraphQL queries.
### Update the GraphQL API reference
If you change the GraphQL schema, create a merge request to get your changes approved.
To generate the required documentation and schema, see
[Rake tasks for developers](../../development/rake_tasks.md#update-graphql-documentation-and-schema-definitions).
Run the commands using the [GitLab Development Kit](https://gitlab.com/gitlab-org/gitlab-development-kit/).
## Vision
@ -240,17 +245,3 @@ If mutation is detected as potential spam and a CAPTCHA service is configured:
}
}
```
## Reference
The GitLab GraphQL reference [is available](reference/index.md).
It is automatically generated from the GitLab GraphQL schema and embedded in a Markdown file.
## Generate updates for documentation
If you've changed the GraphQL schema, you should set up an MR to gain approval of your changes.
To generate the required documentation and schema, follow the instructions given in the
[Rake tasks for developers](../../development/rake_tasks.md#update-graphql-documentation-and-schema-definitions) page.
Be sure to run these commands using the [GitLab Development Kit](https://gitlab.com/gitlab-org/gitlab-development-kit/).

View File

@ -833,7 +833,7 @@ field :id, GraphQL::Types::ID, description: 'ID of the resource.'
Descriptions of fields and arguments are viewable to users through:
- The [GraphiQL explorer](#graphiql).
- The [static GraphQL API reference](../api/graphql/#reference).
- The [static GraphQL API reference](../api/graphql/reference/index.md).
### Description style guide

View File

@ -130,9 +130,9 @@ immediately after merge by the developer or maintainer. For this,
create an issue using the [Doc Review description template](https://gitlab.com/gitlab-org/gitlab/-/issues/new?issuable_template=Doc%20Review)
and link to it from the merged merge request that introduced the documentation change.
Circumstances, where a regular pre-merge Technical Writer review might be skipped, include:
Circumstances in which a regular pre-merge Technical Writer review might be skipped include:
- There is a short amount of time left before the milestone release. If less than three
- There is a short amount of time left before the milestone release. If fewer than three
days are remaining, seek a post-merge review and ping the writer via Slack to ensure the review is
completed as soon as possible.
- The size of the change is small and you have a high degree of confidence

View File

@ -1,18 +1,9 @@
---
stage: none
group: unassigned
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
redirect_to: '../index.md'
remove_date: '2022-03-08'
---
# GitLab Pivotal Tile **(PREMIUM SELF)**
This document was removed. For information about installing GitLab, see [this page](../index.md).
WARNING:
As of September 13, 2017, the GitLab Enterprise Plus for Pivotal Cloud Foundry
tile on Pivotal Network has reached its End of Availability ("EoA") and is no
longer available for download or sale through Pivotal. Current customers with
active subscriptions continue to receive support from GitLab through their
subscription term. Pivotal and GitLab are collaborating on creating a new
Kubernetes-based tile for the Pivotal Container Service. Please contact GitLab
support with any questions regarding GitLab Enterprise Plus for Pivotal Cloud Foundry.
Original article: <https://docs.pivotal.io/partners/gitlab/index.html>.
<!-- This redirect file can be deleted after <2022-03-08>. -->
<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/#move-or-rename-a-page -->

View File

@ -26000,9 +26000,6 @@ msgstr ""
msgid "Pipeline|Merged result pipeline"
msgstr ""
msgid "Pipeline|No pipeline was triggered for the latest changes due to the current CI/CD configuration."
msgstr ""
msgid "Pipeline|Passed"
msgstr ""

View File

@ -2,7 +2,7 @@
module QA
RSpec.describe 'Create' do
context 'Praefect repository commands', :orchestrated, :gitaly_cluster do
context 'Praefect repository commands', :orchestrated, :gitaly_cluster, quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/347415', type: :investigating } do
let(:praefect_manager) { Service::PraefectManager.new }
let(:repo1) { { "relative_path" => "@hashed/repo1.git", "storage" => "gitaly1", "virtual_storage" => "default" } }

View File

@ -2,8 +2,8 @@ import { mount, createLocalVue } from '@vue/test-utils';
import MockAdapter from 'axios-mock-adapter';
import mockData from 'test_fixtures/issues/related_merge_requests.json';
import axios from '~/lib/utils/axios_utils';
import RelatedMergeRequests from '~/related_merge_requests/components/related_merge_requests.vue';
import createStore from '~/related_merge_requests/store/index';
import RelatedMergeRequests from '~/issues/related_merge_requests/components/related_merge_requests.vue';
import createStore from '~/issues/related_merge_requests/store/index';
import RelatedIssuableItem from '~/vue_shared/components/issue/related_issuable_item.vue';
const API_ENDPOINT = '/api/v4/projects/2/issues/33/related_merge_requests';

View File

@ -2,8 +2,8 @@ import MockAdapter from 'axios-mock-adapter';
import testAction from 'helpers/vuex_action_helper';
import createFlash from '~/flash';
import axios from '~/lib/utils/axios_utils';
import * as actions from '~/related_merge_requests/store/actions';
import * as types from '~/related_merge_requests/store/mutation_types';
import * as actions from '~/issues/related_merge_requests/store/actions';
import * as types from '~/issues/related_merge_requests/store/mutation_types';
jest.mock('~/flash');

View File

@ -1,5 +1,5 @@
import * as types from '~/related_merge_requests/store/mutation_types';
import mutations from '~/related_merge_requests/store/mutations';
import * as types from '~/issues/related_merge_requests/store/mutation_types';
import mutations from '~/issues/related_merge_requests/store/mutations';
describe('RelatedMergeRequests Store Mutations', () => {
describe('SET_INITIAL_STATE', () => {

View File

@ -2,7 +2,7 @@ import { GlLoadingIcon } from '@gitlab/ui';
import { createLocalVue, shallowMount } from '@vue/test-utils';
import Vuex from 'vuex';
import Stacktrace from '~/error_tracking/components/stacktrace.vue';
import SentryErrorStackTrace from '~/sentry_error_stack_trace/components/sentry_error_stack_trace.vue';
import SentryErrorStackTrace from '~/issues/sentry_error_stack_trace/components/sentry_error_stack_trace.vue';
const localVue = createLocalVue();
localVue.use(Vuex);

View File

@ -39,8 +39,6 @@ describe('Pipeline Status', () => {
const findPipelineId = () => wrapper.find('[data-testid="pipeline-id"]');
const findPipelineCommit = () => wrapper.find('[data-testid="pipeline-commit"]');
const findPipelineErrorMsg = () => wrapper.find('[data-testid="pipeline-error-msg"]');
const findPipelineNotTriggeredErrorMsg = () =>
wrapper.find('[data-testid="pipeline-not-triggered-error-msg"]');
const findPipelineLoadingMsg = () => wrapper.find('[data-testid="pipeline-loading-msg"]');
const findPipelineViewBtn = () => wrapper.find('[data-testid="pipeline-view-btn"]');
const findStatusIcon = () => wrapper.find('[data-testid="pipeline-status-icon"]');
@ -119,8 +117,7 @@ describe('Pipeline Status', () => {
await waitForPromises();
});
it('renders api error', () => {
expect(findPipelineNotTriggeredErrorMsg().exists()).toBe(false);
it('renders error', () => {
expect(findIcon().attributes('name')).toBe('warning-solid');
expect(findPipelineErrorMsg().text()).toBe(i18n.fetchError);
});
@ -132,22 +129,5 @@ describe('Pipeline Status', () => {
expect(findPipelineViewBtn().exists()).toBe(false);
});
});
describe('when pipeline is null', () => {
beforeEach(() => {
mockPipelineQuery.mockResolvedValue({
data: { project: { id: '1', pipeline: null } },
});
createComponentWithApollo();
waitForPromises();
});
it('renders pipeline not triggered error', () => {
expect(findPipelineErrorMsg().exists()).toBe(false);
expect(findIcon().attributes('name')).toBe('information-o');
expect(findPipelineNotTriggeredErrorMsg().text()).toBe(i18n.pipelineNotTriggeredMsg);
});
});
});
});