Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changes for ZNTA-1847,48,49,50 #12

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

@yu-shao-gm
Copy link
Author

I made a pull request against devel branch, but looked at changes, it seems wrong?

@huangp huangp changed the base branch from devel to master April 9, 2017 23:52
@huangp
Copy link
Collaborator

huangp commented Apr 10, 2017

@yu-shao-gm I changed it to target master.

@huangp
Copy link
Collaborator

huangp commented Apr 11, 2017

I am fine with the changes. @seanf do you want to have another look?

@seanf
Copy link
Member

seanf commented Apr 13, 2017

Review status: 0 of 3 files reviewed at latest revision, 3 unresolved discussions, some commit checks broke.


src/main/java/org/jenkinsci/plugins/zanata/ZanataCliBuilder.java, line 79 at r1 (raw file):

    private final String commandG2Z;
    private final boolean syncZ2git;
    private final String commandZ2G;

@yu-shao-gm
These field names syncG2zanata, commandG2Z, syncZ2git, commandZ2G seem a bit too cryptic for long-term storage. Am I correct in assuming that these values will be stored in Jenkins' XML configuration files with these field/property names as the keys?


src/main/java/org/jenkinsci/plugins/zanata/ZanataCliBuilder.java, line 121 at r1 (raw file):

    }

    public String getCommandZ2G() {

I think all these properties should have javadoc comments explaining what they mean.


src/main/resources/org/jenkinsci/plugins/zanata/ZanataCliBuilder/config.jelly, line 28 at r1 (raw file):

  </f:entry>
  <f:entry title="Command to sync from Zanata to source Git repo" field="commandZ2G">
    <f:textarea default="find . -type f -not -path &quot;*/target/*&quot; -name 'zanata.xml' \&#10;  -execdir echo &quot;=== Commiting new translation $BUILD_TAG...\n&quot; \; \&#10;  -execdir pwd \; \&#10;  -execdir ls \; \&#10;  -execdir echo '=== Git add...\n' \; \&#10;  -execdir git add . \; \&#10;  -execdir echo '=== Git commit ...\n' \; \&#10;  -execdir git commit -m &quot;$BUILD_TAG&quot; \; \&#10;  -execdir echo &quot;=== Finished commit preparation - $BUILD_TAG.\n&quot; \;"></f:textarea>

@yu-shao-gm
These shell scripts are virtually unreadable (and unreviewable) jammed into XML attributes, and will be difficult to maintain as well.

I think it's better to get them from Java strings (as they were in DescriptorImpl), which were at least broken up into multiple lines. It would be even better to read them from resource files on the classpath.


Comments from Reviewable

@yu-shao-gm
Copy link
Author

Patrick has implemented the jelly default value through Java strings. I have ported the code and I will commit next.
For variable names like commandG2Z, do we want to change to commandGitToZanata?
Anyway, I think I could change the variable names and also add Javadocs.

@yu-shao-gm
Copy link
Author

Hi Patrick and Sean, I committed some changes to yshao-cli-changes branch, please have a look. Hope the issues here are addressed fully, and I tested ok.

@seanf
Copy link
Member

seanf commented Apr 19, 2017

:lgtm:


Reviewed 1 of 3 files at r1, 2 of 2 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks broke.


Comments from Reviewable

@seanf
Copy link
Member

seanf commented Apr 19, 2017

@yu-shao-gm This is the point in the process (for zanata-platform) where we generally use the "on QA" label and get a QE to try it out.

@djansen-redhat Have you got time to look at this?

@seanf seanf added the on QA label Apr 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants