| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In CreateBranch, a RefUpdate is created with expectedOldObjectId set
but not oldObjectId. In DeleteBranch[es], none of expectedOldObjectId,
oldObjectId, and newObjectId is set.
As a result, when RefOperationValidators uses oldObjectId and
newObjectId to create a ReceiveCommand, they can be null, resulting in
NullPointerException when a listener dereferences them.
So use expectedOldObjectId instead of oldObjectId in
RefOperationValidators. Before a ref update has been performed, only
the former is meant to be set.
In DeleteBranch[es], set the expectedOldObjectId and the newObjectId
(which is zero). This way, in RefOperationValidators we know both values
will always be set.
Bug: Issue 5817
Helped-By: Jonathan Nieder <jrn@google.com>
Change-Id: If1f3a6179fa789077731a16e4b731227a73be7f2
|
|
|
|
| |
Change-Id: Ifefe36b432a69d0f0eeb183735cb21f9679a36b2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This release includes several bug fixes since 4.5.0.201609210915-r:
a9a84b723 JGit v4.5.1.201703201650-r
4c558225d Don't remove pack when FileNotFoundException is transient
4ddd4a3d1 Fix one case of missing object
8f6029786 Use the same variable to check and extract LFS object id
a66b4c29a Config: do not add spaces before units
535f0afd1 Unconditionally close repositories in RepositoryCache.clear()
5a1e147ea Fix eviction of repositories with negative usage count
15341ce57 pgm: Fix misspelled key of an externalized string
d2312f292 Add missing online help for Ketch server type option in CLI daemon
9cb8192d1 Remove wrong junit dependencies in org.eclipse.jgit.pgm
dd585b779 Fix carrying over flags during a RevWalk
c10a7e793 Turn off doclint also during Maven site generation
cb617e7ff Prepare 4.5.1-SNAPSHOT builds
Notably it fixes packfile list consistency in memory due to temporary
lack of system resources during read, causing transient file not found
errors.
Change-Id: I6eac409cc13f940a2b9b22c0285d62fd11047d54
Signed-off-by: David Pursehouse <dpursehouse@collab.net>
|
|
|
|
| |
Change-Id: If129658905324400b9dc7a9c0d503a41bfe55dda
|
|
|
|
|
|
|
|
| |
Our SSO system (Shibboleth, a SAML thing) is a federated system which
uses login names such as kundrat@cesnet.cz for unique identifiers.
Change-Id: Ic2df0f270c178e7a93dde5d0460dd24f10edf321
Bug: Issue 2830
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the last file of a branch was deleted by VersionedMetaData.saveFile
we discarded the new tree and instead kept the tree from the parent
commit. Due to this the file was not deleted and its original content
was kept.
This issue was introduced by change I83f09e08f.
E.g. this bug can be hit if all project watches of a user are deleted
and the user branch only contained the watch.config file. In this case
the project watches were still there after the deletion.
Change-Id: I3047ea087fb9981eb484ec6689652a0ed44e1b4b
Signed-off-by: Edwin Kempin <ekempin@google.com>
|
|
|
|
|
|
|
|
|
| |
The new method allows to delete all project watches of an account as an
atomic operation. We need this method to finish the migration of the
project watches to NoteDb on gerrit-review.
Change-Id: I6e4b50dc99913641bc9d39bab60a6bc5b2f2f073
Signed-off-by: Edwin Kempin <ekempin@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using a "gerrit.socket" unit file like this:
[Unit]
Description=Gerrit HTTP socket
[Socket]
ListenStream=80
Accept=no
[Install]
WantedBy=sockets.target
and a corresponding gerrit.service file enables an automatic start of gerrit
on the first request on port 80.
Change-Id: I1f82fed3c17f231915a5add4d7336a2b88457bc3
|
|\
| |
| |
| | |
missing" into stable-2.13
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The LfsPluginAuthCommand is only installed when lfs.plugin is set in the
gerrit.config file. However, if the corresponding plugin is not actually
installed, or it does not provide the command implementation, Failure is
thrown which results in a stack trace being emitted to the log on every
ssh push operation.
Change it to throw UnloggedFailure, and write a less verbose message to
the log at warn level. This will still be emitted to the log on every
ssh push, but it's less noisy than before.
Change-Id: Ie638bda96ddbac173eccd74f9f6a25ed87c778c8
|
|/
|
|
|
|
| |
Can happen if a branch is deleted and then restored by push.
Change-Id: Ie9ad0195af855327538b1c52ed0e6dc45b0130f8
|
|
|
|
|
|
|
|
|
|
| |
If the implementation of OperatingSystemMXBeanProvider can't be
instantiated, simply return null and thus skip the CPU and file
descriptors metrics, rather than throwing IllegalStateException
which prevents the site from starting.
Bug: Issue 5727
Change-Id: I8c8e155c274e788dbea07c64ae1c95aac09df35b
|
|
|
|
|
| |
Change-Id: I99f116462b0a59c3f036a55416398bef6e9e7f8e
Signed-off-by: Edwin Kempin <ekempin@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Gerrit users who are delegated to maintain the server may be highly
restricted to access projects and branches.
There are maintenance operations that can still be allowed
on change-ids even on non-visible projects.
By allowing users delegated to maintain the server to find
non-visible change-ids in the CLI we can enable features such as
the ad-hoc change indexing.
Change-Id: Ia2ec07517c70f2cc4aed1bee832ea04a45fc6466
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Gerrit SSH command "index changes" may receive change numbers that
cannot be found or refer to repositories that have problems.
The assumption of "DB is down" when receiving an OrmException was wrong
because the JGit errors were simply wrapped as OrmException and
do not necessarily mean that you cannot continue to process the other
ones in the list.
Change-Id: I1098be16b682dce8d4e63120e7e50f937b19a7b8
(cherry picked from commit 9a52dd1dce8a79b90e8bfad4f718659aafe1a3e8)
|
|
|
|
|
|
|
|
| |
Display a warning when a change is not found but then
continue to try to reindex the rest of the changes, consistently
with the current behavior of the command.
Change-Id: I51b98a8bb28362456ac7a5df5efa74c1fa1de284
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When an account is linked to another external id at login, the cache
invalidation was made too early and the cache and index were reloaded
with a stale entry.
This would have impacted users linking other external ids
that ended up having an inconsistent cache state:
- accounts by id were correct, because external ids where loaded from DB
- accounts by name were stale, because external ids where loaded from index
With this fix, all the caches are consistent and the reindex happens
at the right time, when the new external ids has been linked.
Bug: Issue 5055
Change-Id: I9ca07d10597db482d8a0d0cb4ce19f99ddc19b10
(cherry picked from commit 96e0d7fd8be23db14520a26cffa93eafed53c3fa)
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ReviewDb persistence layer doesn't provide any means to store internal
"reviewer" or "cc" state, like it is possible with NoteDb. Instead,
in ReviewDb code path, the voted reviewers were assigned "reviewer"
state and non voted reviewers were assigned "cc" state. This is
important for implementation of notification channel, that should reach
only specific reviewer state and not all reviewers.
The most prominent examples for this differentiation is adding reviewer
and upload new patch set use cases. Power users and maintainers are
often added to very high amount of changes as reviewers. Not for all of
them they do really care. Until actually voting on those changes
notifications on these events shouldn't be sent to non voted reviewers.
To prevent this, in the mentioned use cases only voted reviewers should
be notified. NoteDb doesn't provide this feature. In NoteDb code path,
the voted reviewer state was never implemented. Instead of promoting any
reviewer state in NoteDb code path to voted reviewer state only, to
provide the battle proven notification firehouse experience in ReviewDb
code path, since Ib9a1f40b69e the internal voted reviewer state was
demoted in ReviewDb code path from voted reviewer state to any state:
voted or non voted reviewer on a change.
This broke all caller sites in ReviewDb code path for:
changeData.reviewers().byState(ReviewerStateInternal.REVIEWER)
that expected to get a reviewer with non-zero votes. Those caller
sites were not adjusted. The comments are still claiming:
/** Users who have non-zero approval codes on the change. */
Particularly, this broke "Add Reviewer" and "Upload new patch set" use
cases, that started to add all existing reviewers and not only voted
users to CC for notification for these use cases.
In 2.13 release this change was even not justified, as NoteDb is not
ready for production use anyway. It could be done in one or another form
in later releases, with announcement or, better, with offering of viable
alternative like Work-In-Progress workflow implementation, where users
can have fine granular control of whether notifications are sent or not.
This reverts commit e8da8bfbc3fb853e4a10a34820e1f60527eab093.
Bug: Issue 5190
Change-Id: I1d67e36882b1b4b31d2c2e1a34ce5bbfe5ee733c
|
|
|
|
|
|
|
|
|
|
|
|
| |
If Files.walkFileTree fails due to a directory or file in the git root
being inaccessible, it throws an exception and subsequent directories
are not processed.
Override the visitFileFailed method on the visitor. Log the error and
continue.
Bug: Issue 5698
Change-Id: I7f4d76b30f3f8907128dacf357b70eea47fb0962
|
|
|
|
|
|
|
|
|
| |
* Update plugins/reviewnotes from branch 'stable-2.13'
- Fix reviewnotes export
Bug: Issue 5652
Change-Id: Ib3dfb89ed32c39c449a0e4bfba79c1549a196583
Signed-off-by: Edwin Kempin <ekempin@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current metric module is dependent on com.sun internal classes that
are not available in the JRE from other providers such as IBM, resulting
in ClassNotFound exceptions when initializing the CPU usage metric.
Refactor the initialization to dynamically cast to the first available
class, either the one from Sun or the one from IBM.
Bug: Issue 4637
Change-Id: Ib14f001dfe6a144853032a0c6a3e249b59daf9de
|
|
|
|
|
|
|
|
|
|
| |
When a merge commit is not fast-forward, gerrit creates a
"merge of merge" commit with its server identity.
This is wrong. It should use the submitter's identity, like
in "Merge If Necessary" and "Merge Always" strategies.
Change-Id: If11d63d81d8ed5352104defc2410585f5e3366ef
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 220a3f5 introduced circular dependency between the database
module and NotesMigration (impl. class ConfigNotesMigration).
Having the site path being stored in the database was broken by above
change. The class Daemon solves this by explicitly setting the site
path and adds a SitePath module before starting everything.
This patch makes it possible again to run the gerrit war in an external
Servlet container, but you need to set the System property
"-Dgerrit.site_path=/path/to/gerrit" to make it work.
The site path stored in the database became practically obsolete with the
NotesMigration change mentioned above.
Change-Id: Id735fbf928dda186e659792c84d4e675c893a29a
|
|
|
|
|
|
|
|
|
| |
Since the NotesMigration change, commit 220a3f5, it is no longer
possible to configure site_path in the database, with the system_config
table, during automatic site initialization. This commit updates the
documentation by removing references to this configuration option.
Change-Id: I3e4392991fb9d27c5306162353816759d2bbe577
|
|
|
|
|
| |
Change-Id: Ib7ca67d3f0eea1aec09bfca0854cfa5bd1929ca9
(cherry picked from commit c8b58edfd183194bc03ad6fff165be3a41ecb518)
|
|
|
|
|
| |
Change-Id: I490408f1d36c5f3b79be503500d3a969bb027866
(cherry picked from commit 5406d7aa80e6cabc98e129a7a2a749c8e2d0dd76)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the submit strategy was Rebase Always or Rebase If Necessary and
a rebase was needed for the submit, the submit failed if the user
didn't have the Add Patch Set permission. However for submitting a
change the Submit permission alone should be sufficient.
The behavior is now consistent with the Cherry-Pick submit strategy
which also doesn't require the Add Patch Set permission if a
cherry-pick is done on submit.
Change-Id: Id9c484ff51f9dfa7ea77216fbf9b06a799676412
Signed-off-by: Edwin Kempin <ekempin@google.com>
(cherry picked from commit 969a1953cf3889baa663fe59e421ba9cffcbabe3)
|
|
|
|
| |
Change-Id: Iff4e3dd171dbeca604d2eeb854ef162688ae84e4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Git LFS requests include the authorization as HTTP Basic but
this is ignored and the user is treated as anonymous.
Filter these requests through the same auth filter as used for
git, so that the user can be determined.
The filter URL is based on the existing LFS regex [1] but ignores
the "/a/" prefix so that it is not called 2 times when LFS request
starting with "/a/" is performed.
[1] com.google.gerrit.httpd.plugins.LfsPluginServlet.URL_REGEX
Change-Id: I7ac47233cb003068722c117760731ae20ec63ace
Signed-off-by: Jacek Centkowski <jcentkowski@collab.net>
Signed-off-by: David Pursehouse <dpursehouse@collab.net>
|
|
|
|
| |
Change-Id: Ib7e0c1ff66c66df0f81b1e5a4842fc9c1547403a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a revision of change If45290b87 with updated tests that no longer
need to take NoteDB into account separately.
The PostReview REST endpoint translates each new reviewer in the request
into invocations of the PostReviewers REST endpoint, which would send a
newchange email each time a reviewer is successfully added. Because the
PostReview endpoint allows several Reviewers and CC'd users in batch,
prevent the PostReviewers sub-calls from sending emails, and send one
newchange email at the end.
Tests are updated to reflect fewer emails being sent and to reflect CC'd
user names no-longer appearing in the email salutation.
Bug: Issue 4563
Change-Id: I1cfd56ac1a2d107b9f6aae58ed056a1a458410af
|
|
|
|
| |
Change-Id: I99fa47548e2bd80584260e5f4e7093d246b27539
|
|
|
|
| |
Change-Id: Icabeaa9cedf50a84da62ab67d24355928fae8fbb
|
|\
| |
| |
| |
| |
| |
| | |
* stable-2.12:
Revert "Resolve username lazily in git over http tasks"
Change-Id: I574e70a57f4a53487a2bd83b38e321ba13deaa31
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 3fd92a4ac50e5ef49043858ab2576050634a3c2e.
The change was supposed to print the username in the queue for git over
http operations but the username printed is the one of the person doing
show-queue, not the one doing the git operation.
Change-Id: I2f45d526b684af9f3aa336879b310a165048382e
|
|\ \
| | |
| | |
| | | |
into stable-2.13
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Ia1a8677c32398801246bc402728df9785789b9e9
Signed-off-by: Edwin Kempin <ekempin@google.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since change Id45682c30 it is possible for plugins to define a custom
prefix for metric names. In the situation where multiple plugins define
metrics with the same name, due to those plugins sharing a common base
implementation, this causes an IllegalStateException with the message:
metric prefix/metric-name already defined
Adjust the check to only throw IllegalStateException when the same metric
is defined with a different description.
Change-Id: I04602b93ee82c5348cc62ba669c740175e605d39
Signed-off-by: David Pursehouse <dpursehouse@collab.net>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
By specifying the prefix in the gerrit.config, i.e.
[plugin "my-plugin"]
metricsPrefix = "my-root"
the metrics emitted by the plugin will be recorded under:
/gerrit/my-root/metric-name
rather than the default:
/gerrit/plugins/my-plugin/metric-name
Change-Id: Id45682c30e66e266ff5360f8f3fa4fa636151b1d
Signed-off-by: David Pursehouse <dpursehouse@collab.net>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The repository to be updated by MetaDataUpdate can either be passed
in, or created based on other passed parameters.
If the repository is passed in, it should not be closed by the
MetaDataUpdate's close() method. This is because it is possible that
the repository was created in a try-with-resource block and will get
automatically closed. Closing it in MetaDataUpdate will then cause
the repository to be closed too many times, resulting in a corrupt use
count.
Update the static factory methods to prevent closing of the repository
that was passed in. Also update the Javadoc to explicitly mention that
the passed in repository must be closed by the caller.
Also rename 'db' member variable and parameters to 'repository' which
is more meaningful.
Bug: Issue 5404
Change-Id: I7ef68ecba31f1ca2528cf96c698c908c7303bdca
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In some cases a plugin may have an InitStep that refers to other
classes in its implementation, that in turn get a MetricMaker
injected.
Since the MetricMaker, among other things, is not available to
the InitStep, this results in a guice injection error during the
plugins init step of site initialization.
Bind the DisabledMetricMaker to avoid the injection error. This
has the result that the InitStep works, but no metrics can be
recorded. Update the metrics documentation to explicitly mention
that metrics are not available during plugin init steps.
Bug: Issue 5438
Change-Id: Iac9f462eb93a2ae668d5c934e61eda9f23bd3c4d
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Update plugins/hooks from branch 'stable-2.13'
- Add metrics for hook execution
- Execution latency
- Execution count
- Error count
- Timeout count
Change-Id: I7ed95e08608b436ab533929322f951e85a45b7f9
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When the same repository is opened more than once its use count
should be incremented. If it is not, closing it more than once
will result in the warning from JGit:
close() called when useCnt is already zero
Change-Id: I08ed7b544bef942a595f2a85030e6d4faa90f3f2
|
| |
| |
| |
| | |
Change-Id: Ica9b2136270f31252c0040f6c8f630a2daff8348
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Update plugins/replication from branch 'stable-2.13'
- ReplicationMetrics: Make members private final
These members should only be accessed through the public methods:
- start(...), to create/start a new timer context
- record(...), to record the retry/delay values
Mark the members as private final to prevent unintended access.
Change-Id: I69a7e3b13ba4c344f3176528306163ebef07653c
|
|\|
| |
| |
| |
| |
| |
| | |
* stable-2.12:
commit-msg hook: Add Change-Id after Depends-On: footer
Change-Id: I3ac5021e784622c9cdbcdd39ac7124a910300d96
|
| |
| |
| |
| |
| |
| |
| | |
Zuul uses Depends-On to test with dependencies.
So lets add it to the commit-msg.
Change-Id: Iae2bd55d2c4bd6463763b9bfe05837f47e9db598
|
|\ \
| | |
| | |
| | |
| | |
| | | |
* changes:
Make error message for rejecting Egit placeholder Change-Id consistent
Add tests for pushing without Change-Id and with invalid Change-Ids
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In the commit dialog Egit uses a placeholder for the Change-Id
("I0000000000000000000000000000000000000000") which it replaces later
with the real Change-Id. Some users thought that this placeholder also
works on the commandline, but of course there the replacement wasn't
done. As result of this there were lots of changes with this
placeholder Change-Id (as from the format it's a valid Change-Id) and
users got confused about updating each other changes. To prevent this
Gerrit rejects this placeholder Change-Id as invalid. However the
message for this was inconsistent with the message that is used for
other invalid Change-Ids.
Also all validations should be done in CommitValidators, but the check
for the Egit placeholder Change-Id was still done in ReceiveCommits.
Move the check to the right place.
Change-Id: I11c3c1a2d0023c4852d2fa6ec3a54a1245030377
Signed-off-by: Edwin Kempin <ekempin@google.com>
|