Age | Commit message (Collapse) | Author |
|
Since it is not possible to dynamically detect if a job is automatically
cancellable or not, a this new attribute is necessary. Moreover, it let
the maintainer of the repo to adjust the behaviour of the auto cancellation
feature to match exactly what he needs.
|
|
* Define the counter once.
* Make metric name follow Prometheus naming conventions.
* Add label for call method.
|
|
Creates new event when an epic is created, closed, reopened or
commented.
|
|
This fixes a high frequency N+1 issue:
`RoutableActions#find_routable!` is used across many controllers to
retrieve e.g. the Project or Namespace by path. The `#find_routable!`
method calls `#ensure_canonical_path` which in turn retrieves
`#full_path` from the given Routable.
This in turn triggers a lookup on `routes`, leading to a high frequency
of these queries:
```sql
SELECT "routes".* FROM "routes" WHERE "routes"."source_id" = $1 AND
"routes"."source_type" = $2 LIMIT $3
```
This is unnecessary as we already join `routes` in
`Routable#find_by_full_path` anyways.
|
|
|
|
Remove dependency on IgnorableColumn concern
Closes #66746
See merge request gitlab-org/gitlab-ce!32427
|
|
We should see the ratio drop down when enabling the Feature.
Recommendation by @andrewn
|
|
|
|
In order to lookup a Project or Namespace by path, we prefer an exact
match (case-sensitive) but in absence of that, we'd also take a
case-insensitive match.
The case-insensitive matching with preference for the exact match is a
bit more involved in SQL as the exact lookup. Yet, the majority of cases
will be an exact match. The thinking here is that we can optimize the
lookup by performing an exact match first and only if there is no
result, we perform the case-insensitive lookup.
Data for GitLab.com:
* We have about 15M records in routes table
* About 2,500 routes exist where there's more than one record
with the same `lower(path)`
It is possible for a user to craft requests that would always trigger
the 2-step search (e.g. we have a route for `/foo/bar`, the request is
always for `/FOO/bar`). In this case, the change at hand is not
beneficial as it would run an additional query.
However, based on the data, it is highly likely that the vast majority
of requests can be satisfied with an exact match only.
The context for this change is
https://gitlab.com/gitlab-org/gitlab-ce/issues/64590#note_208156463.
|
|
|
|
Limit the size of issuable description and comments
See merge request gitlab/gitlabhq!3267
|
|
|
|
totalNotes is only used to prerender a number of
skeleton containers until real notes are loaded
issuable.discussions makes multiple requests, so
too expensive for this
This commit uses mere notes for this and sends
actual totalNotes number if it's less than 10;
otherwise it sends 10 - it allows us to avoid
bunch of skeleton prerenderings, which are not
necessary since they doesn't fit into the whole
screen and disappear quite fast
|
|
- Introducting StageEvents to define the available events
- Define the event pairing rules, since some events are not compatible
- Express default Cycle Analytics stages with the event structure
|
|
Increase sort options for issues list from updated_at and create_at,
to include more options close to what is required in actual issue list
UI.
This helps us to use REST API for issues list with sorting capabilities
https://gitlab.com/gitlab-org/gitlab-ce/issues/57402
|
|
Limiting the size of issuable description and comments to 1_000_000,
which is close to ~1MB of ASCII characters, which represents 99.9% of
all descriptions and comments we have in DB at the moment. This should
help prevent DoS attacks when comments contain refference strings.
Also this change updates regexp matching the namespaces paths by
limiting the namespaces paths to Namespace::NUMBER_OF_ANCESTORS_ALLOWED,
as we allow 20 levels deep groups.
see https://gitlab.com/gitlab-org/gitlab-ce/issues/61974#note_191274234
|
|
Adding, destroying and toggling emoji previously lacked services and
instead were performed through methods called on Awardable models.
This led to inconsistencies where relevant todos would be marked as done
only when emoji were awarded through our controllers, but not through
the API. Todos could also be marked as done when an emoji was being
removed.
Behaviour changes
- Awarding emoji through the API will now mark a relevant Todo as done
- Toggling an emoji off (destroying it) through our controllers will no
longer mark a relevant Todo as done
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/63372
|
|
|
|
As decided in https://gitlab.com/gitlab-org/gitlab-ce/issues/53593
|
|
- This will make it easy to identify the project even if admins change
the name of the project or move it.
|
|
Allow masking @ and : characters
Closes #63043
See merge request gitlab-org/gitlab-ce!31065
|
|
- 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
|
|
Also removes unnecessary methods causing extra queries
|
|
Moving of neighbour items was done recursively - this
was extremely expensive when multiple items had to be moved.
This change optimizes the code to find nearest possible gap where
items can be moved and moves all of them with single update query.
|
|
Group `parent not preloaded` errors in sentry
See merge request gitlab-org/gitlab-ce!31424
|
|
I still haven't found a moment to look into the exact cases that
causes this error, but we're not loosing any information this way.
In fact, it will be easier to find the right information as we only
need to look to one entry in Sentry.
|
|
After measuring the impact of the namespace storage on
https://gitlab.com/gitlab-org/gitlab-ce/issues/64092. It was decided
that it's performant enough. So we can freely remove the feature flag
Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/64092
|
|
Move it to DiffPositionableNote concern which will be re-used
in EE in DraftNote model.
|
|
This implements the support for `needs:` keyword
as part of GitLab CI. That makes some of the jobs
to be run out of order.
|
|
Starts from START_POSITION when there are no existing
positions.
Also improves the test to actually test the behavior
|
|
Update gitlab-styles to close #54853
Closes #54853
See merge request gitlab-org/gitlab-ce!31155
|
|
Adds Job specific variables to facilitate specifying variables when
running manual jobs.
|
|
|
|
Remove code related to object hierarchy and MySQL
Closes #65056 and #65055
See merge request gitlab-org/gitlab-ce!31095
|
|
Convert several occurrences of `map` + `flatten` to
`flat_map` where applicable.
|
|
These are not required because MySQL is not
supported anymore
|
|
RelativePositioning module was heavily dependent on the Issue model.
This changes makes it easier to reuse the functionality provided by
RelativePositioning in other models.
Needed by: https://gitlab.com/gitlab-org/gitlab-ee/issues/12196
|
|
|
|
|
|
None of this code can be reached any more, so it can all be removed
|
|
'64697-markdown-issues-checkbox-inside-blockquote-status-won-t-be-saved' into 'master'
Markdown issues: Checkbox inside blockquote status won't be saved
See merge request gitlab-org/gitlab-ce!30952
|
|
If `project_auto_devops.enabled` is nil for a project, when setting any
auto devops values via the API, we try to create a new row in the DB,
instead of re-using the existing one. This leads to the project_id
being set to nil, and the database `NOT NULL` constraint leading to a
500 response.
This commit resolves the issue by correctly detecting the presence of a
ProjectAutoDevops row and re-using it. Persistence is also moved away
from explicit `update!` calls and into relying on `autosave: true` on
the model.
|
|
Updated the task list regex to understand blockquote
characters that can come before the task item marker
|
|
|
|
This has been enabled on production without issue
https://gitlab.com/gitlab-org/gitlab-ce/issues/64259
|
|
Instead return error objects.
|
|
Updates changed method names and fixes spec failures
|
|
into 'master'
Remove Rails 4-specific code from `FromUnion.from_union`
Closes #51575
See merge request gitlab-org/gitlab-ce!30587
|
|
Add CI variable to provide GitLab FQDN
Closes #64161
See merge request gitlab-org/gitlab-ce!30417
|
|
Banzai - avoid redis if attr is in DB cache
See merge request gitlab-org/gitlab-ce!30334
|