Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c1bacbd3
Commit
c1bacbd3
authored
Sep 28, 2021
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab master
parents
6aedae30
510ee2a4
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
94 additions
and
68 deletions
+94
-68
doc/user/compliance/license_compliance/img/policies_maintainer_add_v13_2.png
.../license_compliance/img/policies_maintainer_add_v13_2.png
+0
-0
doc/user/compliance/license_compliance/img/policies_maintainer_add_v14_3.png
.../license_compliance/img/policies_maintainer_add_v14_3.png
+0
-0
doc/user/compliance/license_compliance/img/policies_maintainer_edit_v14_2.png
...license_compliance/img/policies_maintainer_edit_v14_2.png
+0
-0
doc/user/compliance/license_compliance/img/policies_maintainer_edit_v14_3.png
...license_compliance/img/policies_maintainer_edit_v14_3.png
+0
-0
doc/user/compliance/license_compliance/index.md
doc/user/compliance/license_compliance/index.md
+4
-3
qa/qa/resource/project.rb
qa/qa/resource/project.rb
+8
-6
qa/qa/resource/project_imported_from_github.rb
qa/qa/resource/project_imported_from_github.rb
+2
-2
qa/qa/specs/features/api/1_manage/import_large_github_repo_spec.rb
...cs/features/api/1_manage/import_large_github_repo_spec.rb
+6
-12
qa/qa/specs/features/api/3_create/repository/project_archive_compare_spec.rb
...s/api/3_create/repository/project_archive_compare_spec.rb
+1
-2
qa/qa/specs/features/browser_ui/1_manage/project/create_project_spec.rb
...atures/browser_ui/1_manage/project/create_project_spec.rb
+1
-1
qa/qa/support/api.rb
qa/qa/support/api.rb
+72
-42
No files found.
doc/user/compliance/license_compliance/img/policies_maintainer_add_v13_2.png
deleted
100644 → 0
View file @
6aedae30
13.1 KB
doc/user/compliance/license_compliance/img/policies_maintainer_add_v14_3.png
0 → 100644
View file @
c1bacbd3
48.3 KB
doc/user/compliance/license_compliance/img/policies_maintainer_edit_v14_2.png
deleted
100644 → 0
View file @
6aedae30
9.61 KB
doc/user/compliance/license_compliance/img/policies_maintainer_edit_v14_3.png
0 → 100644
View file @
c1bacbd3
24.8 KB
doc/user/compliance/license_compliance/index.md
View file @
c1bacbd3
...
...
@@ -47,7 +47,7 @@ When GitLab detects a **Denied** license, you can view it in the [license list](

You can view and modify existing policies from the
[
policies
](
#policies
)
tab.


## License expressions
...
...
@@ -742,8 +742,9 @@ which enables a designated approver that can approve and then merge a merge requ
The
**Policies**
tab in the project's license compliance section displays your project's license
policies. Project maintainers can specify policies in this section.




Developers of the project can view the policies configured in a project.
...
...
qa/qa/resource/project.rb
View file @
c1bacbd3
...
...
@@ -12,13 +12,13 @@ module QA
:auto_devops_enabled
,
:github_personal_access_token
,
:github_repository_path
,
:gitlab_repository_path
:gitlab_repository_path
,
:personal_namespace
attributes
:id
,
:name
,
:add_name_uuid
,
:description
,
:personal_namespace
,
:runners_token
,
:visibility
,
:template_name
,
...
...
@@ -31,13 +31,15 @@ module QA
end
attribute
:path_with_namespace
do
"
#{
group
.
full_path
}
/
#{
name
}
"
"
#{
personal_namespace
||
group
.
full_path
}
/
#{
name
}
"
end
alias_method
:full_path
,
:path_with_namespace
def
sandbox_path
group
.
respond_to?
(
'sandbox'
)
?
"
#{
group
.
sandbox
.
path
}
/"
:
''
return
''
if
personal_namespace
||
!
group
.
respond_to?
(
'sandbox'
)
"
#{
group
.
sandbox
.
path
}
/"
end
attribute
:repository_ssh_location
do
...
...
@@ -50,12 +52,12 @@ module QA
def
initialize
@add_name_uuid
=
true
@personal_namespace
=
false
@description
=
'My awesome project'
@initialize_with_readme
=
false
@auto_devops_enabled
=
false
@visibility
=
:public
@template_name
=
nil
@personal_namespace
=
nil
@import
=
false
self
.
name
=
"the_awesome_project"
...
...
@@ -68,7 +70,7 @@ module QA
def
fabricate!
return
if
@import
if
@
personal_namespace
if
personal_namespace
Page
::
Dashboard
::
Projects
.
perform
(
&
:click_new_project_button
)
else
group
.
visit!
...
...
qa/qa/resource/project_imported_from_github.rb
View file @
c1bacbd3
...
...
@@ -34,7 +34,7 @@ module QA
def
fabricate_via_api!
super
rescue
ResourceURLMissingError
"
#{
Runtime
::
Scenario
.
gitlab_address
}
/
#{
group
.
full_path
}
/
#{
name
}
"
"
#{
Runtime
::
Scenario
.
gitlab_address
}
/
#{
full_path
}
"
end
def
api_post_path
...
...
@@ -49,7 +49,7 @@ module QA
{
repo_id:
github_repo_id
,
new_name:
name
,
target_namespace:
group
.
full_path
,
target_namespace:
@personal_namespace
||
group
.
full_path
,
personal_access_token:
github_personal_access_token
,
ci_cd_only:
false
}
...
...
qa/qa/specs/features/api/1_manage/import_large_github_repo_spec.rb
View file @
c1bacbd3
...
...
@@ -9,11 +9,6 @@ module QA
let
(
:differ
)
{
RSpec
::
Support
::
Differ
.
new
(
color:
true
)
}
let
(
:api_client
)
{
Runtime
::
API
::
Client
.
as_admin
}
let
(
:group
)
do
Resource
::
Group
.
fabricate_via_api!
do
|
resource
|
resource
.
api_client
=
api_client
end
end
let
(
:user
)
do
Resource
::
User
.
fabricate_via_api!
do
|
resource
|
...
...
@@ -86,19 +81,15 @@ module QA
Resource
::
ProjectImportedFromGithub
.
fabricate_via_api!
do
|
project
|
project
.
add_name_uuid
=
false
project
.
name
=
'imported-project'
project
.
group
=
group
project
.
github_personal_access_token
=
Runtime
::
Env
.
github_access_token
project
.
github_repository_path
=
github_repo
project
.
personal_namespace
=
user
.
username
project
.
api_client
=
api_client
end
end
before
do
group
.
add_member
(
user
,
Resource
::
Members
::
AccessLevel
::
MAINTAINER
)
end
after
do
|
example
|
user
.
remove_via_api!
user
.
remove_via_api!
unless
example
.
exception
next
unless
defined?
(
@import_time
)
# save data for comparison after run finished
...
...
@@ -128,7 +119,10 @@ module QA
)
end
it
'imports large Github repo via api'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1880'
do
it
(
'imports large Github repo via api'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1880'
)
do
start
=
Time
.
now
Runtime
::
Logger
.
info
(
"Importing project '
#{
imported_project
.
full_path
}
'"
)
# import the project and log path
...
...
qa/qa/specs/features/api/3_create/repository/project_archive_compare_spec.rb
View file @
c1bacbd3
...
...
@@ -46,10 +46,9 @@ module QA
def
create_project
(
user
,
api_client
,
project_name
)
project
=
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
personal_namespace
=
tru
e
project
.
personal_namespace
=
user
.
usernam
e
project
.
add_name_uuid
=
false
project
.
name
=
project_name
project
.
path_with_namespace
=
"
#{
user
.
username
}
/
#{
project_name
}
"
project
.
api_client
=
api_client
end
...
...
qa/qa/specs/features/browser_ui/1_manage/project/create_project_spec.rb
View file @
c1bacbd3
...
...
@@ -39,7 +39,7 @@ module QA
Resource
::
Project
.
fabricate_via_browser_ui!
do
|
project
|
project
.
name
=
project_name
project
.
description
=
'create awesome project test'
project
.
personal_namespace
=
tru
e
project
.
personal_namespace
=
Runtime
::
User
.
usernam
e
end
end
...
...
qa/qa/support/api.rb
View file @
c1bacbd3
...
...
@@ -8,9 +8,11 @@ module QA
HTTP_STATUS_NO_CONTENT
=
204
HTTP_STATUS_ACCEPTED
=
202
HTTP_STATUS_NOT_FOUND
=
404
HTTP_STATUS_TOO_MANY_REQUESTS
=
429
HTTP_STATUS_SERVER_ERROR
=
500
def
post
(
url
,
payload
,
args
=
{})
with_retry_on_too_many_requests
do
default_args
=
{
method: :post
,
url:
url
,
...
...
@@ -24,8 +26,10 @@ module QA
rescue
RestClient
::
ExceptionWithResponse
=>
e
return_response_or_raise
(
e
)
end
end
def
get
(
url
,
args
=
{})
with_retry_on_too_many_requests
do
default_args
=
{
method: :get
,
url:
url
,
...
...
@@ -38,8 +42,10 @@ module QA
rescue
RestClient
::
ExceptionWithResponse
=>
e
return_response_or_raise
(
e
)
end
end
def
put
(
url
,
payload
=
nil
)
with_retry_on_too_many_requests
do
RestClient
::
Request
.
execute
(
method: :put
,
url:
url
,
...
...
@@ -48,8 +54,10 @@ module QA
rescue
RestClient
::
ExceptionWithResponse
=>
e
return_response_or_raise
(
e
)
end
end
def
delete
(
url
)
with_retry_on_too_many_requests
do
RestClient
::
Request
.
execute
(
method: :delete
,
url:
url
,
...
...
@@ -57,8 +65,10 @@ module QA
rescue
RestClient
::
ExceptionWithResponse
=>
e
return_response_or_raise
(
e
)
end
end
def
head
(
url
)
with_retry_on_too_many_requests
do
RestClient
::
Request
.
execute
(
method: :head
,
url:
url
,
...
...
@@ -66,6 +76,26 @@ module QA
rescue
RestClient
::
ExceptionWithResponse
=>
e
return_response_or_raise
(
e
)
end
end
def
with_retry_on_too_many_requests
response
=
nil
Support
::
Retrier
.
retry_until
do
response
=
yield
if
response
.
code
==
HTTP_STATUS_TOO_MANY_REQUESTS
wait_seconds
=
response
.
headers
[
:retry_after
].
to_i
QA
::
Runtime
::
Logger
.
debug
(
"Received 429 - Too many requests. Waiting for
#{
wait_seconds
}
seconds."
)
sleep
wait_seconds
end
response
.
code
!=
HTTP_STATUS_TOO_MANY_REQUESTS
end
response
end
def
parse_body
(
response
)
JSON
.
parse
(
response
.
body
,
symbolize_names:
true
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment