* Fix argument alignment since f08bea3467
The FactoryBot.* prefix has been removed in f08bea3467. Since then
rubocop complains about Layout/ArgumentAlignment. This commit fixes it.
* do not fix alignments for modules/*/spec yet
hoping to be under the limit of 65535 characters for reviewdog to report on rubocop errors
This reverts commit b05a8f7b54.
The release/10 branch received a revert that was applied after changes
from dev unwillingly where merged into it. But when merging release/10.0
back into dev, that revert was also applied to dev where the changes are
indeed wanted. So we revert the revert for dev.
Repositories were not properly relocated when using a managed remote.
This also changes the request to use an old identifier instead of the
whole path. The managed remote will build the correct old path itself.
This commit expects a managed remote to return at least a URL
to the repository, and optionally a path.
Note that OpenProject currently only supports local repositories for
Git, and thus using managed remotes with Git WILL require a path
returned from the remote.
For Subversion, also returning a `file://<path>` URL is sufficient,
since it can browse that. Returned external URLs must be accessible from
OpenProject, since we do not receive any authentication from the remote.
This sets `max_attempts` for StorageUpdaterJob to 1,
as we prefer having an external event retrigger storage counting
rather than retrying from delayed_job.
The reason behind this is failing counting due to I/O or other
unforeseen issues (e.g. mount not available, .. ).
In this case, recounting soon after will not solve the problem
and only increase load on disk.
This commit allows storage counting to shell out to `du` where
available.
The method uses du with `-bs` to count the apparent file size in bytes.
Note that apparent size is NOT the same as the real required size on
file system, but is used to be consistent with other sizes displayed in
OpenProject (e.g., attachments size)
When du is either unavailable or incompatible, in that it doesn't
return the requested count, the ruby fallback counting method is used.
This method has been slightly altered to use `File.stat` instead of
`File.new(path).size` for reduced computational overhead compared to
`du`.
This commit extends the previous functionality of *autofetch commits*
into internal updating of repository information, which encompasses:
* Commit information (changesets)
* Disk space information
They are now both retrieved when browsing the repository and the latter
is fetched asynchronously whenever the last update is older than the
timeout setting.
This timeout setting is now user-configurable.
This commit effectively adds a storage information column
to repositories.
It tests the functionality of the counting on subversion and git
repositories / adapters.