Age | Commit message (Collapse) | Author |
|
1. When removing projects, we can end-up leaving the +deleted
repo path dirty and not successfully removing the non-deleted
namespace (mv process is not atomic and can be killed without
fully moving the path).
2. In order to solve that, we're adding a clean-up phase on
ensure which will schedule possible staled +deleted path deletion.
Note that we don't check the current state (if there is or not a
repo) in order to schedule the deletion. That's intentional
in order to leverage Gitlab::GitalyClient::NamespaceService#remove
idempotency and ensure consistency.
|
|
This action doesn't lean on reduplication, so a short call can me made
to the Gitaly server to have the object pool remove its remote to the
project pending deletion.
https://gitlab.com/gitlab-org/gitaly/blob/f6cd55357/internal/git/objectpool/link.go#L58
When an object pool doesn't have members, this would invalidate the need
for a pool. So when a project leaves the pool, the pool will be
destroyed on the background.
Fixes: https://gitlab.com/gitlab-org/gitaly/issues/1415
|
|
|
|
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
|
|
|
|
|
|
Partially addresses #47424.
|
|
|
|
This adds a simple log message but also allows EE to insert database
events within the transaction (https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6059/diffs).
|
|
Fix project destruction failing due to idle in transaction timeouts
Closes #44610
See merge request gitlab-org/gitlab-ce!18609
|
|
When deleting associated records, Rails loads all associations into memory
(https://github.com/rails/rails/issues/22510) before destroying them. This
can cause a surge in memory and cause destruction of objects to fail
due to idle in transaction database timeouts. This fix is inspired from
https://github.com/thisismydesign to destroy `has_many` relationships
in batches.
Closes #44610
|
|
|
|
This is especially helpful when hashed storage is enabled
|
|
Direct disk access is done through Gitaly now, so the legacy path was
deprecated. This path was used in Gitlab::Shell however. This required
the refactoring in this commit.
Added is the removal of direct path access on the project model, as that
lookup wasn't needed anymore is most cases.
Closes https://gitlab.com/gitlab-org/gitaly/issues/1111
|
|
|
|
|
|
Closes #37462.
|
|
Partial fix to #44378
|
|
|
|
So we can keep showing it to a user in his project page.
|
|
The number of forks of a project doesn't change very frequently and
running a COUNT(*) every time this information is requested can be quite
expensive. We also end up running such a COUNT(*) query at least twice
on the homepage of a project.
By caching this data and refreshing it when necessary we can reduce
project homepage loading times by around 60 milliseconds (based on the
timings of https://gitlab.com/gitlab-org/gitlab-ce).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1. Rescue all errors that `Projects::DestroyService` might throw, to prevent the
worker from leaving things in an inconsistent state
2. Unmark the project as `pending_delete`
3. Add a `delete_error` text column to `projects`, and save the error message in
there, to be shown to the project masters/owners.
|
|
|
|
|
|
|
|
|
|
* master: (1327 commits)
Merge branch 'render-json-leak' into 'security'
Merge branch 'ssrf' into 'security'
Merge branch 'ssrf' into 'security'
Merge branch 'fix-links-target-blank' into 'security'
Merge branch '28058-hide-emails-in-atom-feeds' into 'security'
Fix karma test
Reset filters after click
Handle Route#name being nil after an update
Only add frontend code coverage instrumentation when generating coverage report
fix recompile assets step in 9.0 upgrade guide to use yarn
Undo explicit conversion to Integer
Make level_value accept string integers
Make feature spec more robust
Removed d3.js from the main application.js bundle
Extend compound status for manual actions specs
Update css to be nice and tidy.
Fix pipeline status for transition between stages
add an index to the ghost column
Return 404 in project issues API endpoint when project cannot be found
Improve rename projects migration
...
Conflicts:
doc/ci/docker/using_docker_build.md
spec/lib/gitlab/import_export/all_models.yml
|
|
|
|
|
|
- Fixes project, container_image and tag deletion
- Removed container_images_repository
[ci skip]
|
|
There are two issues with truncating the project team early:
1. `Projects::UnlinkForkService` may not close merge requests properly since
permissions may be revoked early.
2. If an error is encountered during flushing of caches, then the user will
lose all privileges, possibly causing an issue on deletion on retry.
|
|
|
|
Instead of redirecting from the project service to the service and back to the model,
put all destruction code in the service. Also removes a possible source of failure
where run_after_commit may not destroy the project.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Run ProjectDestroyWorker after pending_delete attribute has been committed to DB
|
|
|
|
This keeps all the cache expiration code in a single file/class instead
of spreading it all across the codebase.
|