[ 
https://issues.apache.org/jira/browse/YETUS-170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15013554#comment-15013554
 ] 

Sean Busbey commented on YETUS-170:
-----------------------------------

Please generate patches with {{git format-patch}} instead of {{git diff}} so 
that committer and commit message information is included.

{code}
+  # For each expected ordered module,
+  # if its in changed modules, add to HADOOP_MODULES
+  for module in "${full_ordered_hadoop_modules[@]}"; do
{code}

nit: should be "it's"

{code}
   if [[ "${passed_modules} " == *" ${module} "* ]]; then
{code}

this won't match the first module in the list unless you also pad 
passed_modules on the left.


{code}
     if [[ "${module}" = "." ]]; then
       ordered_modules=.
       break
      fi

...

# For modules which are not in ordered list,
  # add them at last
  for module in $( echo "${passed_modules}" | tr ' ' '\n'); do
    if ! [[ "${ordered_modules} " == *" ${module} "* ]]; then
      yetus_debug "Personality ordering ${module}"
      ordered_modules="${ordered_modules} ${module}"
    fi
  done

  HADOOP_MODULES="${ordered_modules}"
{code}

two related things here. 

1) this will add non-listed modules after '.' rather than just return '.' as it 
should.

2) Checking if one of the modules is '.' after matching it to the total ordered 
list seems awkward to me. since we're checking substrings, why not remove '.' 
from the total ordered list and do a substring check of passed_modules for '.' 
as a special case before the ordering.

in fact we could just expand this earlier check to look for any passed module 
being '.' rather than only checking for just '.'

{code}
  if [[ ${startingmodules} = "." ]]; then
    yetus_debug "hmm shortcut since ."
    HADOOP_MODULES=.
    return
  fi
{code}

> hadoop mvninstall should run on parent directories of changed modules
> ---------------------------------------------------------------------
>
>                 Key: YETUS-170
>                 URL: https://issues.apache.org/jira/browse/YETUS-170
>             Project: Yetus
>          Issue Type: Bug
>            Reporter: Vinayakumar B
>            Assignee: Vinayakumar B
>         Attachments: YETUS-170-01.patch, YETUS-170-02.patch, 
> YETUS-170-03.patch, YETUS-170-04.patch
>
>
> https://builds.apache.org/job/PreCommit-HDFS-Build/13397/console
> If the patch contains multiple modules changed, then mvn install is expected 
> to run in order of dependency.
> For example, if hadoop-hdfs and hadoop-hdfs-client is changed, then 
> hadoop-hdfs-client is expected to run first and then hadoop-hdfs. 
> Instead, can run mvn install on parent of both these modules. Same is done 
> for 'compile', but not for 'mvninstall'
> This Jira proposes to run mvninstall for hadoop on parent of changed modules 
> (union)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to