Commit Graph

18 Commits

Author SHA1 Message Date
GitLab Bot 9c5341dd08 Add latest changes from gitlab-org/gitlab@master 2022-08-01 12:12:10 +00:00
GitLab Bot 040d734373 Add latest changes from gitlab-org/gitlab@master 2022-07-15 21:08:42 +00:00
GitLab Bot 152d3b652d Add latest changes from gitlab-org/gitlab@master 2022-07-13 09:08:30 +00:00
GitLab Bot eb6b175049 Add latest changes from gitlab-org/gitlab@master 2022-05-31 15:09:02 +00:00
GitLab Bot 6035fcc36e Add latest changes from gitlab-org/gitlab@master 2020-10-14 09:08:46 +00:00
GitLab Bot 6724a6ee6b Add latest changes from gitlab-org/gitlab@master 2020-09-04 12:08:27 +00:00
GitLab Bot 57ac0bc8f7 Add latest changes from gitlab-org/gitlab@master 2020-09-01 00:10:35 +00:00
GitLab Bot eef9c80f1c Add latest changes from gitlab-org/gitlab@master 2020-08-27 15:10:21 +00:00
GitLab Bot ff579119e2 Add latest changes from gitlab-org/gitlab@master 2020-08-26 12:10:53 +00:00
GitLab Bot 4c5468b408 Add latest changes from gitlab-org/gitlab@master 2020-06-24 15:08:50 +00:00
GitLab Bot 88a0824944 Add latest changes from gitlab-org/gitlab@master 2020-02-04 12:09:00 +00:00
GitLab Bot b3e4ec8e8a Add latest changes from gitlab-org/gitlab@master 2019-10-23 09:06:03 +00:00
Gabriel Mazetto 39229eed34 Hashed Storage is enabled by default on new installations
updated documentation for Geo
2019-06-17 20:35:22 +02:00
Gabriel Mazetto cf52488ccb Move MigrationService to HashedStorage module
This is part of the refactor to include a RollbackService into
HashedStorage module
2019-01-25 20:26:35 +01:00
Gabriel Mazetto d391dfb4ac Refactored AfterRenameService to reduce coupling
We still rely on the Dirty API for project rename (before/after) values,
but we don't access the dirty api from the service class anymore.

The previous value is now part of the initialization, which makes it
easier to test and the behavior is clearer.

The same was done with the `rename_repo` on the Storage classes, we now
provide before and after values as part of the method signature.
2019-01-22 13:55:18 +01:00
Gabriel Mazetto 7a7948e64b Fixed legacy storage renaming code
During a previous refactor on project model, code related to the
hashed storage was extracted into AfterRenameService, see
4b9c17f196.

The "path_before" was changed from using `previous_changes['path']` to
`path_was`. They are not equivalent. `path_was` exists reliably only
*before* persisting to the database. After database persistence is
confirmed, the value is moved to `previous_changes[:attribute_name]`.

Because the repository/attachments rename or storage upgrade happens
after it was persisted to the database, we were in fact not informing
the right parameters (and therefore not doing what it was supposed to).
2019-01-21 17:15:30 +01:00
Douglas Barbosa Alexandre 3962c72519
Update storage location after a project has been renamed 2018-12-21 16:00:46 -02:00
Yorick Peterse 4b9c17f196
Move Project#rename_repo to a service class
This moves the logic of Project#rename_repo and all methods _only_ used
by this method into a new service class: Projects::AfterRenameService.
By moving this code into a separate service class we can more easily
refactor it, and we also get rid of some RuboCop "disable" statements
automatically.

During the refactoring of this code, I removed most of the explicit
logging using Gitlab::AppLogger. The data that was logged would not be
useful when debugging renaming issues, as it does not add any value on
top of data provided by users.

I also removed a variety of comments that either mentioned something the
code does in literal form, or contained various grammatical errors.
Instead we now resort to more clearly named methods, removing the need
for code comments.

This method was chosen based on analysis in
https://gitlab.com/gitlab-org/release/framework/issues/28. In this issue
we determined this method has seen a total of 293 lines being changed in
it. We also noticed that RuboCop determined the ABC size
(https://www.softwarerenovation.com/ABCMetric.pdf) was too great.
2018-10-22 15:12:46 +02:00