You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@fluo.apache.org by GitBox <gi...@apache.org> on 2020/04/13 19:45:07 UTC

[GitHub] [fluo-muchos] arvindshmicrosoft opened a new pull request #340: Cleanup Python and Ansible Code

arvindshmicrosoft opened a new pull request #340: Cleanup Python and Ansible Code
URL: https://github.com/apache/fluo-muchos/pull/340
 
 
   * Format Python code using Black (https://github.com/psf/black)
   * Normalize Python string literals to use double quotes
   * Use specific Python imports where possible
   * Address number of issues flagged by ansible-lint
   * Refactor wipe.yml to avoid rm -rf commands
   * Run flake8 and ansible-lint as part of Travis CI
   * Travis CI also checks for lines without training newline
   * Add a CONTRIBUTING.md file with instructions for developers

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] arvindshmicrosoft commented on a change in pull request #340: Cleanup Python and Ansible Code

Posted by GitBox <gi...@apache.org>.
arvindshmicrosoft commented on a change in pull request #340: Cleanup Python and Ansible Code
URL: https://github.com/apache/fluo-muchos/pull/340#discussion_r409967237
 
 

 ##########
 File path: scripts/cibuild.sh
 ##########
 @@ -0,0 +1,12 @@
+set -e
+echo "Running nose tests"
+nosetests -w lib/
+echo "Running Ansible-lint"
+ansible-lint -x 204,301
+echo "Ansible-lint returned OK"
+echo "Running flake8 to check Python code"
+flake8
+echo "flake8 returned OK"
+echo "Checking for files which have no newline at end of file"
+git ls-files | tr '\n' '\0' | xargs -0 -L1 bash -c 'if test "$(grep --files-with-matches --binary-files=without-match --max-count=1 --regexp='.*' "$0")" && test "$(tail --bytes=1 "$0")"; then echo "No new line at end of $0."; false; fi'
 
 Review comment:
   Thanks Christopher. I pulled the EOF newline check into a separate script, cleaned things up a bit and ensured shellcheck passes (a cool thing it flagged in the process was SC2143 which I have addressed by using grep -q). Thanks again for pushing on these, I am learning a bunch about scripting good practices in the process.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] ctubbsii commented on a change in pull request #340: Cleanup Python and Ansible Code

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on a change in pull request #340: Cleanup Python and Ansible Code
URL: https://github.com/apache/fluo-muchos/pull/340#discussion_r409282613
 
 

 ##########
 File path: scripts/cibuild.sh
 ##########
 @@ -0,0 +1,12 @@
+set -e
+echo "Running nose tests"
+nosetests -w lib/
+echo "Running Ansible-lint"
+ansible-lint -x 204,301
+echo "Ansible-lint returned OK"
+echo "Running flake8 to check Python code"
+flake8
+echo "flake8 returned OK"
+echo "Checking for files which have no newline at end of file"
+git ls-files | tr '\n' '\0' | xargs -0 -L1 bash -c 'if test "$(grep --files-with-matches --binary-files=without-match --max-count=1 --regexp='.*' "$0")" && test "$(tail --bytes=1 "$0")"; then echo "No new line at end of $0."; false; fi'
 
 Review comment:
   Mainly, I don't think shellcheck will be able to evaluate the quoted arg to bash at all. So, a separate script could help it evaluate.
   
   Alternatively... you could do something clever inside this single script, and have it behave differently depending on the args:
   
   ```bash
   function main() {
      # ... do main stuff
      for file in files; do
         "$0" checkEOF "$file"
       done
   }
   
   function checkEOF() {
      local filetocheck; filetocheck=$1
      # ... check file
   }
   
   if [[ $1 == 'main' ]]; then
       shift
       main "$@"
   else if [[ $1 == 'checkEOF' ]]; then
       shift
       checkEOF "$@"
   else 
       usage
   fi
   ```
   
   The above is just a quick mockup.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] arvindshmicrosoft commented on a change in pull request #340: Cleanup Python and Ansible Code

Posted by GitBox <gi...@apache.org>.
arvindshmicrosoft commented on a change in pull request #340: Cleanup Python and Ansible Code
URL: https://github.com/apache/fluo-muchos/pull/340#discussion_r409112506
 
 

 ##########
 File path: .travis.yml
 ##########
 @@ -15,4 +15,11 @@
 language: python
 python:
   - "3.5"
-script: nosetests -w lib/
+install:
+  - pip install flake8
+  - pip install ansible-lint
+script:
+  - nosetests -w lib/
+  - ansible-lint -x 204,301
+  - flake8
+  - git ls-files | tr '\n' '\0' | xargs -0 -L1 bash -c 'if test "$(grep --files-with-matches --binary-files=without-match --max-count=1 --regexp='.*' "$0")" && test "$(tail --bytes=1 "$0")"; then echo "No new line at end of $0."; false; fi'
 
 Review comment:
   Done. Please let me know if you had further comments, or else please resolve the comment post which I can merge.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] arvindshmicrosoft commented on a change in pull request #340: Cleanup Python and Ansible Code

Posted by GitBox <gi...@apache.org>.
arvindshmicrosoft commented on a change in pull request #340: Cleanup Python and Ansible Code
URL: https://github.com/apache/fluo-muchos/pull/340#discussion_r409279700
 
 

 ##########
 File path: scripts/cibuild.sh
 ##########
 @@ -0,0 +1,12 @@
+set -e
+echo "Running nose tests"
+nosetests -w lib/
+echo "Running Ansible-lint"
+ansible-lint -x 204,301
+echo "Ansible-lint returned OK"
+echo "Running flake8 to check Python code"
+flake8
+echo "flake8 returned OK"
+echo "Checking for files which have no newline at end of file"
+git ls-files | tr '\n' '\0' | xargs -0 -L1 bash -c 'if test "$(grep --files-with-matches --binary-files=without-match --max-count=1 --regexp='.*' "$0")" && test "$(tail --bytes=1 "$0")"; then echo "No new line at end of $0."; false; fi'
 
 Review comment:
   Good point. I did run shellcheck though I must admit I glossed over the report about incorrect quotes. I will do a thorough pass again and consider your suggestion to refactor into a smaller script to keep the command line manageable.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] ctubbsii commented on a change in pull request #340: Cleanup Python and Ansible Code

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on a change in pull request #340: Cleanup Python and Ansible Code
URL: https://github.com/apache/fluo-muchos/pull/340#discussion_r409282613
 
 

 ##########
 File path: scripts/cibuild.sh
 ##########
 @@ -0,0 +1,12 @@
+set -e
+echo "Running nose tests"
+nosetests -w lib/
+echo "Running Ansible-lint"
+ansible-lint -x 204,301
+echo "Ansible-lint returned OK"
+echo "Running flake8 to check Python code"
+flake8
+echo "flake8 returned OK"
+echo "Checking for files which have no newline at end of file"
+git ls-files | tr '\n' '\0' | xargs -0 -L1 bash -c 'if test "$(grep --files-with-matches --binary-files=without-match --max-count=1 --regexp='.*' "$0")" && test "$(tail --bytes=1 "$0")"; then echo "No new line at end of $0."; false; fi'
 
 Review comment:
   Mainly, I don't think shellcheck will be able to evaluate the quoted arg to bash.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] arvindshmicrosoft merged pull request #340: Cleanup Python and Ansible Code

Posted by GitBox <gi...@apache.org>.
arvindshmicrosoft merged pull request #340: Cleanup Python and Ansible Code
URL: https://github.com/apache/fluo-muchos/pull/340
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] ctubbsii commented on a change in pull request #340: Cleanup Python and Ansible Code

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on a change in pull request #340: Cleanup Python and Ansible Code
URL: https://github.com/apache/fluo-muchos/pull/340#discussion_r409247566
 
 

 ##########
 File path: scripts/cibuild.sh
 ##########
 @@ -0,0 +1,12 @@
+set -e
 
 Review comment:
   Script should specify a shell explicitly. Otherwise, it's behavior is a bit less predictable.
   
   ```suggestion
   #! /usr/bin/bash
   set -e
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] arvindshmicrosoft commented on a change in pull request #340: Cleanup Python and Ansible Code

Posted by GitBox <gi...@apache.org>.
arvindshmicrosoft commented on a change in pull request #340: Cleanup Python and Ansible Code
URL: https://github.com/apache/fluo-muchos/pull/340#discussion_r409047911
 
 

 ##########
 File path: .travis.yml
 ##########
 @@ -15,4 +15,11 @@
 language: python
 python:
   - "3.5"
-script: nosetests -w lib/
+install:
+  - pip install flake8
+  - pip install ansible-lint
+script:
+  - nosetests -w lib/
+  - ansible-lint -x 204,301
 
 Review comment:
   Created #341 to track and eventually fix these.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] ctubbsii commented on a change in pull request #340: Cleanup Python and Ansible Code

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on a change in pull request #340: Cleanup Python and Ansible Code
URL: https://github.com/apache/fluo-muchos/pull/340#discussion_r409250208
 
 

 ##########
 File path: scripts/cibuild.sh
 ##########
 @@ -0,0 +1,12 @@
+set -e
+echo "Running nose tests"
+nosetests -w lib/
+echo "Running Ansible-lint"
+ansible-lint -x 204,301
+echo "Ansible-lint returned OK"
+echo "Running flake8 to check Python code"
+flake8
+echo "flake8 returned OK"
+echo "Checking for files which have no newline at end of file"
+git ls-files | tr '\n' '\0' | xargs -0 -L1 bash -c 'if test "$(grep --files-with-matches --binary-files=without-match --max-count=1 --regexp='.*' "$0")" && test "$(tail --bytes=1 "$0")"; then echo "No new line at end of $0."; false; fi'
 
 Review comment:
   This quoting doesn't look quite correct, because it uses single quotes around the arg to bash, but then uses a single quote inside that around that for the `--regexp='.*'`
   
   It'd probably be better to put this in a separate script, and have `xargs` execute it directly as:
   
   ```suggestion
   git ls-files | tr '\n' '\0' | xargs -0 -L1 /usr/bin/bash "$(dirname "$0")/checkMissingEOF"
   ```
   
   Also, not sure what the difference between `-L1` and `-n1` is here. I've never used `-L` with xargs.
   
   In any case, whatever scripts you create should pass through `shellcheck`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] ctubbsii commented on a change in pull request #340: Cleanup Python and Ansible Code

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on a change in pull request #340: Cleanup Python and Ansible Code
URL: https://github.com/apache/fluo-muchos/pull/340#discussion_r407808331
 
 

 ##########
 File path: .travis.yml
 ##########
 @@ -15,4 +15,11 @@
 language: python
 python:
   - "3.5"
-script: nosetests -w lib/
+install:
+  - pip install flake8
+  - pip install ansible-lint
+script:
+  - nosetests -w lib/
+  - ansible-lint -x 204,301
+  - flake8
+  - git ls-files | tr '\n' '\0' | xargs -0 -L1 bash -c 'if test "$(grep --files-with-matches --binary-files=without-match --max-count=1 --regexp='.*' "$0")" && test "$(tail --bytes=1 "$0")"; then echo "No new line at end of $0."; false; fi'
 
 Review comment:
   Can we put this last line into a script in `src/scripts/cibuild` or similar?
   
   Also, it might be better to put all these into a single script, and run them sequentially, because there's quite a bit of overhead in Travis CI to start separate tasks... compared to our expected run time for each of these.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] arvindshmicrosoft commented on a change in pull request #340: Cleanup Python and Ansible Code

Posted by GitBox <gi...@apache.org>.
arvindshmicrosoft commented on a change in pull request #340: Cleanup Python and Ansible Code
URL: https://github.com/apache/fluo-muchos/pull/340#discussion_r409046027
 
 

 ##########
 File path: ansible/roles/azure/tasks/create_adlsgen2.yml
 ##########
 @@ -56,26 +58,26 @@
   with_sequence: start=1 end={{ InstanceVolumesEndSequence|int }}
   when: InstanceVolumesTemp[0]|int != 0
 
-- name: Retrieve ABFSS values when specified manually 
+- name: Retrieve ABFSS values when specified manually
   set_fact:
      InstanceVolumesManual: "{{ InstanceVolumesManual +  [ item ] }}"
   loop:
     "{{ InstanceVolumesTemp }}"
   when: item.split('://')[0] == 'abfss' and  instance_volumes_input.split('|')[0].split(',') ==  ['']
 
-# This is  final list of instance volumes 
+# This is final list of instance volumes
 - name: Assign variables for autogeneration or manual for storage account creation
   set_fact:
-     InstanceVolumes: "{{ InstanceVolumesManual if  instance_volumes_input.split('|')[0].split(',') ==  [''] else InstanceVolumesAuto }}" 
+     InstanceVolumes: "{{ InstanceVolumesManual if  instance_volumes_input.split('|')[0].split(',') ==  [''] else InstanceVolumesAuto }}"
 
 - name: Update instance_volumes_preferred  in muchos.props
   lineinfile:
     path: "{{ deploy_path }}/conf/muchos.props"
     regexp: '^instance_volumes_preferred\s*=\s*|^[#]instance_volumes_preferred\s*=\s*'
     line: "instance_volumes_preferred = {{ InstanceVolumes|join(',') }}"
 
-# Not registering variable because  storage values are not visible immediately
-- name: Create ADLS Gen2 storage acount using REST API
+# Not registering variable because storage values are not visible immediately
+- name: Create ADLS Gen2 storage account using REST API
 
 Review comment:
   I was told about [Arcolinx](https://docs.acrolinx.com/visualstudio/latest/en) by one of my colleagues and installed its plugin for VSCode (which is the IDE I use). It has a spellcheck built in, and indeed it did catch this and a few others as well. In due course, we can look for a solution which can be integrated into the CI itself.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] keith-turner commented on a change in pull request #340: Cleanup Python and Ansible Code

Posted by GitBox <gi...@apache.org>.
keith-turner commented on a change in pull request #340: Cleanup Python and Ansible Code
URL: https://github.com/apache/fluo-muchos/pull/340#discussion_r409038433
 
 

 ##########
 File path: .travis.yml
 ##########
 @@ -15,4 +15,11 @@
 language: python
 python:
   - "3.5"
-script: nosetests -w lib/
+install:
+  - pip install flake8
+  - pip install ansible-lint
+script:
+  - nosetests -w lib/
+  - ansible-lint -x 204,301
 
 Review comment:
   Why were these two excluded?  Not opposed to excluding them, just curious.  I found the following list of default rules while looking into this.
   
   https://docs.ansible.com/ansible-lint/rules/default_rules.html

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] ctubbsii commented on a change in pull request #340: Cleanup Python and Ansible Code

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on a change in pull request #340: Cleanup Python and Ansible Code
URL: https://github.com/apache/fluo-muchos/pull/340#discussion_r409282613
 
 

 ##########
 File path: scripts/cibuild.sh
 ##########
 @@ -0,0 +1,12 @@
+set -e
+echo "Running nose tests"
+nosetests -w lib/
+echo "Running Ansible-lint"
+ansible-lint -x 204,301
+echo "Ansible-lint returned OK"
+echo "Running flake8 to check Python code"
+flake8
+echo "flake8 returned OK"
+echo "Checking for files which have no newline at end of file"
+git ls-files | tr '\n' '\0' | xargs -0 -L1 bash -c 'if test "$(grep --files-with-matches --binary-files=without-match --max-count=1 --regexp='.*' "$0")" && test "$(tail --bytes=1 "$0")"; then echo "No new line at end of $0."; false; fi'
 
 Review comment:
   Mainly, I don't think shellcheck will be able to evaluate the quoted arg to bash at all. So, a separate script could help it evaluate.
   
   Alternatively... you could do something clever inside this single script, and have it behave differently depending on the args:
   
   ```bash
   function main() {
      # ... do main stuff
      for file in files; do
         "$0" checkEOF "$file"
       done
   }
   
   function checkEOF() {
      local filetocheck; filetocheck=$1
      # ... check file
   }
   
   if [[ $1 == 'main' ]]; then
       shift
       main "$@"
   else if [[ $1 == 'checkEOF' ]]; then
       shift
       checkEOF "$@"
   else 
       usage
   fi
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] keith-turner commented on a change in pull request #340: Cleanup Python and Ansible Code

Posted by GitBox <gi...@apache.org>.
keith-turner commented on a change in pull request #340: Cleanup Python and Ansible Code
URL: https://github.com/apache/fluo-muchos/pull/340#discussion_r409045745
 
 

 ##########
 File path: .travis.yml
 ##########
 @@ -15,4 +15,11 @@
 language: python
 python:
   - "3.5"
-script: nosetests -w lib/
+install:
+  - pip install flake8
+  - pip install ansible-lint
+script:
+  - nosetests -w lib/
+  - ansible-lint -x 204,301
 
 Review comment:
   Thanks for the information

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] arvindshmicrosoft commented on a change in pull request #340: Cleanup Python and Ansible Code

Posted by GitBox <gi...@apache.org>.
arvindshmicrosoft commented on a change in pull request #340: Cleanup Python and Ansible Code
URL: https://github.com/apache/fluo-muchos/pull/340#discussion_r408976101
 
 

 ##########
 File path: CONTRIBUTING.md
 ##########
 @@ -0,0 +1,36 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Contributors Guide
+
+If you believe that you have found a bug, please search for an existing [issue](https://github.com/apache/fluo-muchos/issues) to see if it has already been reported. For simple changes, its ok to just submit a pull request without an issue.
+
+## Development
 
 Review comment:
   ah, good point. let me do that and link to the contributing.md from the readme

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] ctubbsii commented on a change in pull request #340: Cleanup Python and Ansible Code

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on a change in pull request #340: Cleanup Python and Ansible Code
URL: https://github.com/apache/fluo-muchos/pull/340#discussion_r409247566
 
 

 ##########
 File path: scripts/cibuild.sh
 ##########
 @@ -0,0 +1,12 @@
+set -e
 
 Review comment:
   Script should specify a shell explicitly. Otherwise, its behavior is a bit less predictable.
   
   ```suggestion
   #! /usr/bin/bash
   set -e
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] keith-turner commented on a change in pull request #340: Cleanup Python and Ansible Code

Posted by GitBox <gi...@apache.org>.
keith-turner commented on a change in pull request #340: Cleanup Python and Ansible Code
URL: https://github.com/apache/fluo-muchos/pull/340#discussion_r409040857
 
 

 ##########
 File path: ansible/roles/azure/tasks/create_adlsgen2.yml
 ##########
 @@ -56,26 +58,26 @@
   with_sequence: start=1 end={{ InstanceVolumesEndSequence|int }}
   when: InstanceVolumesTemp[0]|int != 0
 
-- name: Retrieve ABFSS values when specified manually 
+- name: Retrieve ABFSS values when specified manually
   set_fact:
      InstanceVolumesManual: "{{ InstanceVolumesManual +  [ item ] }}"
   loop:
     "{{ InstanceVolumesTemp }}"
   when: item.split('://')[0] == 'abfss' and  instance_volumes_input.split('|')[0].split(',') ==  ['']
 
-# This is  final list of instance volumes 
+# This is final list of instance volumes
 - name: Assign variables for autogeneration or manual for storage account creation
   set_fact:
-     InstanceVolumes: "{{ InstanceVolumesManual if  instance_volumes_input.split('|')[0].split(',') ==  [''] else InstanceVolumesAuto }}" 
+     InstanceVolumes: "{{ InstanceVolumesManual if  instance_volumes_input.split('|')[0].split(',') ==  [''] else InstanceVolumesAuto }}"
 
 - name: Update instance_volumes_preferred  in muchos.props
   lineinfile:
     path: "{{ deploy_path }}/conf/muchos.props"
     regexp: '^instance_volumes_preferred\s*=\s*|^[#]instance_volumes_preferred\s*=\s*'
     line: "instance_volumes_preferred = {{ InstanceVolumes|join(',') }}"
 
-# Not registering variable because  storage values are not visible immediately
-- name: Create ADLS Gen2 storage acount using REST API
+# Not registering variable because storage values are not visible immediately
+- name: Create ADLS Gen2 storage account using REST API
 
 Review comment:
   Did one of the tools find this misspelling?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] arvindshmicrosoft commented on a change in pull request #340: Cleanup Python and Ansible Code

Posted by GitBox <gi...@apache.org>.
arvindshmicrosoft commented on a change in pull request #340: Cleanup Python and Ansible Code
URL: https://github.com/apache/fluo-muchos/pull/340#discussion_r409043973
 
 

 ##########
 File path: .travis.yml
 ##########
 @@ -15,4 +15,11 @@
 language: python
 python:
   - "3.5"
-script: nosetests -w lib/
+install:
+  - pip install flake8
+  - pip install ansible-lint
+script:
+  - nosetests -w lib/
+  - ansible-lint -x 204,301
 
 Review comment:
   Thanks Keith.
   * I excluded 204 for now given the risk / reward consideration in refactoring the few longer-than-160-chars lines in Ansible playbooks. I will add a comment in the CI script to note that this is a future TODO.
   * 301 is more interesting. It is flagged for specific cases where we set a fact based on a command output, without a when condition or creates condition. Such actions are necessarily repeated always by Ansible and hence are flagged. Again, I will flag this for a future TODO.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] arvindshmicrosoft commented on a change in pull request #340: Cleanup Python and Ansible Code

Posted by GitBox <gi...@apache.org>.
arvindshmicrosoft commented on a change in pull request #340: Cleanup Python and Ansible Code
URL: https://github.com/apache/fluo-muchos/pull/340#discussion_r408962245
 
 

 ##########
 File path: ansible/roles/azure/tasks/create_adlsgen2.yml
 ##########
 @@ -142,7 +144,7 @@
     api_version: '2015-07-01'
   register: RoleDefinitionInfo
 
-# Retrieve storage acount informationn. 
+# Retrieve storage acount informationn.
 
 Review comment:
   Good catch. I found a few more typos in this space which I will fix and push an update.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] keith-turner commented on a change in pull request #340: Cleanup Python and Ansible Code

Posted by GitBox <gi...@apache.org>.
keith-turner commented on a change in pull request #340: Cleanup Python and Ansible Code
URL: https://github.com/apache/fluo-muchos/pull/340#discussion_r408975724
 
 

 ##########
 File path: CONTRIBUTING.md
 ##########
 @@ -0,0 +1,36 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Contributors Guide
+
+If you believe that you have found a bug, please search for an existing [issue](https://github.com/apache/fluo-muchos/issues) to see if it has already been reported. For simple changes, its ok to just submit a pull request without an issue.
+
+## Development
 
 Review comment:
   The current readme has a python testing section at the end, may make sense to move that info to this new document.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] karthick-rn commented on a change in pull request #340: Cleanup Python and Ansible Code

Posted by GitBox <gi...@apache.org>.
karthick-rn commented on a change in pull request #340: Cleanup Python and Ansible Code
URL: https://github.com/apache/fluo-muchos/pull/340#discussion_r408781831
 
 

 ##########
 File path: ansible/roles/azure/tasks/create_adlsgen2.yml
 ##########
 @@ -142,7 +144,7 @@
     api_version: '2015-07-01'
   register: RoleDefinitionInfo
 
-# Retrieve storage acount informationn. 
+# Retrieve storage acount informationn.
 
 Review comment:
   Remove extra 'n' at the end. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] ctubbsii commented on a change in pull request #340: Cleanup Python and Ansible Code

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on a change in pull request #340: Cleanup Python and Ansible Code
URL: https://github.com/apache/fluo-muchos/pull/340#discussion_r409251801
 
 

 ##########
 File path: .travis.yml
 ##########
 @@ -15,4 +15,11 @@
 language: python
 python:
   - "3.5"
-script: nosetests -w lib/
+install:
+  - pip install flake8
+  - pip install ansible-lint
+script:
+  - nosetests -w lib/
+  - ansible-lint -x 204,301
+  - flake8
+  - git ls-files | tr '\n' '\0' | xargs -0 -L1 bash -c 'if test "$(grep --files-with-matches --binary-files=without-match --max-count=1 --regexp='.*' "$0")" && test "$(tail --bytes=1 "$0")"; then echo "No new line at end of $0."; false; fi'
 
 Review comment:
   Thanks for the update. I think the separate script is definitely better. I made a few additional notes, but will resolve this comment.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services