* Update plugins/replication from branch 'master'
- Fix Bazel build with testonly attribute set
Replication plugin tests depend on //gerrit-acceptance-framework:lib
which is flagged with testonly attribute.
For Bazel, all the dependencies in the tree need to have the testonly
set consistently.
Change-Id: I0eb3f6c3f2123b66b98b8c8060badc9bbaa88dd6
* Update plugins/replication from branch 'master'
- Create Destination using Guice Factory
Destination classes were instantiated in ReplicationFileBasedConfig
which required to have all Destination dependencies injected in
ReplicationFileBasedConfig.
Create Destination using a new DestinationFactory to stop having to
pass dependencies from one class to another.
Also-By: David Pursehouse <dpursehouse@collab.net>
Change-Id: If4d9bc5266837b8fec261decfbd1e651c4cb0f51
- ReplicationFileBasedConfig: Replace FluentIterable with streams/lambda
Change-Id: I85356369f245a45aaef6db20655ac18750cb3400
* Update plugins/hooks from branch 'master'
- Merge branch 'stable-2.13'
* stable-2.13:
Add project name to commit received hook
Always return the output from ref-update hook
Change-Id: Id86c2c7acf94e2a7b2e1a3e3af7c3637b054f65f
- Add project name to commit received hook
This also implicates that GIT_DIR and the working directory is correctly
set for the ref-update hook.
Bug: Issue 4841
Change-Id: I48141d316cacdd649f6e56ea48d689d06940fbf5
- Always return the output from ref-update hook
Change I5905c44c7 moved the invocation of the ref-update hook out of
the ReceiveCommits implementation and into CommitValidators. Since
then, the output of the ref-update hook is not sent back to the git
client except in the case of an error or rejection.
Update the handling of the ref-update hook in the plugin so that its
output is returned back to the caller as a commit validation message
which is then sent to the client.
Change-Id: I88af8a3c690cc226214208c3c93f552f054ccae0
Reported-By: Robert Niemi <robert.den.klurige@googlemail.com>
* Update plugins/cookbook-plugin from branch 'master'
- Get rid of dependency on Guava
Since I789f9aa589 removed usage of Guava's Optional, we only have
the dependency on Guava for the following simple utility methods:
Strings.isNullOrEmpty
MoreObjects.firstNonNull
Remove the dependency and instead provide own implementations
of those methods.
Change-Id: Iddcc20005004d37dae703fc0522c546a5212575c
* submodules:
* Update plugins/replication from branch 'master'
- Remove usage of deprecated Throwables methods
The propagate and propagateIfPossible methods are deprecated in
Guava 20. Replace them with the recommended alternatives.
Change-Id: I8aacba415a15655850c9d2e7ba8bd207db930460
* Update plugins/replication from branch 'master'
- Merge branch 'stable-2.13'
* stable-2.13:
Make SearchingChangeCacheImpl nullable when replicating from slave
Change-Id: I0d23a61100350239432d8eeb701483afe0625fb6
- Make SearchingChangeCacheImpl nullable when replicating from slave
SearchingChangeCacheImpl should be nullable in slave mode.
Change-Id: If22407565f44e7ed201e57d7d3b7b9a51f20b5bc
* Update plugins/hooks from branch 'master'
- Merge branch 'stable-2.13'
* stable-2.13:
Add --change-url with correct value
Change-Id: I6bf2b4c547d206190ff32702c2eeb1b942f1b377
- Add --change-url with correct value
Create the URL with the change-id rather than the change number.
Change-Id: I7fb753fec0bc776c593062e3e44f48dd9004b085
* Update plugins/replication from branch 'master'
- Removed the recommendation for ssh
As discussed many times during the Gerrit conferences and hackathons,
Git/SSH replication on Gerrit isn't stable enough due to the JSch
client stack. Removing the recommendation from the documentation
may help in choosing alternative methods.
Change-Id: I3c8646135999d6cbb99b58d83d42655d25ea23e9
* Update plugins/replication from branch 'master'
- Remove dependencies exported in the plugin API
Change-Id: I3f0b3d33a8819e6489629b34706c72b4ab3d3f1c
Listener to provide extensions with validation of assignees.
Change-Id: I61f6558d79b8e4c0d322c293dacdf4f33d882b26
* submodules:
* Update plugins/cookbook-plugin from branch 'master'
- AssigneeValidator example
Will not allow a user to be assigned to more than 5 changes.
Change-Id: I1887f7007e66bd5ccac207c7789be2712ffbd00a
* Update plugins/cookbook-plugin from branch 'master'
- Merge branch stable-2.13
* stable-2.13:
Build with API version 2.13
Change-Id: I681fd49d49e9fb8d83723d63839b7c77fcd25f3f
- Build with API version 2.13
Change-Id: I45579c60ead1817674a93919be50efad5a1506af
* Update plugins/cookbook-plugin from branch 'master'
- Bump GWT version to 2.8-rc2
Change-Id: I886c722df7515a0bab524da295b24d4e6141ec10
- Bump plugin API to 2.14-SNAPSHOT
Change-Id: Ie83d3215d72598b7458f520922f47b836d5c2015
This version fixed a major issue: [1] that was a reason of frustration
of many plugin developers: Not cache sources files under symbolic link.
Now for all such source files, the warning is issued:
"
Disabling caching for target //plugins/wip:wip__plugin, because one or
more input files are under a symbolic link
({plugins/wip=/home/davido/projects/wip}). This will severely impact
performance! To resolve this, use separate rules and declare
dependencies instead of using symbolic links.
"
To suppress this warning we add project.allow_symlink option. This
doesn't have any impact for gerrit core but silences the warning above
when plugins are built in gerrit tree mode.
As pointed out in this issue: [2], we are using some artifacts as source
to the java_library() rule as well as binary_jar for prebuilt_ja rule.
To avoid the warning, we rename sources to have "-sources.jar" suffix
and we rename *.zip to end with .jar in other places.
"
Assuming edit.src.zip is a JAR and renaming to edit.src.jar in
//gerrit-patch-jgit:edit_src. Change the extension of the binary_jar to
'.jar' to remove this warning.
"
source_under_test attribute was removed from java_test() rule.
Replication and cookbook-plugin are updated as well.
local.properties support was removed, but we use it only for download
process customization in our own python script, so that we can keep it
usage and not need to move it to .buckconfig.local.
[1] https://github.com/facebook/buck/issues/341
[2] https://github.com/facebook/buck/issues/855
Change-Id: Idf76cc71c21df43e808179b645f9175767b322a8
Snapshot disappeared on us. Include revert of submodule change.
This reverts commit ea67c7ff00a436402f22c61df58afb017d13b3a4.
Change-Id: Iee0c80c57a456b57a98b79ae9a3085ab08990428
* submodules:
* Update plugins/replication from branch 'master'
- Merge "Revert "Remove usage of to-be-deprecated Throwables methods""
- Merge "Change docs links to actual file extension (.md)"
- Change docs links to actual file extension (.md)
See https://gerrit-review.googlesource.com/83950 for detailed context.
Change-Id: I1d86feee4aaffcf7b9bd7db5e094c6a421bb6b42
* Update plugins/replication from branch 'master'
- Merge "Change docs links to actual file extension (.md)"
- Change docs links to actual file extension (.md)
See https://gerrit-review.googlesource.com/83950 for detailed context.
Change-Id: I1d86feee4aaffcf7b9bd7db5e094c6a421bb6b42
* Update plugins/reviewnotes from branch 'master'
- Change docs links to actual file extension (.md)
See https://gerrit-review.googlesource.com/83950 for detailed context.
Change-Id: I4dc35b6396b57f70f659d4a458011b08817d8719
* Update plugins/hooks from branch 'master'
- Change docs links to actual file extension (.md)
See https://gerrit-review.googlesource.com/83950 for detailed context.
Change-Id: If9d4f0726a0d8d3ca66f01819eeada2b53ac41be
* Update plugins/download-commands from branch 'master'
- Change docs links to actual file extension (.md)
See https://gerrit-review.googlesource.com/83950 for detailed context.
Change-Id: I425285fc81404d49629bf2f468f45c3fc67dd8f9
* changes:
Remove usage of to-be-deprecated Throwables
Update Guava to 20.0 snapshot version 20160818.201422-323
*submodules:
* Update plugins/replication from branch 'master'
- Remove usage of to-be-deprecated Throwables methods
The propagate and propagateIfPossible methods will be deprecated
in Guava 20. Replace them with the recommended alternatives.
Change-Id: I11d8adcae3000189c16f60179e02a79440ef99d6
When multiple reviewers were added to a change, notify them all with
a single event and let listeners act on each individual reviewer as
necessary.
This change is needed to allow splitting the mail notifications to a
listener.
Change-Id: I8b1f3918877b9635a6592beae6ad5aeea0a5adce
*submodules:
* Update plugins/cookbook-plugin from branch 'master'
- Add user ref operation validation example.
The following example blocks any update to any ref that starts with
'refs/heads/protected-' prefix if it is performed by user that has
no 'Administrate Server' capability.
Change-Id: If5373d238a4d30fc450a4114e6af51d6536ae91a
Signed-off-by: Jacek Centkowski <geminica.programs@gmail.com>
- Add example implementation of ExternalIncludedIn extension point
Change-Id: Ied5517cf9da58c748ad60bdf96444828a6051df3
Signed-off-by: Edwin Kempin <ekempin@google.com>
* Update plugins/replication from branch 'master'
- Merge branch 'stable-2.12'
* stable-2.12:
Destination: Consider ref visibility when scheduling replication
On master the isVisibilty method was renamed to shouldReplicate and has
additional logic to check for replication of hidden projects.
Rename the newly added isVisibility method to shouldReplicate to be
consistent. Move the hidden projects logic to a utility method and use
it in both shouldReplicate methods.
Change-Id: I7b713636164fd78425561a98a1f50182c9501f4a
- Destination: Consider ref visibility when scheduling replication
Bug: Issue 4398
Change-Id: I11856eabf61e734691e1b00f1c3083c017f96a01
Parses updates to a change's reviewers, and serves them with the change
details. Will be picked up by PolyGerrit UI and displayed in change's
messages section in follow-up change.
Feature availability depends on NoteDb migration.
Feature: Issue 4148
Change-Id: I50e75ba9e5a885de4733a3a8d7d156d3729d1d91
The 'when' field tells when the event occurred, and 'who' tells which
account performed the action that triggered the event.
Deprecate the existing events' get..() methods in favor of getWho().
Change-Id: I3fdae6c5b76eda8494bf3b5c95ea6bb077690d04
Only change predicates need to have a match method, because for
historic reasons changes may be loaded from multiple sources.
Predicates for other indices do not need to implement a match method
because the data is always loaded from the index. An exception are
the predicates that check visibility for which a match method is
always required.
Change-Id: I3492bc83b6faf6708ab0102a49463aa0d4a3d10b
Signed-off-by: Edwin Kempin <ekempin@google.com>
- Handle kill command in replication tasks also while running
Change-Id: Ic4e7eab0a5fc05e08749a0b5a166b39a0ac2b3ca
Signed-off-by: Jacek Centkowski <geminica.programs@gmail.com>
This is an analogous problem to the one with search results fixed in
Ie54b9e2d. VisibleRefFilter is a little trickier because it was using
ChangeCache, which only returned Changes, not the reviewer set. Change
SearchingChangeCacheImpl to cache a different value type and return
ChangeDatas from its search method so we can use the cached
ReviewerSet where appropriate.
Unfortunately for the Reindex program we still need to support not
having a SearchingChangeCacheImpl, which means we have a completely
separate codepath for reading changes from the database.
Change-Id: Ic432a8e48a2bafc8d142b84b25101d95ffb674b7