Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
a28eb91c64
commit
533d1ccc98
2
Gemfile
2
Gemfile
|
|
@ -49,7 +49,7 @@ gem 'omniauth-shibboleth', '~> 1.3.0'
|
|||
gem 'omniauth-twitter', '~> 1.4'
|
||||
gem 'omniauth_crowd', '~> 2.4.0'
|
||||
gem 'omniauth-authentiq', '~> 0.3.3'
|
||||
gem 'omniauth_openid_connect', '~> 0.3.5'
|
||||
gem 'gitlab-omniauth-openid-connect', '~> 0.4.0', require: 'omniauth_openid_connect'
|
||||
gem 'omniauth-salesforce', '~> 1.0.5'
|
||||
gem 'omniauth-atlassian-oauth2', '~> 0.2.0'
|
||||
gem 'rack-oauth2', '~> 1.16.0'
|
||||
|
|
|
|||
14
Gemfile.lock
14
Gemfile.lock
|
|
@ -477,6 +477,10 @@ GEM
|
|||
gitlab-mail_room (0.0.9)
|
||||
gitlab-markup (1.7.1)
|
||||
gitlab-net-dns (0.9.1)
|
||||
gitlab-omniauth-openid-connect (0.4.0)
|
||||
addressable (~> 2.7)
|
||||
omniauth (~> 1.9)
|
||||
openid_connect (~> 1.2)
|
||||
gitlab-pry-byebug (3.9.0)
|
||||
byebug (~> 11.0)
|
||||
pry (~> 0.13.0)
|
||||
|
|
@ -872,12 +876,8 @@ GEM
|
|||
activesupport
|
||||
nokogiri (>= 1.4.4)
|
||||
omniauth (~> 1.0)
|
||||
omniauth_openid_connect (0.3.5)
|
||||
addressable (~> 2.5)
|
||||
omniauth (~> 1.9)
|
||||
openid_connect (~> 1.1)
|
||||
open4 (1.3.4)
|
||||
openid_connect (1.1.8)
|
||||
openid_connect (1.2.0)
|
||||
activemodel
|
||||
attr_required (>= 1.0.0)
|
||||
json-jwt (>= 1.5.0)
|
||||
|
|
@ -1230,7 +1230,7 @@ GEM
|
|||
state_machines-activerecord (0.8.0)
|
||||
activerecord (>= 5.1)
|
||||
state_machines-activemodel (>= 0.8.0)
|
||||
swd (1.1.2)
|
||||
swd (1.2.0)
|
||||
activesupport (>= 3)
|
||||
attr_required (>= 0.0.5)
|
||||
httpclient (>= 2.4)
|
||||
|
|
@ -1454,6 +1454,7 @@ DEPENDENCIES
|
|||
gitlab-mail_room (~> 0.0.9)
|
||||
gitlab-markup (~> 1.7.1)
|
||||
gitlab-net-dns (~> 0.9.1)
|
||||
gitlab-omniauth-openid-connect (~> 0.4.0)
|
||||
gitlab-pry-byebug
|
||||
gitlab-sidekiq-fetcher (= 0.5.6)
|
||||
gitlab-styles (~> 6.2.0)
|
||||
|
|
@ -1537,7 +1538,6 @@ DEPENDENCIES
|
|||
omniauth-shibboleth (~> 1.3.0)
|
||||
omniauth-twitter (~> 1.4)
|
||||
omniauth_crowd (~> 2.4.0)
|
||||
omniauth_openid_connect (~> 0.3.5)
|
||||
org-ruby (~> 0.9.12)
|
||||
parallel (~> 1.19)
|
||||
parslet (~> 1.8)
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import commitCIFile from '../../graphql/mutations/commit_ci_file.mutation.graphq
|
|||
import getCommitSha from '../../graphql/queries/client/commit_sha.graphql';
|
||||
import getCurrentBranch from '../../graphql/queries/client/current_branch.graphql';
|
||||
import getIsNewCiConfigFile from '../../graphql/queries/client/is_new_ci_config_file.graphql';
|
||||
import getPipelineEtag from '../../graphql/queries/client/pipeline_etag.graphql';
|
||||
|
||||
import CommitForm from './commit_form.vue';
|
||||
|
||||
|
|
@ -94,10 +95,15 @@ export default {
|
|||
},
|
||||
update(store, { data }) {
|
||||
const commitSha = data?.commitCreate?.commit?.sha;
|
||||
const pipelineEtag = data?.commitCreate?.commit?.commitPipelinePath;
|
||||
|
||||
if (commitSha) {
|
||||
store.writeQuery({ query: getCommitSha, data: { commitSha } });
|
||||
}
|
||||
|
||||
if (pipelineEtag) {
|
||||
store.writeQuery({ query: getPipelineEtag, data: { pipelineEtag } });
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,11 @@ import { truncateSha } from '~/lib/utils/text_utility';
|
|||
import { s__ } from '~/locale';
|
||||
import getCommitSha from '~/pipeline_editor/graphql/queries/client/commit_sha.graphql';
|
||||
import getPipelineQuery from '~/pipeline_editor/graphql/queries/client/pipeline.graphql';
|
||||
import { toggleQueryPollingByVisibility } from '~/pipelines/components/graph/utils';
|
||||
import getPipelineEtag from '~/pipeline_editor/graphql/queries/client/pipeline_etag.graphql';
|
||||
import {
|
||||
getQueryHeaders,
|
||||
toggleQueryPollingByVisibility,
|
||||
} from '~/pipelines/components/graph/utils';
|
||||
import CiIcon from '~/vue_shared/components/ci_icon.vue';
|
||||
|
||||
const POLL_INTERVAL = 10000;
|
||||
|
|
@ -31,7 +35,13 @@ export default {
|
|||
commitSha: {
|
||||
query: getCommitSha,
|
||||
},
|
||||
pipelineEtag: {
|
||||
query: getPipelineEtag,
|
||||
},
|
||||
pipeline: {
|
||||
context() {
|
||||
return getQueryHeaders(this.pipelineEtag);
|
||||
},
|
||||
query: getPipelineQuery,
|
||||
variables() {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ mutation commitCIFile(
|
|||
commit {
|
||||
sha
|
||||
}
|
||||
commitPipelinePath
|
||||
errors
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
query getPipelineEtag {
|
||||
pipelineEtag @client
|
||||
}
|
||||
|
|
@ -6,6 +6,7 @@ import { resetServiceWorkersPublicPath } from '../lib/utils/webpack';
|
|||
import { CODE_SNIPPET_SOURCE_SETTINGS } from './components/code_snippet_alert/constants';
|
||||
import getCommitSha from './graphql/queries/client/commit_sha.graphql';
|
||||
import getCurrentBranch from './graphql/queries/client/current_branch.graphql';
|
||||
import getPipelineEtag from './graphql/queries/client/pipeline_etag.graphql';
|
||||
import { resolvers } from './graphql/resolvers';
|
||||
import typeDefs from './graphql/typedefs.graphql';
|
||||
import PipelineEditorApp from './pipeline_editor_app.vue';
|
||||
|
|
@ -26,6 +27,7 @@ export const initPipelineEditor = (selector = '#js-pipeline-editor') => {
|
|||
// Add to apollo cache as it can be updated by future queries
|
||||
commitSha,
|
||||
initialBranchName,
|
||||
pipelineEtag,
|
||||
// Add to provide/inject API for static values
|
||||
ciConfigPath,
|
||||
defaultBranch,
|
||||
|
|
@ -48,7 +50,7 @@ export const initPipelineEditor = (selector = '#js-pipeline-editor') => {
|
|||
Vue.use(VueApollo);
|
||||
|
||||
const apolloProvider = new VueApollo({
|
||||
defaultClient: createDefaultClient(resolvers, { typeDefs }),
|
||||
defaultClient: createDefaultClient(resolvers, { typeDefs, useGet: true }),
|
||||
});
|
||||
const { cache } = apolloProvider.clients.defaultClient;
|
||||
|
||||
|
|
@ -66,6 +68,13 @@ export const initPipelineEditor = (selector = '#js-pipeline-editor') => {
|
|||
},
|
||||
});
|
||||
|
||||
cache.writeQuery({
|
||||
query: getPipelineEtag,
|
||||
data: {
|
||||
pipelineEtag,
|
||||
},
|
||||
});
|
||||
|
||||
return new Vue({
|
||||
el,
|
||||
apolloProvider,
|
||||
|
|
|
|||
|
|
@ -9,14 +9,16 @@ module Ci
|
|||
end
|
||||
|
||||
def js_pipeline_editor_data(project)
|
||||
commit_sha = project.commit ? project.commit.sha : ''
|
||||
{
|
||||
"ci-config-path": project.ci_config_path_or_default,
|
||||
"commit-sha" => project.commit ? project.commit.sha : '',
|
||||
"commit-sha" => commit_sha,
|
||||
"default-branch" => project.default_branch,
|
||||
"empty-state-illustration-path" => image_path('illustrations/empty-state/empty-dag-md.svg'),
|
||||
"initial-branch-name": params[:branch_name],
|
||||
"lint-help-page-path" => help_page_path('ci/lint', anchor: 'validate-basic-logic-and-syntax'),
|
||||
"new-merge-request-path" => namespace_project_new_merge_request_path,
|
||||
"pipeline_etag" => graphql_etag_pipeline_sha_path(project.commit.sha),
|
||||
"project-path" => project.path,
|
||||
"project-full-path" => project.full_path,
|
||||
"project-namespace" => project.namespace.full_path,
|
||||
|
|
|
|||
|
|
@ -64,6 +64,9 @@
|
|||
%span.light= _('External User:')
|
||||
%strong
|
||||
= @user.external? ? _('Yes') : _('No')
|
||||
|
||||
= render_if_exists 'admin/users/provisioned_by', user: @user
|
||||
|
||||
%li
|
||||
%span.light= _('Can create groups:')
|
||||
%strong
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Fix regression in GraphQL field MergeRequest.assignees.webUrl
|
||||
merge_request: 60428
|
||||
author:
|
||||
type: fixed
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Upgrade omniauth_openid_connect gem to our own fork
|
||||
merge_request: 60181
|
||||
author:
|
||||
type: fixed
|
||||
|
|
@ -338,7 +338,6 @@ that suggests checking that the app manifest contains these settings:
|
|||
|
||||
- `"accessTokenAcceptedVersion": null`
|
||||
- `"signInAudience": "AzureADMyOrg"`
|
||||
1. `"signInAudience": "AzureADMyOrg"`
|
||||
|
||||
Note that this configuration corresponds with the `Supported account types` setting used when creating the `IdentityExperienceFramework` app.
|
||||
|
||||
|
|
|
|||
|
|
@ -378,13 +378,26 @@ server (with `gitaly_address`) unless you use
|
|||
1. Edit `/etc/gitlab/gitlab.rb`:
|
||||
|
||||
```ruby
|
||||
# Use the same token value configured on all Gitaly servers
|
||||
gitlab_rails['gitaly_token'] = '<AUTH_TOKEN>'
|
||||
|
||||
git_data_dirs({
|
||||
'default' => { 'gitaly_address' => 'tcp://gitaly1.internal:8075' },
|
||||
'default' => { 'gitaly_address' => 'tcp://gitaly1.internal:8075' },
|
||||
'storage1' => { 'gitaly_address' => 'tcp://gitaly1.internal:8075' },
|
||||
'storage2' => { 'gitaly_address' => 'tcp://gitaly2.internal:8075' },
|
||||
})
|
||||
```
|
||||
|
||||
Alternatively, if each Gitaly server is configured to use a different authentication token:
|
||||
|
||||
```ruby
|
||||
git_data_dirs({
|
||||
'default' => { 'gitaly_address' => 'tcp://gitaly1.internal:8075', 'gitaly_token' => '<AUTH_TOKEN_1>' },
|
||||
'storage1' => { 'gitaly_address' => 'tcp://gitaly1.internal:8075', 'gitaly_token' => '<AUTH_TOKEN_1>' },
|
||||
'storage2' => { 'gitaly_address' => 'tcp://gitaly2.internal:8075', 'gitaly_token' => '<AUTH_TOKEN_2>' },
|
||||
})
|
||||
```
|
||||
|
||||
1. Save the file and [reconfigure GitLab](../restart_gitlab.md#omnibus-gitlab-reconfigure).
|
||||
1. Run `sudo gitlab-rake gitlab:gitaly:check` on the Gitaly client (for example, the
|
||||
Rails application) to confirm it can connect to Gitaly servers.
|
||||
|
|
@ -404,12 +417,15 @@ server (with `gitaly_address`) unless you use
|
|||
storages:
|
||||
default:
|
||||
gitaly_address: tcp://gitaly1.internal:8075
|
||||
gitaly_token: AUTH_TOKEN_1
|
||||
path: /some/local/path
|
||||
storage1:
|
||||
gitaly_address: tcp://gitaly1.internal:8075
|
||||
gitaly_token: AUTH_TOKEN_1
|
||||
path: /some/local/path
|
||||
storage2:
|
||||
gitaly_address: tcp://gitaly2.internal:8075
|
||||
gitaly_token: AUTH_TOKEN_2
|
||||
path: /some/local/path
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -58,6 +58,9 @@ to display, add a file to your repository.
|
|||
|
||||
## Highlight lines
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56159) in GitLab 13.10 for GitLab SaaS instances.
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56159) in GitLab 13.11 for self-managed instances.
|
||||
|
||||
Web Editor enables you to highlight a single line by adding specially formatted
|
||||
hash information to the URL's file path segment. For example, the file path segment
|
||||
`MY_FILE.js#L3` instructs the Web Editor to highlight line 3.
|
||||
|
|
|
|||
|
|
@ -10,14 +10,14 @@ module Gitlab
|
|||
end
|
||||
|
||||
def self.presenter_class
|
||||
@presenter_class
|
||||
@presenter_class || superclass.try(:presenter_class)
|
||||
end
|
||||
|
||||
def self.present(object, attrs)
|
||||
klass = @presenter_class
|
||||
klass = presenter_class
|
||||
return object if !klass || object.is_a?(klass)
|
||||
|
||||
@presenter_class.new(object, **attrs)
|
||||
klass.new(object, **attrs)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -26155,6 +26155,9 @@ msgstr ""
|
|||
msgid "Provider"
|
||||
msgstr ""
|
||||
|
||||
msgid "Provisioned by:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Proxy support for this API is not available currently"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ RSpec.describe Ci::PipelineEditorHelper do
|
|||
"initial-branch-name": nil,
|
||||
"lint-help-page-path" => help_page_path('ci/lint', anchor: 'validate-basic-logic-and-syntax'),
|
||||
"new-merge-request-path" => '/mock/project/-/merge_requests/new',
|
||||
"pipeline_etag" => graphql_etag_pipeline_sha_path(project.commit.sha),
|
||||
"project-path" => project.path,
|
||||
"project-full-path" => project.full_path,
|
||||
"project-namespace" => project.namespace.full_path,
|
||||
|
|
|
|||
|
|
@ -63,6 +63,16 @@ RSpec.describe Gitlab::Graphql::Present::FieldExtension do
|
|||
|
||||
expect(value).to eq 'made of concrete'
|
||||
end
|
||||
|
||||
context 'when the implementation is inherited' do
|
||||
it 'resolves the interface field using the implementation from the presenter' do
|
||||
subclass = Class.new(implementation) { graphql_name 'Subclass' }
|
||||
field = ::Types::BaseField.new(name: :interface_field, type: GraphQL::STRING_TYPE, null: true, owner: interface)
|
||||
value = resolve_field(field, object, object_type: subclass)
|
||||
|
||||
expect(value).to eq 'made of concrete'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'interactions with inheritance' do
|
||||
|
|
|
|||
Loading…
Reference in New Issue