36039 Commits

Author SHA1 Message Date
Fabio Ponciroli
380e39158c Add utility script to remove refs used by NoteDB
This util script can be used in case of rollback to ReviewDB during an unsuccessful
migration to NoteDB or simply while testing the migration process.

It will remove all the refs used by NoteDB added during the migration
(i.e.: change meta refs and sequence ref).

Change-Id: Ibe0317bc848795d7e0ba3e39284496404d6f0688
2019-09-10 05:26:24 +00:00
David Pursehouse
4eb25d1cca Merge branch 'stable-2.15' into stable-2.16
* stable-2.15:
  Format BUILD files with buildifier
  Format BUILD files with buildifier
  junit.bzl: Fix name conventions warning flagged by buldifier
  Bazel: Avoid using tools in action inputs
  dev-contributing: Update recommended version of buildifier to 0.28.0

Change-Id: I20579e30a97b640d23df38e2bf129fea0003c548
2019-09-09 08:22:58 +09:00
David Pursehouse
7ed7cbdccb Format BUILD files with buildifier
Using buildifier from master branch and the command:

$ buildifier -r -lint fix -warnings all .

Change-Id: I5560593b8d4b34f0ad3003af312ca167b2a68a50
2019-09-08 22:51:29 +09:00
David Pursehouse
2e9924535a Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
  Format BUILD files with buildifier
  junit.bzl: Fix name conventions warning flagged by buldifier
  Bazel: Avoid using tools in action inputs
  dev-contributing: Update recommended version of buildifier to 0.28.0

Change-Id: I7351d4c21d53255992170f750b6ef9e61d1d1716
2019-09-08 22:51:02 +09:00
David Pursehouse
b80867d747 Format BUILD files with buildifier
Using buildifier from master branch and the command:

$ buildifier -r -lint fix -warnings all .

Change-Id: Ib0dbc38ba370edaa3bda999d49ee378917ae32c4
2019-09-08 22:32:10 +09:00
David Ostrovsky
9c3b07fea0 junit.bzl: Fix name conventions warning flagged by buldifier
Running recent buildifier version in warn mode reports this warning:

./tools/bzl/junit.bzl:60: name-conventions: Variable name "_GenSuite"
should be lower_snake_case (for variables), UPPER_SNAKE_CASE (for
constants), or UpperCamelCase ending with 'Info' (for providers).

https://github.com/bazelbuild/buildtools/blob/master/WARNINGS.md#name-convention

Change-Id: I2fd8490e95a1b103a9ece9c68f2d09c5e4f3fbb0
2019-09-08 19:59:19 +09:00
David Ostrovsky
4f89f03dca Bazel: Avoid using tools in action inputs
Bazel version 0.29 flipped the bit for this option:
--incompatible_no_support_tools_in_action_inputs to ensure, that tools
are not used in input, but instead passed as new parameter tools: [1].

Change I744ae1b28a already fixed some places, but missed the place
fixed in this change. The problem shows up when debugging of GWT code
with Bazel 0.27 and later.

Test Plan:

  $ bazel build //gerrit-gwtui:ui_safari

[1] https://github.com/bazelbuild/bazel/issues/5826

Change-Id: I491d70361444e4fb41a1dc2b7dbe422969c090ff
2019-09-08 19:59:12 +09:00
David Pursehouse
49f1dc61d6 dev-contributing: Update recommended version of buildifier to 0.28.0
Change-Id: I1571616479811eb263b7e1a299e91feed8b54a83
2019-09-08 15:01:20 +09:00
David Pursehouse
a7e92fb9cd Merge branch 'stable-2.15' into stable-2.16
* stable-2.15:
  Upgrade JGit to 4.11.9.201909030838-r

Change-Id: Ie2384bb7bae2c1b63cb96f742a0656adcaddca53
2019-09-05 16:00:01 +09:00
David Pursehouse
632b5b0f4c Merge "Convert NoteDb migrator output into chars" into stable-2.16 2019-09-04 23:20:22 +00:00
Luca Milanesio
4b64e05d14 Convert NoteDb migrator output into chars
Fix the NoteDb migration progress by converting its binary output
into printable characters that can be easily understood by humans.

Bug: Issue 11444
Change-Id: I6c2c6f036d8e5402ce72b7cdd53a4677b0f54521
2019-09-04 23:05:31 +01:00
Matthias Sohn
69d4ad47d6 Revert "Revert "GerritServer: Silence non-critical logs from JGit's FS""
This reverts commit 7e072d129acf7219521c2a2f7334907e45da4adf.

Change-Id: I5569358cd673144eb4fae4a5fdaf5bbddc3b1cb6
2019-09-04 18:56:55 +02:00
Matthias Sohn
c89e125c73 Upgrade JGit to 5.1.11.201909031202-r
Improvements in 5.1.8 - 5.1.11:
- include filekey file attribute (inode on *nix filesystems) when
  comparing FileSnapshots
- optionally wait opening new packfile until it can't be racy anymore
- fix FileSnapshot's consideration of file size
- ObjectDirectory: fix closing of obsolete packs
- measure FileStoreAttributes per filesystem
  - improve measuring file timestamp resolution
  - measure minimal racy interval
  - use Instant to increase resolution to 1us (limited by FileTime)
  - persist FileStoreAttributes
  - optional asynchronous measurement of FileStoreAttributes
  - directory - FileStore cache
- cache user and system level gitconfig
- fix supportsAtomicCreateNewFile default to true
- fix non-deterministic hash of archives created by ArchiveCommand
- reproduce racy atomic update in PackedBatchRefUpdate and fix it

Release notes:
https://projects.eclipse.org/projects/technology.jgit/releases/5.1.8
https://projects.eclipse.org/projects/technology.jgit/releases/5.1.9
https://projects.eclipse.org/projects/technology.jgit/releases/5.1.10
https://projects.eclipse.org/projects/technology.jgit/releases/5.1.11

Change-Id: Ia93eaee442096eabdb999c9c9a6fc0edeb10c0fe
2019-09-04 18:56:54 +02:00
Matthias Sohn
98f442a828 Revert "Revert "GerritServer: Silence non-critical logs from JGit's FileSnapshot""
This reverts commit 6dba3ba183bce26be0bdf8095b3e9ce3e058612d.

Change-Id: I61733b44ba710a986a746b0502ff8c1b5a4eb2f0
2019-09-04 18:56:54 +02:00
Matthias Sohn
064f0597e3 Revert "Revert "Stop using deprecated DirCacheEntry#setLastModified(long)""
This reverts commit dd382e8ac9eb7287060a6dfde5227982cff8b888.

Change-Id: Ia2dda0461a99cc3f023e34902ca1c5424904d215
2019-09-04 18:56:54 +02:00
Matthias Sohn
89bfdb1e07 Upgrade JGit to 4.11.9.201909030838-r
This release fixes
- PackedBatchRefUpdate: reproduce racy atomic update, and fix it

Release notes:
https://projects.eclipse.org/projects/technology.jgit/releases/4.11.9

Bug: Issue 11373
Change-Id: Ia31e0f9b859bc0bc0cf6e532f9ca08b59221c977
2019-09-04 15:13:15 +02:00
Edwin Kempin
68b414f4fe Merge "Load proto_library from @rules_proto//proto:defs.bzl" into stable-2.16 2019-09-04 11:58:58 +00:00
Edwin Kempin
599f9a8aab Merge "Merge branch 'stable-2.15' into stable-2.16" into stable-2.16 2019-09-04 11:57:57 +00:00
Edwin Kempin
333965b90b Merge "Merge branch 'stable-2.14' into stable-2.15" into stable-2.15 2019-09-04 11:57:49 +00:00
David Pursehouse
32b499b719 Load proto_library from @rules_proto//proto:defs.bzl
Running buildifier at the head of master with -lint=warn shows
the warning:

  native-proto: Function "proto_library" is not global anymore and
  needs to be loaded from "@rules_proto//proto:defs.bzl"

Add rules_proto in the WORKSPACE and use it in the proto BUILD.

Change-Id: I54363f08cab3a184b6b3cd1ff6baaa38824aa9a3
2019-09-04 16:38:14 +09:00
David Pursehouse
31c82401f0 Merge branch 'stable-2.15' into stable-2.16
* stable-2.15:
  Bazel: Add fixes for --incompatible_load_{java|python}_rules_from_bzl
  Bazel: Bump minimum supported version to 0.29.0
  Lucene index configuration and docs.

Change-Id: I6c597cbc89fafece83c374e9b36c4c4c0126704f
2019-09-04 16:35:55 +09:00
Luca Milanesio
91666f8943 Update git submodules
* Update plugins/replication from branch 'stable-2.16'
  to 60f470c96232d44c5fd83c75ac99174b356adcf5
  - Persist replication task when pushing all refs
    
    Create a replication event associated with the replication of all
    refs, so that the completion of the operation would find a corresponding
    task and will not throw an exception.
    
    Another benefit also is the ability to replay pending replication
    events for a push of all refs upon plugin restarts and configuration
    reloads.
    
    Bug: Issue 11424
    Change-Id: I63a82ff128c98e0ab7e58b76fa8f8548eb74e915
2019-09-04 05:52:21 +00:00
David Pursehouse
3ab6d2d880 Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
  Bazel: Add fixes for --incompatible_load_{java|python}_rules_from_bzl
  Bazel: Bump minimum supported version to 0.29.0
  Lucene index configuration and docs.

Change-Id: I0a8c17c853746ca7367cc4b723b18f8d0f2b6094
2019-09-04 14:30:47 +09:00
David Pursehouse
5c07cbf314 Merge branch 'stable-2.13' into stable-2.14
* stable-2.13:
  Lucene index configuration and docs.

Change-Id: Ibb7e06e2b756f4a96f74b9c8b7ae61bb9d277c17
2019-09-03 23:04:39 +09:00
David Pursehouse
98ff7b1eed Merge changes from topic "incompatible_load" into stable-2.14
* changes:
  Bazel: Add fixes for --incompatible_load_{java|python}_rules_from_bzl
  Bazel: Bump minimum supported version to 0.29.0
2019-09-03 14:04:08 +00:00
Paladox none
4847def064 Use --header-text-color css variable for some classes in gr-main-header
Change-Id: Icb62d23b448ebf863683a6c6fd414d0b6cd24f65
(cherry picked from commit 8a1770b1fdd9be16c335dc6193a17e7ae0bcb349)
2019-09-02 19:25:13 +00:00
David Pursehouse
93b64947cf Merge branch 'stable-2.15' into stable-2.16
* stable-2.15:
  run_test.sh: Fix bazelisk location detection
  Bazel: Adapt docs for custom plugins with external deps
  PolyGerrit: Run WCT tests using bazelisk

Change-Id: I9c98b28cc467ea805b677808e40393ffb4572c1a
2019-09-02 09:47:12 +09:00
David Pursehouse
29f62da730 Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
  run_test.sh: Fix bazelisk location detection
  PolyGerrit: Run WCT tests using bazelisk

Change-Id: Ia5d3c3da14ac3c9e416550d704d56364bba52983
2019-09-02 09:41:38 +09:00
David Ostrovsky
20c2fd4f0b Bazel: Add fixes for --incompatible_load_{java|python}_rules_from_bzl
This change is fixing "All Java build rules should be loaded from
Starlark" warning flagged by latest buildifier version: [1]. Python
rules are now also loaded from the Starlark.

Also extract codemirror library import to BUILD file. This is needed to
avoid cycle in the workspace file, after importing java rules from
Starlark.

[1] https://github.com/bazelbuild/buildtools/blob/master/WARNINGS.md#native-java

Change-Id: I36192c9465d988b25cf09c250e110f15850910cd
2019-09-02 00:42:25 +02:00
David Ostrovsky
efc0fe6f77 Bazel: Bump minimum supported version to 0.29.0
Also harmonize the version used for Bazelisk to the same version.

Change-Id: I0bbf45fab96346e922c3758ba4e190c21e9440b6
2019-09-02 00:42:09 +02:00
David Ostrovsky
402274a247 run_test.sh: Fix bazelisk location detection
In I4b5a32a15d WCT tests invocation was switched from bazel to
bazelisk, but bazelisk location command was wrong. stderr and
stdout was erroneously redirected to the /dev/null, so that the
actual location of the bazelisk command was lost. Fix the location
detection command by redirecting only stderr but not stdout to the
null device.

Change-Id: I66cb33e0074675e00b0e58bb11413b5151a57533
2019-09-02 00:38:58 +02:00
David Pursehouse
c31ddef4da Set version to 2.16.12-SNAPSHOT
Change-Id: I9d4467128672d5fd6440e7ceac40604b4b3d5aa0
2019-09-01 11:45:19 +09:00
David Pursehouse
0dcbb5b7da Set version to 2.16.11.1
Change-Id: I391f9bb2168d86c847f9632268cce9e0cf8c4a1b
v2.16.11.1
2019-08-31 07:14:17 +09:00
David Ostrovsky
7c12542c09 Bazel: Adapt docs for custom plugins with external deps
After flipping of
--incompatible_disallow_load_labels_to_cross_package_boundaries bit in
Bazel: [1], currently documented way to import external dependencies
from plugins that implement standalone build mode doesn't work any more.

This change documents an alternative approach how to make it work,
without abandoning of standalone build mode.

[1] https://github.com/bazelbuild/bazel/issues/6408

Bug: Issue 10885
Change-Id: I7b1c4e9fa4f6ba8966efcde4cdee7d76d6f59d1c
2019-08-30 17:46:48 +02:00
David Pursehouse
0b175d7109 Merge branch 'stable-2.15' into stable-2.16
* stable-2.15:
  Fix base url in addHTML to correctly match
  Add base url to addHTML

Change-Id: I5aa62e6832349a7ff232d46dccb652255de5bc8e
2019-08-30 21:29:26 +09:00
Luca Milanesio
d985a83e2e Update git submodules
* Update plugins/replication from branch 'stable-2.16'
  to bfc9e0f05d1da46118723d846e9e450455d89b74
  - ReplicationIT: fix flakiness
    
    Fix the flakiness when checking for replication tasks stored
    events on the filesystem and when replicating new projects.
    
    Make use of the ReplicationTasksStorage for listing events
    instead of listing the filesystem and allow disabling the deletion
    so that the tests can have the time to verify the files existence.
    
    Change-Id: Idfba7d177faed3c3ff45507b6f5b6aadb0bc5dd0
2019-08-30 12:25:54 +00:00
Trevor Getty
8fb5db5b0d Lucene index configuration and docs.
Reindexing performance in gerrit is very slow when running on larger
multicore servers.
When you have multiple index threads putting content into LUCENE index,
it falls behind and starts to throttle the content being merged.

Updated to allow us to configure and override the default AutoDetected
configuration of the Lucene index queue and the threads it uses to
merge (add/update) data into the index.

The auto detection in the Lucene index by default does the following:
1) It throttles the index writing to less than 20Mb/s.
2) On storage arrays it detects them as being slow spinning rust, and not
  as faster SSD type systems. This in turn limits the lucene merge to only
  1 thread and a limited queue size of 6.

These settings allow the control of each of the auto detected settings
and adjustment to suit your own server and storage performance.

Bug: Issue 11356
Change-Id: Ie1be338f5a31f5ad572d9fdec19775b2dd09aa5f
2019-08-30 10:17:15 +02:00
David Ostrovsky
a07a82420f PolyGerrit: Run WCT tests using bazelisk
If bazelisk is installed, this bazel wrapper should be used to pick
the right bazel version specified in the .bazelversion file.

Change-Id: I4b5a32a15d190fd5733866dc18bbb1ed27a37f18
2019-08-30 06:54:24 +00:00
David Pursehouse
ede0209811 link-text-parser.js: Fix indentation
Change-Id: Ic6093047ce415babedfe70d918e13b44c1feb9ec
2019-08-30 13:28:16 +09:00
Paladox none
8f80c85187 Fix base url in addHTML to correctly match
Change-Id: Ie8d4f4060818358be0998fefd166a17342b76c55
2019-08-30 02:38:20 +00:00
Paladox none
afed1e7946 Add base url to addHTML
Change-Id: Ia0e2bd7e984f2b240dc543703b2449a17aa597e5
(cherry picked from commit 30a8957a4736592890a179130e28307b8463ce9d)
2019-08-30 02:38:08 +00:00
Paladox none
cf71094083 Add license to dark-theme
Change-Id: I942c499502d3d1dc38b5df300f4e0d46655b8553
2019-08-30 02:07:56 +00:00
Luca Milanesio
43b00fc585 Update git submodules
* Update plugins/replication from branch 'stable-2.16'
  to a1b83633a72c46a9ad641342fc7fe1e30631fafb
  - ReplicationIT: reduce execution time
    
    Change-Id: I259aa073ae16234d2aaa556012cfa2f584aca748
2019-08-29 23:37:45 +00:00
David Pursehouse
bee0ee50ac Update git submodules
* Update plugins/replication from branch 'stable-2.16'
  to 53af4e7839eb4b386584446ff8c4a53a0b706180
  - ReplicationIT: Split waitUntil to a separate class and fix it
    
    The waitUntil method does not fail the test if the expected condition
    is not satisfied within the timeout; it just returns.
    
    Split it out to a separate class, to make it easier to test, fix
    it, and add tests.
    
    Change-Id: I6cbd6801bcfd07869dd56d3ab6b54c5ac7c8a691
2019-08-29 21:10:56 +00:00
David Pursehouse
da9e4b8f1d Update git submodules
* Update plugins/replication from branch 'stable-2.16'
  to eef56952d3f5b05923ebcd07fdc1741a6bf9cc0e
  - ReplicationIT: Fix typo in constant name
    
    Change-Id: I349fc79f2b78d1d0bee23b516e37c29705f58a08
2019-08-29 21:09:36 +00:00
David Pursehouse
534e5b99de Fix documentation of UI selection
Since change Ie5c658488 it is no longer possible to disable the
PolyGerrit UI. The default UI is PolyGerrit, but can be switched
to GWT by a configuration setting. The documentation was not
updated and still claims that the PolyGerrit UI can be disabled.

Update the documentation to reflect reality.

Change-Id: I98ecbdfa8023f0e439f3f5d5e3613d02a6d0dfcd
2019-08-29 14:15:04 +09:00
David Pursehouse
ff43d4f05d Merge branch 'stable-2.15' into stable-2.16
* stable-2.15:
  Set version to 2.15.17-SNAPSHOT
  Set version to 2.15.16
  Revert "CreateAccount: Fail early when invalid SSH key is given"
  tools/eclipse/project.py: Fix typo of bazelisk
  Migrate from old-style legacy .java provider to the new JavaInfo.
  Support bazelisk or bazel in tools/eclipse/project.py
  Rework imports in project.py
  Update project.py to use argparse

Change-Id: If9388140c516f8ff2f5275eefe6cf65dad42449e
2019-08-29 08:16:50 +09:00
Luca Milanesio
7002bed08f Set version to 2.16.12-SNAPSHOT
Change-Id: I1123ba79472d0457d19676e337bd5ba167b8c9c7
2019-08-28 20:28:25 +00:00
Luca Milanesio
0aac211c17 Set version to 2.16.11
Change-Id: Iac9af4407c3e1f335917cbf4be691deb6b48a5e9
v2.16.11
2019-08-28 20:01:36 +00:00
David Pursehouse
6dba3ba183 Revert "GerritServer: Silence non-critical logs from JGit's FileSnapshot"
This reverts commit bd68b579e87736977df26bb6ef6a1649b635577f.

Reason for revert: Not needed after JGit update was reverted.

Change-Id: I6a27c05e7078d6874db66e1c0919622748e5bf75
2019-08-28 17:58:26 +00:00