Commit Graph

2302 Commits

Author SHA1 Message Date
Sebastian Sdorra
26b65582ce Core metrics (#1586)
Expose metrics for http requests and executor services.
2021-03-17 11:09:52 +01:00
René Pfeuffer
84c8e02bf1 Feature Partial Diff (#1581)
With this pull request, diffs for Git are loaded in chunks. This means, that for diffs with a lot of files only a part of them are loaded. In the UI a button will be displayed to load more. In the REST API, the number of files can be specified. This only works for diffs, that are delivered as "parsed" diffs. Currently, this is only available for Git.

Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
2021-03-12 13:52:17 +01:00
Sebastian Sdorra
7656c2dc14 Add API for metrics based on Micrometer (#1576) 2021-03-10 10:07:29 +01:00
Sebastian Sdorra
89548d45bd Filepath search (#1568)
Add search for files to the sources view. The search is only for finding file paths. It does not search any file metadata nor the content. Results get a rating, where file names are rated higher than file paths. The results are sorted by the score and the first 50 results are displayed.

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2021-03-04 10:39:58 +01:00
Eduard Heimbuch
7852d1034e Fix build warnings (#1562)
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-03-01 09:08:01 +01:00
René Pfeuffer
0695ca3bac Add import protocol (#1558)
Adds a protocol for repository imports (either from an URL, a dump file or a SCM-Manager repository archive).
This protocol documents single steps of an import, the time and the user and is accessible via a dedicated REST
endpoint or a simple ui.

The id of the log is added to the repository imported event, so that plugins like the landingpage or mail can link to these logs.
2021-02-26 13:52:29 +01:00
Sebastian Sdorra
888f5d699b Fire RepositoryImportHookEvent instead of PostReceiveRepositoryHookEvent (#1561)
We will fire an RepositoryImportHookEvent instead of PostReceiveRepositoryHookEvent for repository imports with metadata. The event is only fired if all parts of the repository could be successfully imported. The extra event is required to avoid heavy recalculations which can be triggered by the PostReceiveRepositoryHookEvent for example the scm-statistic-plugin uses the PostReceiveRepositoryHookEvent to calculate its statistics.

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2021-02-26 09:49:34 +01:00
Eduard Heimbuch
db2ce98721 Feature/import export encryption (#1533)
Add option to encrypt repository exports with a password and add possibility to decrypt them on repository import. Also make the repository export asynchronous. This implies that the repository export will be created on the server and can be downloaded multiple times. The repository export will be deleted automatically 10 days after creation.
2021-02-25 13:01:03 +01:00
René Pfeuffer
d0df8977ef Bugfix for long filenames in tar (#1552)
Fixes errors with long file names in tar archives. This may arise with hg repositories with deep directories.
2021-02-18 16:30:35 +01:00
Sebastian Sdorra
d8427ed4ed Improve cache api for usage in plugins (#1540)
This change allows usage of Cache as Shiro authentication and authorization cache. It will also fix loading cache configurations from plugins.
2021-02-17 09:15:01 +01:00
René Pfeuffer
b8bd140934 Debug test failure 2021-02-16 10:18:09 +01:00
Sebastian Sdorra
1a2dabeb66 Do not resolve external groups for system accounts (#1541)
This change modifies the behaviour of the DefaultGroupCollector.
The collector does not longer resolve external groups for the anonymous user and it does not resolve internal nor external groups for the account which is used by the AdministrationContext.
This should reduce the requests which are send to external systems like ldap servers.
2021-02-15 08:45:47 +01:00
René Pfeuffer
e0d2630a08 Feature repository specific data migration (#1526)
This adds a new migration mechanism for repository data. Instead of using UpdateSteps for all data migrations, repository data shall from now on be implemented with RepositoryUpdateSteps. The general logic stays the same. Executed updates are stored with the repository. Doing this, we can now execute updates on imported repositories without touching other data. This way we can import repositories even though they were exported with older versions of SCM-Manager or a plugin.
2021-02-10 08:12:48 +01:00
Eduard Heimbuch
ac5d145266 Repository export read-only lock (#1519)
* Lock repository for read-only access only while exporting
* Create read-only check api

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-02-04 15:29:49 +01:00
Sebastian Sdorra
4202178c01 Fix usage of custom realm description for scm protocols (#1512)
Fixes missing usage of custom realm description for scm client operations.

Fixes #1487
2021-01-29 07:59:18 +01:00
René Pfeuffer
bd3671b428 Use repository specific work dirs (#1510)
With this change, work dirs are created in the
directory of the repository and no longer in the
global scm work dir directory. This is relevant due
to two facts:

1. Repositories may contain confidential data and therefore
   reside in special directories (that may be mounted on
   special drives). It may be considered a breach when these
   directories are cloned or otherwise copied to global
   temporary drives.
2. Big repositories may overload global temp spaces. It may be
   easier to create special drives with more space for such
   big repositories.
2021-01-28 12:53:39 +01:00
Eduard Heimbuch
0046c78b40 Git import and export (#1507)
* create git bundle command

* create git unbundle command

* Apply suggestions from code review

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-01-28 12:35:18 +01:00
Eduard Heimbuch
d91c71ace1 Add the repository import and export with metadata for Subversion repositories (#1501)
* Add store exporter to collect the repository metadata
* Add EnvironmentInformationXmlGenerator
* Collect export data and put into compressed tar archive output stream
* Create full repository export endpoint.
* Add full repository export to ui
* Ignore irrelevant files from config store directory
* write metadata stores to file since a baos could teardown the server memory
* Migrate store name for git lfs files (#1504)

Changes the directory name for the git LFS blob store by
removing the repository id from the store name.

This is necessary for im- and exports of lfs blob stores,
because the original name had the repository id as a part
of it and therefore the old store would not be found when
the repository is imported with another id.

Existing blob files will be moved to the new store location
by an update step.

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>

* Introduce util for migrations (#1505)

With this util it is more simple to rename
or delete stores.

* Rename files in export

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-01-28 11:40:35 +01:00
Konstantin Schaper
94304f96a3 migrate integration tests to bdd (#1497)
Migrates the existing e2e tests towards a cucumber bdd-style and utilizes the integration-test-runner package.

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-01-26 12:58:48 +01:00
Sebastian Sdorra
22375c8096 Do not abort on failing test, if we run on ci server 2021-01-14 12:01:34 +01:00
Sebastian Sdorra
17706161ba Use Java 11 for build but 8 as target platform 2021-01-14 12:01:33 +01:00
Sebastian Sdorra
8c27af2661 Remove maven build related files 2021-01-14 12:01:30 +01:00
Sebastian Sdorra
5c379a5bb4 Align dependency configurations and versions 2021-01-14 11:56:05 +01:00
Sebastian Sdorra
02e8e3795a Move scm-core module.xml
We move module.xml from scm-core to scm-annotations to avoid conflict with the annotation processor.
2021-01-14 11:55:27 +01:00
Sebastian Sdorra
9d27c12de3 Read version from build-info.properties instead of pom.properties 2021-01-14 11:55:27 +01:00
Sebastian Sdorra
acd8eb3a9a Add build information (version) to scm-core.jar 2021-01-14 11:55:27 +01:00
Sebastian Sdorra
290e7decd8 Migrate module scm-dao-xml 2021-01-14 11:55:27 +01:00
Sebastian Sdorra
f749a71aea Migrate module scm-core 2021-01-14 11:55:27 +01:00
René Pfeuffer
c58bd2f664 Include JRE version in plugin center url (#1494) 2021-01-13 09:18:28 +01:00
Eduard Heimbuch
adf7bac665 Subversion repository export
Add the repository export function for Subversion repositories. The repository will be exported as dump file which can be downloaded directly or inside a gzip compressed archive.
2021-01-08 09:19:33 +01:00
CES Marvin
374d085fdd prepare for next development iteration 2020-12-17 15:24:34 +00:00
CES Marvin
38a7ff6acb release version 2.12.0 2020-12-17 14:55:08 +00:00
Sebastian Sdorra
b61d817c9c Implement mercurial cgi protocol as extension (#1458)
* Handle mercurial cgi protocol with an hg extension
* Refactor CGI executor to allow command arguments
* Unify python scripts and hg extensions
* Implement new auto configuration
* Use HKEY_LOCAL_MACHINE instead of
  HKEY_CURRENT_USER registry keys to find mercurial
  installations on windows
2020-12-17 10:07:20 +01:00
René Pfeuffer
8e3b0e4145 Archive repository (#1477)
This adds a flag "archived" to repositories. Repositories marked with this can no longer be modified in any way. To do this, we switch to a new version of Shiro Static Permissions (sdorra/shiro-static-permissions#4) and specify a permission guard to check for every permission request, whether the repository in question is archived or not. Further we implement checks in stores and other activies so that no writing request may be executed by mistake.

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2020-12-16 10:58:29 +01:00
Eduard Heimbuch
45bb6d3ae9 Make getter for archive in UnbundleCommandRequest public to resolve classloading errors between pluginClassLoader and webappClassLoader 2020-12-10 13:56:20 +01:00
CES Marvin
56c63cb5b7 prepare for next development iteration 2020-12-07 15:01:20 +00:00
CES Marvin
baf04a551c release version 2.11.1 2020-12-07 14:24:49 +00:00
René Pfeuffer
eaf59f91c4 Harmonize logging string for repositories 2020-12-04 11:48:32 +01:00
CES Marvin
87d06a708b prepare for next development iteration 2020-12-04 08:10:20 +00:00
CES Marvin
df62ffbe16 release version 2.11.0 2020-12-04 07:27:13 +00:00
Eduard Heimbuch
dd0bcc4a3f Merge branch 'feature/import_git_from_url' of github.com:scm-manager/scm-manager into feature/import_git_from_url 2020-12-03 08:55:15 +01:00
Eduard Heimbuch
09c13100dd cleanup 2020-12-03 08:54:56 +01:00
Eduard Heimbuch
f6863a2676 Apply suggestions from code review
fix javadoc

Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
2020-12-03 08:54:43 +01:00
Eduard Heimbuch
60cdc6f8cf Merge branch 'develop' into feature/import_git_from_url 2020-12-02 14:39:45 +01:00
Eduard Heimbuch
7db33d2e65 Mind review findings 2020-12-02 10:47:48 +01:00
Eduard Heimbuch
e7b7bf5b0f fix repository permission error 2020-12-01 16:40:29 +01:00
Konstantin Schaper
9ec8b4efac fix review findings 2020-12-01 15:16:55 +01:00
Eduard Heimbuch
b40bfd8fe2 Merge branch 'develop' into feature/import_git_from_url 2020-12-01 12:18:13 +01:00
Konstantin Schaper
e8044747e3 fix review findings 2020-12-01 11:18:19 +01:00
Konstantin Schaper
8986e3d378 Merge branch 'develop' into feature/manage-tags
# Conflicts:
#	scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgRepositoryServiceProvider.java
2020-11-30 14:18:05 +01:00