Merge branch 'stable-3.0' into stable-3.1
* stable-3.0: Documentation: Fix plugins install REST API & curl example Fix minor typo in WORKSPACE Fix `parent` in `gr-change-metadata` when switching patchsets Update git submodules Revert "Fix edit diff url" Upgrade testcontainers to 1.14.2 Update git submodules Fix Postgresql JDBC driver leaking memory Change-Id: Ie81d10920e897d939ca144ec1d95130119cfb7f0
This commit is contained in:
@@ -246,7 +246,7 @@ List all plugins that match substring `project`:
|
|||||||
[[install-plugin]]
|
[[install-plugin]]
|
||||||
=== Install Plugin
|
=== Install Plugin
|
||||||
--
|
--
|
||||||
'PUT /plugins/link:#plugin-id[\{plugin-id\}]'
|
'PUT /plugins/link:#plugin-id[\{plugin-id\}].jar'
|
||||||
--
|
--
|
||||||
|
|
||||||
Installs a new plugin on the Gerrit server. If a plugin with the
|
Installs a new plugin on the Gerrit server. If a plugin with the
|
||||||
@@ -260,7 +260,7 @@ a link:#plugin-input[PluginInput] entity.
|
|||||||
|
|
||||||
.Request
|
.Request
|
||||||
----
|
----
|
||||||
PUT /plugins/delete-project HTTP/1.0
|
PUT /plugins/delete-project.jar HTTP/1.0
|
||||||
Content-Type: application/json; charset=UTF-8
|
Content-Type: application/json; charset=UTF-8
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -272,7 +272,7 @@ To provide the plugin jar as binary data in the request body the
|
|||||||
following curl command can be used:
|
following curl command can be used:
|
||||||
|
|
||||||
----
|
----
|
||||||
curl --user admin:TNNuLkWsIV8w -X PUT --data-binary @delete-project-2.8.jar 'http://gerrit:8080/a/plugins/delete-project'
|
curl --user admin:TNNuLkWsIV8w -X PUT -H "Content-Type:application/octet-stream" --data-binary @delete-project.jar 'http://gerrit:8080/a/plugins/delete-project.jar'
|
||||||
----
|
----
|
||||||
|
|
||||||
As response a link:#plugin-info[PluginInfo] entity is returned that
|
As response a link:#plugin-info[PluginInfo] entity is returned that
|
||||||
@@ -282,12 +282,15 @@ describes the plugin.
|
|||||||
----
|
----
|
||||||
HTTP/1.1 201 Created
|
HTTP/1.1 201 Created
|
||||||
Content-Disposition: attachment
|
Content-Disposition: attachment
|
||||||
Content-Type: application/json; charset=UTF-8
|
Content-Type: application/json;charset=utf-8
|
||||||
|
Content-Length: 150
|
||||||
|
|
||||||
)]}'
|
)]}'
|
||||||
{
|
{
|
||||||
"id": "delete-project",
|
"id": "delete-project",
|
||||||
"version": "2.8"
|
"version": "v2.16-221-g35bb8bbac4",
|
||||||
|
"index_url": "plugins/delete-project/",
|
||||||
|
"filename": "delete-project.jar"
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ maven_jar(
|
|||||||
CAFFEINE_GUAVA_SHA256 = "3a66ee3ec70971dee0bae6e56bda7b8742bc4bedd7489161bfbbaaf7137d89e1"
|
CAFFEINE_GUAVA_SHA256 = "3a66ee3ec70971dee0bae6e56bda7b8742bc4bedd7489161bfbbaaf7137d89e1"
|
||||||
|
|
||||||
# TODO(davido): Rename guava.jar to caffeine-guava.jar on fetch to prevent potential
|
# TODO(davido): Rename guava.jar to caffeine-guava.jar on fetch to prevent potential
|
||||||
# naming collision between caffeine guava adapater and guava library itself.
|
# naming collision between caffeine guava adapter and guava library itself.
|
||||||
# Remove this renaming procedure, once this upstream issue is fixed:
|
# Remove this renaming procedure, once this upstream issue is fixed:
|
||||||
# https://github.com/ben-manes/caffeine/issues/364.
|
# https://github.com/ben-manes/caffeine/issues/364.
|
||||||
http_file(
|
http_file(
|
||||||
|
|||||||
@@ -114,7 +114,7 @@
|
|||||||
|
|
||||||
_currentParents: {
|
_currentParents: {
|
||||||
type: Array,
|
type: Array,
|
||||||
computed: '_computeParents(change)',
|
computed: '_computeParents(revision)',
|
||||||
},
|
},
|
||||||
|
|
||||||
/** @type {?} */
|
/** @type {?} */
|
||||||
@@ -431,13 +431,11 @@
|
|||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
|
|
||||||
_computeParents(change) {
|
_computeParents(revision) {
|
||||||
if (!change || !change.current_revision ||
|
if (!revision || !revision.commit) {
|
||||||
!change.revisions[change.current_revision] ||
|
|
||||||
!change.revisions[change.current_revision].commit) {
|
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
return change.revisions[change.current_revision].commit.parents;
|
return revision.commit.parents;
|
||||||
},
|
},
|
||||||
|
|
||||||
_computeParentsLabel(parents) {
|
_computeParentsLabel(parents) {
|
||||||
|
|||||||
@@ -419,14 +419,20 @@ limitations under the License.
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('_computeParents', () => {
|
test('_computeParents', () => {
|
||||||
const parents = [{commit: '123', subject: 'abc'}];
|
const revision = {commit: {parents: [{commit: '123', subject: 'abc'}]}};
|
||||||
assert.isUndefined(element._computeParents(
|
assert.isUndefined(element._computeParents({}));
|
||||||
{revisions: {456: {commit: {parents}}}}));
|
assert.equal(element._computeParents(revision), revision.commit.parents);
|
||||||
assert.isUndefined(element._computeParents(
|
});
|
||||||
{current_revision: '789', revisions: {456: {commit: {parents}}}}));
|
|
||||||
assert.equal(element._computeParents(
|
test('_currentParents', () => {
|
||||||
{current_revision: '456', revisions: {456: {commit: {parents}}}}),
|
element.revision = {
|
||||||
parents);
|
commit: {parents: [{commit: '123', subject: 'abc'}]},
|
||||||
|
};
|
||||||
|
assert.equal(element._currentParents[0].commit, '123');
|
||||||
|
element.revision = {
|
||||||
|
commit: {parents: [{commit: '12345', subject: 'abc'}]},
|
||||||
|
};
|
||||||
|
assert.equal(element._currentParents[0].commit, '12345');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('_computeParentsLabel', () => {
|
test('_computeParentsLabel', () => {
|
||||||
|
|||||||
@@ -568,7 +568,8 @@
|
|||||||
|
|
||||||
_goToEditFile() {
|
_goToEditFile() {
|
||||||
// TODO(taoalpha): add a shortcut for editing
|
// TODO(taoalpha): add a shortcut for editing
|
||||||
const editUrl = Gerrit.Nav.getEditUrlForDiff(this._change, this._path);
|
const editUrl = Gerrit.Nav.getEditUrlForDiff(
|
||||||
|
this._change, this._path, this._patchRange.patchNum);
|
||||||
return Gerrit.Nav.navigateToRelativeUrl(editUrl);
|
return Gerrit.Nav.navigateToRelativeUrl(editUrl);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -394,7 +394,6 @@ limitations under the License.
|
|||||||
};
|
};
|
||||||
element._change = {
|
element._change = {
|
||||||
_number: 42,
|
_number: 42,
|
||||||
project: 'gerrit',
|
|
||||||
status: 'NEW',
|
status: 'NEW',
|
||||||
revisions: {
|
revisions: {
|
||||||
a: {_number: 1, commit: {parents: []}},
|
a: {_number: 1, commit: {parents: []}},
|
||||||
@@ -408,8 +407,6 @@ limitations under the License.
|
|||||||
assert.isTrue(!!editBtn);
|
assert.isTrue(!!editBtn);
|
||||||
MockInteractions.tap(editBtn);
|
MockInteractions.tap(editBtn);
|
||||||
assert.isTrue(redirectStub.called);
|
assert.isTrue(redirectStub.called);
|
||||||
assert.isTrue(redirectStub.lastCall.calledWithExactly(
|
|
||||||
Gerrit.Nav.getEditUrlForDiff(element._change, element._path)));
|
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -126,18 +126,18 @@ def declare_nongoogle_deps():
|
|||||||
sha1 = "dc13ae4faca6df981fc7aeb5a522d9db446d5d50",
|
sha1 = "dc13ae4faca6df981fc7aeb5a522d9db446d5d50",
|
||||||
)
|
)
|
||||||
|
|
||||||
TESTCONTAINERS_VERSION = "1.14.1"
|
TESTCONTAINERS_VERSION = "1.14.2"
|
||||||
|
|
||||||
maven_jar(
|
maven_jar(
|
||||||
name = "testcontainers",
|
name = "testcontainers",
|
||||||
artifact = "org.testcontainers:testcontainers:" + TESTCONTAINERS_VERSION,
|
artifact = "org.testcontainers:testcontainers:" + TESTCONTAINERS_VERSION,
|
||||||
sha1 = "defd04ff6ffc93e1ff988024048e8ba5bd298df3",
|
sha1 = "d74bc045fb5f30988b0adff20244412972a9f564",
|
||||||
)
|
)
|
||||||
|
|
||||||
maven_jar(
|
maven_jar(
|
||||||
name = "testcontainers-elasticsearch",
|
name = "testcontainers-elasticsearch",
|
||||||
artifact = "org.testcontainers:elasticsearch:" + TESTCONTAINERS_VERSION,
|
artifact = "org.testcontainers:elasticsearch:" + TESTCONTAINERS_VERSION,
|
||||||
sha1 = "d682965bbf1334ef40720b4ad2eda2c12bf0b440",
|
sha1 = "66e1a6da0362beee83673b877c9c2e0536d6912c",
|
||||||
)
|
)
|
||||||
|
|
||||||
maven_jar(
|
maven_jar(
|
||||||
|
|||||||
Reference in New Issue
Block a user