New issue
Advanced search Search tips

Issue 8859 link

Starred by 8 users

Issue metadata

Status: Released
Owner: ----
Closed: Sep 5
Components:



Sign in to add a comment

Clearing imports fails with "CompleteProjectImport requires unknown capability import"

Reported by doug.man...@gmail.com, Apr 26 2018

Issue description

Affected Version: 2.15.1
importer version: stable-2.15, 8e048871a2d6cea0d0a6cee327b0b60bb8643322, 2018-04-14

What steps will reproduce the problem?
1. Import a project (just use one on your current server)
2. Go to the UI and click on "Complete..." or hit the DELETE endpoint for the import
3. 500 error :(

What is the expected output?
Success, and the import entry is removed.

What do you see instead?
[2018-04-26 18:40:07,301] [HTTP-2623] ERROR com.google.gerrit.server.permissions.GlobalPermission : Class com.googlesource.gerrit.plugins.importer.CompleteProjectImport requires unknown capability import
[2018-04-26 18:40:07,301] [HTTP-2623] ERROR com.google.gerrit.httpd.restapi.RestApiServlet : Error in DELETE /config/server/importer~projects/XXXXXXX
com.google.gerrit.server.permissions.PermissionBackendException: cannot extract permission
        at com.google.gerrit.server.permissions.GlobalPermission.resolve(GlobalPermission.java:167)
        at com.google.gerrit.server.permissions.GlobalPermission.fromAnnotation(GlobalPermission.java:94)
        at com.google.gerrit.httpd.restapi.RestApiServlet.checkRequiresCapability(RestApiServlet.java:1166)
        at com.google.gerrit.httpd.restapi.RestApiServlet.service(RestApiServlet.java:384)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:286)
        at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:276)
        at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:181)


Please provide any additional information below.
This worked in Gerrit 2.14.6 (a month ago); I recently upgraded to 2.15.1 (two weeks ago), and today is the first time that I've had to copy a project using the importer plugin.  Everything appears to work correctly except for the final step, which is to delete the import record.  Both the UI and the API produce the same 500 error.

I checked All-Projects, and I didn't see any groups with the "Import" global capability, so I added a bunch of groups (including Administrators), but the result is the same: a 500 error.

So I can see that Gerrit appears to know about the Import capability because it is listed as a Global Capability, but Gerrit doesn't seem to know about it when calling the API method to delete the import.
 
Components: -PolyGerrit plugins>importer
Components: Backend
As a workaround, you can manually remove "data/importer/{project}.$importstatus" as needed.
This also appears for me - Gerrit 2.15.2 and the current stable-2.15 version of the importer plugin (34133b15fc013).
Doug, thanks for the workaround.
Issue is also reproduced with Gerrit 2.15.2 and the current stable-2.15 version of the importer plugin (34133b15fc013).

On my side only Projects->List Imports->Compelete Copy doesn't work.

<project>->General->Complete Copy finishes without errors. After this <project> is not listed in List Imports.
I have the same issue by resuming an import. Updated yesterday to 2.15.3, still the same error. (Importer Plugin version revision 34133b15fc013c2c86020ea5bf3279dd24fa6cad)
Project Member

Comment 7 by david.os...@gmail.com, Sep 5

Status: Accepted (was: New)
Project Member

Comment 8 by david.os...@gmail.com, Sep 5

Status: ChangeUnderReview (was: Accepted)
https://gerrit-review.googlesource.com/c/gerrit/+/195010
Project Member

Comment 9 by david.os...@gmail.com, Sep 5

Components: -plugins>importer
Project Member

Comment 10 by david.os...@gmail.com, Sep 5

This issue is probably related: Issue 9679, as the fix would probably
only work when user is a member of administrator group.
Project Member

Comment 11 by david.os...@gmail.com, Sep 5

Status: Submitted (was: ChangeUnderReview)
Labels: FixedIn-2.15.4
Status: Released (was: Submitted)

Sign in to add a comment