Commit Graph

1473 Commits

Author SHA1 Message Date
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
Sebastian Sdorra
64cb20a951 Use Input instead of InputDirectory for directory property 2021-01-14 12:01:34 +01:00
Sebastian Sdorra
4e1bf1d13b Update timestamps of test report if running on ci
We have to update the timestamps of our test reports on the ci server,
because Jenkins fails it the reports are older than x minutes.
2021-01-14 12:01:34 +01:00
Sebastian Sdorra
964b6c3df5 Update grade-smp-plugin to version 0.7.0 and remove build of it 2021-01-14 12:01:34 +01:00
Sebastian Sdorra
651afc079a Update smp plugin to 0.6.0 2021-01-14 12:01:33 +01:00
Sebastian Sdorra
ac1abe23c1 Add missing avatar urls 2021-01-14 11:56:05 +01:00
Sebastian Sdorra
5c379a5bb4 Align dependency configurations and versions 2021-01-14 11:56:05 +01:00
Sebastian Sdorra
3a4a5a9d10 Migrate scm-it module to gradle 2021-01-14 11:55:28 +01:00
Sebastian Sdorra
c1aa851c72 Migrate plugins 2021-01-14 11:55:27 +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
Florian Scholdei
214cf527d4 Feature/harmonize translation keys (#1478)
Harmonize translation keys

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2020-12-16 11:24:13 +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
e62a598aa2 Fix initialization bug if master set as default branch
Fixes issue https://github.com/scm-manager/scm-manager/issues/1467
where initialization fails when master is set as default branch.
2020-12-07 15:14:01 +01: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
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
Konstantin Schaper
967de2160c fix sonarqube warnings 2020-12-02 10:11:53 +01:00
Konstantin Schaper
2fa4972883 fix git tag command unit test 2020-12-02 09:39:17 +01:00
René Pfeuffer
121e7bd638 Fix minor issues 2020-12-01 18:19:23 +01:00
Konstantin Schaper
9ec8b4efac fix review findings 2020-12-01 15:16:55 +01:00
Konstantin Schaper
3b3b8749b1 fix sonarlint issue 2020-12-01 09:13:47 +01:00
René Pfeuffer
8cd2c3f493 Use injector 2020-11-30 17:54:56 +01:00
René Pfeuffer
12fb2db0da Expose fact that git implements tag command 2020-11-30 16:47:28 +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
Konstantin Schaper
ebc1120182 Merge branch 'feature/manage-tags' of github.com:scm-manager/scm-manager into feature/manage-tags 2020-11-29 20:10:14 +01:00
Konstantin Schaper
0f7df6d8a8 fix sonarqube finding 2020-11-29 20:09:59 +01:00
René Pfeuffer
8ca64c3440 Fix signature check for git tags 2020-11-27 13:35:54 +01:00
Eduard Heimbuch
275ca49f71 Mark old import handler api as deprecated 2020-11-27 13:30:01 +01:00
Konstantin Schaper
6652a039dd fix unit tests 2020-11-27 12:40:02 +01:00