New issue
Advanced search Search tips
Starred by 3 users

Issue metadata

Status: Submitted
Owner: ----
Closed: Feb 8
Cc:
Components:



Sign in to add a comment
link

Issue 10415: Download-commands installCommitExtraCommand has an invalid project name

Reported by ld...@audiokinetic.com, Jan 30

Issue description

*****************************************************************
*****                                                       *****
***** !!!! THIS BUG TRACKER IS FOR GERRIT CODE REVIEW !!!!  *****
*****                                                       *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, CYANOGENMOD,  *****
***** INTERNAL ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.*****
*****                                                       *****
*****   THOSE ISSUES BELONG IN DIFFERENT ISSUE TRACKERS     *****
*****                                                       *****
*****************************************************************

Affected Version:v2.16.4

What steps will reproduce the problem?
1. Install download-commands plugin v2.16.4
2. Add 'installCommitExtraCommand = git submodule update --init --recursive && git review -s' in the [gerrit] section of gerrit.config
3. Open any project general page
4. Select 'SSH'


What is the expected output?
The real project name instead of '${project-base-name}'

What do you see instead?
The command line will contain ' && (cd "${project-base-name}"' instead of the real project name

Please provide any additional information below.
Caused by 7bd2008be31497696e4818f4a4d91b317251c9ac
 

Comment 1 by thomasmu...@yahoo.com, Jan 30

Project Member
Cc: david.pu...@gmail.com

Comment 2 by david.pu...@gmail.com, Jan 31

Summary: Download-commands installCommitExtraCommand has an invalid project name (was: Download-commands installCommitExtraCommand has the a invalid project name)

Comment 3 by david.pu...@gmail.com, Jan 31

This will also affect 2.15.9 because the same change was included there.

Comment 4 by david.pu...@gmail.com, Jan 31

Components: plugins>download-commands PolyGerrit
Status: AwaitingInformation (was: New)
The download commands are included in the response of the /config/server/info REST endpoint [1] and according to the documentation [2] it's correct that it returns them with the "$project-base-name" and "$project" placeholder markers.

So I don't think 7bd2008be31497696e4818f4a4d91b317251c9ac caused this.  It's more likely to be caused by the UI not properly replacing the placeholders.

I've checked it with the GWT UI and it works there, but it doesn't work in the Polygerrit UI.

Have you confirmed that it worked in the previous release that did not include  7bd2008be31497696e4818f4a4d91b317251c9ac?

[1] http://gerrit-documentation.storage.googleapis.com/Documentation/2.15/rest-api-config.html#get-info
[2] http://gerrit-documentation.storage.googleapis.com/Documentation/2.15/rest-api-config.html#download-scheme-info

Comment 5 by ld...@audiokinetic.com, Jan 31

I have not confirmed, I assumed it was the issue since this `.append(QuoteUtil.quote(projectName + "/.git/hooks/"));` works but this one doesn't `b.append(" && (cd ").append(QuoteUtil.quote(projectName)).append(" && ").append(extraCommand).append(")");`.

It's not possible for me to test at this time.

Comment 6 by thomasmu...@yahoo.com, Jan 31

Project Member
Hi, this is caused by 7bd2008be31497696e4818f4a4d91b317251c9ac in my testing, i had to do '\"${project-base-name}\"' for it to to work.

Comment 7 by thomasmu...@yahoo.com, Jan 31

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

Comment 8 by ld...@audiokinetic.com, Feb 7

Could this also be back-ported into 2.16 please

Comment 10 by david.pu...@gmail.com, Feb 8

Labels: FixedIn-2.16.5
Status: Submitted (was: ChangeUnderReview)

Comment 11 by david.pu...@gmail.com, Feb 10

Labels: FixedIn-2.15.11

Sign in to add a comment