Commit Graph

1255 Commits

Author SHA1 Message Date
René Pfeuffer
b14fa86550 Add log for error in git mirror (#1689)
Without this log you will get no trace of the error,
only the message of it in the mirror log. This may
not be enough to trace the cause of the error.
2021-06-09 08:57:01 +02:00
CES Marvin
18b64023fc Prepare for next development iteration 2021-06-04 13:25:11 +00:00
CES Marvin
9c372a8df9 Release version 2.19.0 2021-06-04 12:57:19 +00:00
Eduard Heimbuch
dd0975b49a Feature/mirror (#1683)
Add mirror command and extension points.

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2021-06-04 14:05:47 +02:00
Sebastian Sdorra
d7d0d2375c Update jgit to v5.11.1.202105131744-r-scm1 (#1661)
Update jgit to v5.11.1.202105131744-r-scm1

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2021-05-20 14:14:58 +02:00
Konstantin Schaper
7286a62a80 Implement api for extension point typings (#1638)
Currently, the only way to explore available extension points is through our documentation or by browsing the source code. Once you find them, there is no guard rails and the usage is prone to user errors. This new api allows the declaration of extension points as types in code. This way, exposing an extension point is as easy as exporting it from a module. Both the implementation and the developer who uses the extension point work with the same shared type that allows auto-completion and type-checks for safety. This feature is backwards-compatible as the generic methods all have sensible defaults for the type parameters.

Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2021-05-12 16:05:30 +02:00
CES Marvin
87bcdc3560 Prepare for next development iteration 2021-05-05 14:02:00 +00:00
CES Marvin
3791656760 Release version 2.18.0 2021-05-05 13:30:50 +00:00
Eduard Heimbuch
7e3a6b6fb2 Show correct default branch in repository config (#1643) 2021-05-05 14:45:18 +02:00
René Pfeuffer
77b62be68a Fix messages for post commit hooks in git (#1647)
Fixes the transmission of messages from post commit hooks in Git repositories. We therefore use a new method patched in jGit for SCM-Manager. This simplifies the trigger logic a lot.
2021-05-04 16:53:43 +02:00
Eduard Heimbuch
af8980de19 Improve repository information page (#1636)
Only show relevant information for repository on repository information page. The initialization code example is only shown if the repository is still empty.
2021-04-29 18:13:32 +02:00
CES Marvin
9782fd2e8f Prepare for next development iteration 2021-04-26 14:31:33 +00:00
CES Marvin
11fa65f537 Release version 2.17.1 2021-04-26 13:51:39 +00:00
CES Marvin
26c04a2f8b Prepare for next development iteration 2021-04-22 09:19:35 +00:00
CES Marvin
a9c64642aa Release version 2.17.0 2021-04-22 08:50:04 +00:00
CES Marvin
5f887d4fa8 Prepare for next development iteration 2021-03-26 10:15:25 +00:00
CES Marvin
9a2204b68c Release version 2.16.0 2021-03-26 09:39:47 +00:00
Eduard Heimbuch
d94ebb2e3e Validate filepath and filename to prevent path traversal (#1604)
Validate filepath and filename to prevent path traversal in modification
command and provide validations for editor plugin.

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-03-25 12:50:24 +01:00
Eduard Heimbuch
c5720b36b5 Collect metrics over lifetime of working copies (#1591)
Capture metrics about the lifetime of working copies used, for example, by the merge and modify commands. Working copies are internal repository clones that can place a large load on the server. Therefore, these metrics can be helpful in identifying sources of large server load.

Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
2021-03-24 13:03:20 +01:00
Eduard Heimbuch
7b6dfb3880 Bump smp gradle plugin version to fix missing plugin description in plugin center 2021-03-22 16:11:01 +01:00
Sebastian Sdorra
26b65582ce Core metrics (#1586)
Expose metrics for http requests and executor services.
2021-03-17 11:09:52 +01:00
CES Marvin
4dbcc019b7 Prepare for next development iteration 2021-03-17 09:19:04 +00:00
CES Marvin
05062844f8 Release version 2.15.1 2021-03-17 08:52:18 +00:00
CES Marvin
ddac6b1e50 Prepare for next development iteration 2021-03-12 13:43:05 +00:00
CES Marvin
6b90e3efe4 Release version 2.15.0 2021-03-12 13:07:53 +00: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
Florian Scholdei
0d3339b0cb Add repository-specific non-ff disallowed option (#1579)
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-03-11 10:13:26 +01:00
Sebastian Sdorra
cff00b363d Upgrade to react 17.0.1 (#1570)
* Upgrade react to 17.0.1

* Remove unused dependencies

* Use version 17.0.1 of react-test-renderer

* Use fixed react type for core plugins

* Fix enzyme on react 17
2021-03-05 15:09:35 +01:00
CES Marvin
087c7f3712 Prepare for next development iteration 2021-03-03 15:16:52 +00:00
CES Marvin
396789efa4 Release version 2.14.1 2021-03-03 14:21:12 +00:00
CES Marvin
fe73d46e08 Prepare for next development iteration 2021-03-01 13:01:50 +00:00
CES Marvin
caf29c555b Merge branch 'master' into develop 2021-03-01 13:01:29 +00:00
CES Marvin
a25fd7acbb Release version 2.14.0 2021-03-01 12:32:32 +00: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
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
Konstantin Schaper
3a8d031ed5 Introduce stale while revalidate pattern (#1555)
This Improves the frontend performance with stale while
revalidate pattern.

There are noticeable performance problems in the frontend that
needed addressing. While implementing the stale-while-revalidate
pattern to display cached responses while re-fetching up-to-date
data in the background, in the same vein we used the opportunity
to remove legacy code involving redux as much as possible,
cleaned up many components and converted them to functional
react components.

Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2021-02-24 08:17:40 +01:00
Eduard Heimbuch
83a9c90130 Post receive hook after import (#1544)
Fire post receive repository hook event after pull from remote
and after unbundle (Git, HG and SVN)

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-02-22 09:20:15 +01:00
René Pfeuffer
eef74e3a50 Fix flappy test 2021-02-19 09:42:59 +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
René Pfeuffer
b8bd140934 Debug test failure 2021-02-16 10:18:09 +01:00
René Pfeuffer
04c6243f64 Fix interrupt handling 2021-02-04 09:23:32 +01:00
René Pfeuffer
7a7ac9a3f2 Bugfix: Conflict in pack parser (#1518)
The change tackles a sporadic error in integration tests, where during or after a change in a git repository a pack file could not be read correctly due to a "short compressed stream". The exception could look like this:

ERROR org.eclipse.jgit.internal.storage.file.ObjectDirectory - Exception caught while accessing pack file scm-home/repositories/8gSNr4ogc5X/data/objects/pack/pack-51a3500283ece83ab8efa7edfb9370e6f97311b5.pack, the pack file might be corrupt. Caught 1 consecutive errors while trying to read this pack.
java.io.EOFException: Short compressed stream at 197
	at org.eclipse.jgit.internal.storage.file.PackFile.decompress(PackFile.java:381)
	at org.eclipse.jgit.internal.storage.file.PackFile.load(PackFile.java:815)
	at org.eclipse.jgit.internal.storage.file.PackFile.get(PackFile.java:284)
	at org.eclipse.jgit.internal.storage.file.ObjectDirectory.openPackedObject(ObjectDirectory.java:455)
	at org.eclipse.jgit.internal.storage.file.ObjectDirectory.openPackedFromSelfOrAlternate(ObjectDirectory.java:413)
	at org.eclipse.jgit.internal.storage.file.ObjectDirectory.openObject(ObjectDirectory.java:404)
	at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:132)
	at org.eclipse.jgit.treewalk.CanonicalTreeParser.reset(CanonicalTreeParser.java:191)
	at org.eclipse.jgit.treewalk.TreeWalk.parserFor(TreeWalk.java:1344)
	at org.eclipse.jgit.treewalk.TreeWalk.addTree(TreeWalk.java:732)
	at sonia.scm.repository.spi.Differ.create(Differ.java:102)
	at sonia.scm.repository.spi.Differ.diff(Differ.java:63)
We found out that this seems to be linked to the asynchronous execution of post commit hooks, that originally are triggered in the midst of the processing of a receive pack.

With this change the fireing of these triggers is delayed until the end of the internal git processing. The central class for this is the GitHookEventFacade, where hook events are either

- put into a ThreadLocal, so that they can be triggered later, or
- triggered in a thread that is joined with an internal JGit thread for internal pushes (eg. for modify command or merge command)
2021-02-03 11:08:13 +01:00
CES Marvin
0cd7fdcec5 Prepare for next development iteration 2021-01-29 11:25:23 +00:00
CES Marvin
6e54f19dc9 Release version 2.13.0 2021-01-29 10:04:49 +00: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
Eduard Heimbuch
4fb42de0ca Fix unit test 2021-01-26 14:32:03 +01:00
Eduard Heimbuch
d737c3aa9f Fix unit test 2021-01-26 12:55:01 +01:00
Sebastian Sdorra
d695925d38 Update jgit to 5.10.0.202012080955-r-scm1 2021-01-18 09:15:51 +01:00