| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| | |
Stop using Sidekiq for updating Key#last_used_at
Closes #36663
See merge request gitlab-org/gitlab-ce!14391
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This makes things simpler as no scheduling is involved. Further we
remove the need for running a SELECT + UPDATE just to get the key and
update it, whereas we only need an UPDATE when setting last_used_at
directly in a request.
The added service class takes care of updating Key#last_used_at without
using Sidekiq. Further it makes sure we only try to obtain a Redis lease
if we're confident that we actually need to do so, instead of always
obtaining it. We also make sure to _only_ update last_used_at instead of
also updating updated_at.
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36663
|
|\ \
| |/
|/|
| |
| |
| |
| | |
Fix refreshing of issues/MR count caches
Closes #38061
See merge request gitlab-org/gitlab-ce!14363
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This ensures the open issues/MR count caches are refreshed properly when
creating new issues or MRs. This MR also includes a change to the cache
keys to ensure all caches are rebuilt on the fly.
This particular problem was not caught in the test suite due to a null
cache being used, resulting in all calls that would use a cache using
the underlying data directly. In production the code would fail because
a newly saved record returns an empty hash in #changes meaning checks
such as `state_changed? || confidential_changed?` would return false for
new rows, thus never updating the counters.
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/38061
|
|/ |
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
Prepare Repository#merge for migration to Gitaly
Closes gitaly#559
See merge request gitlab-org/gitlab-ce!14154
|
| | |
|
|\ \
| | |
| | |
| | | |
# Conflicts:
# db/schema.rb
|
| |/ |
|
| | |
|
|/
|
|
| |
visibility level
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Whenever you push to a branch GitLab will show a button to create a
merge request (should one not exist already). The underlying code to
display this data was quite inefficient. For example, it involved
multiple slow queries just to figure out what the most recent push event
was.
This commit changes the way this data is retrieved so it's much faster.
This is achieved by caching the ID of the last push event on every push,
which is then retrieved when loading certain pages. Database queries are
only executed if necessary and the cached data is removed automatically
once a merge request has been created, or 2 hours after being stored.
A trade-off of this approach is that we _only_ track the last event.
Previously if you were to push to branch A and B then create a merge
request for branch B we'd still show the widget for branch A. As of this
commit this is no longer the case, instead we will only show the widget
for the branch you pushed to most recently. Once a merge request exists
the widget is no longer displayed. Alternative solutions are either too
complex and/or too slow, hence the decision was made to settle for this
trade-off.
Performance Impact
------------------
In the best case scenario (= a user didn't push anything for more than 2
hours) we perform a single Redis GET per page. Should there be cached
data we will run a single (and lightweight) SQL query to get the
event data from the database. If a merge request already exists we will
run an additional DEL to remove the cache key.
The difference in response timings can vary a bit per project. On
GitLab.com the 99th percentile of time spent in User#recent_push hovers
between 100 milliseconds and 1 second, while the mean hovers around 50
milliseconds. With the changes in this MR the expected time spent in
User#recent_push is expected to be reduced down to just a few
milliseconds.
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/35990
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
Improve "Share with group lock" feature for subgroups
Closes #30550
See merge request !13944
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
…in Groups::UpdateService instead of only in the browser.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Fix a wrong `X-Gitlab-Event` header when testing webhooks
Closes #37288
See merge request !14108
|
| |/
| |
| |
| | |
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
'master'
Decrease Cyclomatic Complexity threshold to 14
See merge request !13972
|
| | | |
|
| |/ |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Removes default scope from sortable
Closes #23079
See merge request !13558
|
| | | |
|
|\ \ \
| |_|/
|/| |
| | |
| | | |
Group boards CE backport
See merge request !13883
|
| |\ \
| | |/
| | |
| | | |
ee_issue_928_backport
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/
|/| |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
'fix/sm/35650-remove-createtriggerrequestservice-and-forbid-to-persist-variables-on-ci-triggerrequest' into 'master'
Removes `CreateTriggerRequestService` and add a blocker to prevent saving variables on `Ci::TriggerRequest`
Closes #35650
See merge request !13792
|
| | |
| | |
| | |
| | | |
Ci::TriggerRequest
|
| | | |
|
| | | |
|
| | | |
|
|/ / |
|
|\ \
| | |
| | |
| | |
| | | |
Move GitOperationService to Gitlab::Git
See merge request !13984
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
Prepare GitOperationService for moving to Gitlab::Git
See merge request !13773
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
protected index on ci_builds.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
builds_for_shared_runner and builds_for_specific_runner read the flag instead of executing protected_for? one by one.
|