- Closes#60024
- Change PrometheusClient.new to accept a base url instead of an
already created RestClient
- Use Gitlab::HTTP in PrometheusClient instead of creating RestClient
in PrometheusService
- Move http_options from PrometheusService to
PrometheusClient (follow_redirects: false)
- ensure that base urls don't have the trailing slash
- Created a `PrometheusClient#url` method that might not be strictly
required
- Change rescued exceptions from RestClient::* to
HTTParty::ResponseError where possible and StandardError for the
rest
If `spec/tasks/gitlab/cleanup_rake_spec.rb` preceded any of the Gitaly
request specs, it would import the `cleanup.rake` and the global
function `limit`. For some reason, the Protobuf implementation would use
the global function instead of the getter method. For example:
```
def limit
puts "hi"
end
req = Gitaly::WikiGetAllPagesRequest.new
req.send(:limit)
hi
=> nil
```
To fix this problem, access the field value using the [] operator
instead.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/64006
Remove migration generating lets encrypt key
Don't generate private_key if database is readonly
For reference:
This reverts commit 988a7f70489b99383b95e9f271a2caf6bb5b3a44.
This reverts commit 21acbe531592d55caf0e5b8716a3b551dafd6233.
Before, the styling for `img:not(.emoji)`` was repeated between
`.md:not(.use-csslab):not(.wiki)` (for comments and the Markdown
preview), `.documentation.wiki` (for help pages), and
`.issuable-details .description .wiki` (for MR and issue descriptions).
In these places, we now simply use `.md`. Wherever we use `.md` but
don't want this image styling (like wikis and blobs), `.md-file` is
added.
- deletes schedule_installation_service.rb
- moves schedule_installation_service.rb logic to create_service.rb
- moves specs as well
Removes code duplication
Remove unecessary spec block
Abide review suggestions
Test installable applications which are not associated to a cluster
Fix a typo
Removes duplciated expectation
Reuse variable instead of redefining
Remove method in favor of a local scoped lambda
Improve 'failing service' shared examples
Test the increase of status count
Remove duplicated test
Enable fronzen literal
Previously GraphQL field authorization happened like this:
class ProjectType
field :my_field, MyFieldType do
authorize :permission
end
end
This change allowed us to authorize like this instead:
class ProjectType
field :my_field, MyFieldType, authorize: :permission
end
A new initializer registers the `authorize` metadata keyword on GraphQL
Schema Objects and Fields, and we can collect this data within the
context of Instrumentation like this:
field.metadata[:authorize]
The previous functionality of authorize is still being used for
mutations, as the #authorize method here is called at during the code
that executes during the mutation, rather than when a field resolves.
https://gitlab.com/gitlab-org/gitlab-ce/issues/57828
The status is shown for
- The author of a commit when viewing a commit
- Notes on a commit (regular/diff)
- The user that triggered a pipeline when viewing a pipeline
- The author of a merge request when viewing a merge request
- The author of notes on a merge request (regular/diff)
- The author of an issue when viewing an issue
- The author of notes on an issue
- The author of a snippet when viewing a snippet
- The author of notes on a snippet
- A user's profile page
- The list of members of a group/user
This allows the user to get a single MR nested in a GraphQL project
query.
Since we need the full path and the iid anyway, this makes more sense
than having a root query that needs the full path as well.
- All definitions have been replaced by classes:
http://graphql-ruby.org/schema/class_based_api.html
- Authorization & Presentation have been refactored to work in the
class based system
- Loaders have been replaced by resolvers
- Times are now coersed as ISO 8601
This was being masked by the statement cache because only one author was used
per issue in the test..
Also adds support for an Rspec matcher `exceed_all_query_limit`.
Include X-Content-Type-Options (XCTO) header into API responses
See merge request gitlab/gitlabhq!2211
(cherry picked from commit 6c818e77f2abeef2dd7b17a269611b018701fa79)
e087e075 Include X-Content-Type-Options (XCTO) header into API responses
So that whenever this failed:
expect(response).to have_gitlab_http_status(200)
We see what's the response there. Here's an example:
```
1) API::Settings Settings PUT /application/settings custom repository storage type set in the config updates application settings
Failure/Error: expect(response).to have_gitlab_http_status(200)
expected the response to have status code 200 but it was 400. The response was: {"error":"password_authentication_enabled, signin_enabled are mutually exclusive"}
```