Skip to content

Issue with Compatibility Chart

In the androidstudio role, when the following file was included in the results directory, it was causing the program to crash. The error message was:

/home/linuxbrew/.linuxbrew/Cellar/python@3.9/3.9.10/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
Traceback (most recent call last):
  File "/home/hawkwood/gas-station/roles/applications/androidstudio/.venv/bin/ansibler", line 8, in <module>
    sys.exit(main())
  File "/home/hawkwood/gas-station/roles/applications/androidstudio/.venv/lib/python3.10/site-packages/ansibler/run.py", line 16, in main
    run_ansibler()
  File "/home/hawkwood/gas-station/roles/applications/androidstudio/.venv/lib/python3.10/site-packages/ansibler/run.py", line 34, in run_ansibler
    generate_compatibility_chart(
  File "/home/hawkwood/gas-station/roles/applications/androidstudio/.venv/lib/python3.10/site-packages/ansibler/compatibility/chart.py", line 46, in generate_compatibility_chart
    converge, idempotence = read_molecule_tests(test_file)
  File "/home/hawkwood/gas-station/roles/applications/androidstudio/.venv/lib/python3.10/site-packages/ansibler/compatibility/chart.py", line 127, in read_molecule_tests
    test = parse_test(molecule_test_dump)
  File "/home/hawkwood/gas-station/roles/applications/androidstudio/.venv/lib/python3.10/site-packages/ansibler/molecule_test/parse.py", line 44, in parse_test
    converge_recap_start = scan_molecule_results(
  File "/home/hawkwood/gas-station/roles/applications/androidstudio/.venv/lib/python3.10/site-packages/ansibler/molecule_test/parse.py", line 97, in scan_molecule_results
    return m.start() + start_from
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

The command I used to generate this error was:

poetry run ansibler --generate-compatibility-chart --molecule-results-dir 'molecule/.results/logs' --json-file .cache/compatibility-chart.json

In the Android Studio role.

The file that was causing the issue was definitely incomplete but the program should just ignore any bad results because there will definitely be occasions where bad test results get saved. Here's the faulty result:

/home/linuxbrew/.linuxbrew/Cellar/python@3.9/3.9.10/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
INFO     Found config file /home/hawkwood/gas-station/roles/applications/androidstudio/.config/molecule/config.yml
INFO     default scenario test matrix: dependency, lint, cleanup, destroy, syntax, create, prepare, converge, idempotence, side_effect, verify, cleanup, destroy
INFO     Performing prerun...
INFO     Running ansible-galaxy role install -vr requirements.yml --roles-path /home/hawkwood/.cache/ansible-compat/9ca62c/roles
INFO     Running ansible-galaxy collection install -vr requirements.yml -p /home/hawkwood/.cache/ansible-compat/9ca62c/collections
INFO     Set ANSIBLE_LIBRARY=/home/hawkwood/.cache/ansible-compat/9ca62c/modules:/home/hawkwood/.ansible/plugins/modules:/usr/share/ansible/plugins/modules
INFO     Set ANSIBLE_COLLECTIONS_PATH=/home/hawkwood/.cache/ansible-compat/9ca62c/collections:/home/hawkwood/.ansible/collections:/usr/share/ansible/collections
INFO     Set ANSIBLE_ROLES_PATH=/home/hawkwood/.cache/ansible-compat/9ca62c/roles:/home/hawkwood/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
INFO     Using /home/hawkwood/.ansible/roles/professormanhattan.androidstudio symlink to current repository in order to enable Ansible to find the role using its expected full name.
INFO     Running default > dependency
task: [ansible:test:molecule:dependencies] if [ -n "$CI" ]; then
  .config/log info '`$CI` environment is present'
  task ansible:test:molecule:dependencies:ci
else
  task ansible:test:molecule:dependencies:local
fi

task: Task "install:software:sshpass" is up to date
task: Task "install:software:expect" is up to date
task: Task "install:software:python" is up to date
task: Task "install:python:requirements:poetry:prereqs" is up to date
task: Task "install:python:requirements:poetry" is up to date
task: Task "ansible:galaxy:requirements" is up to date
task: [ansible:test:molecule:dependencies:local] if poetry &> /dev/null; then
  poetry run  ansible-galaxy install --ignore-errors -r requirements.yml
else
  .config/log info 'Current shell is already a Poetry virtual environment'
  ansible-galaxy install --ignore-errors -r requirements.yml
fi

   INFO    Current shell is already a Poetry virtual environment
Starting galaxy role install process
- downloading role 'snapd', owned by professormanhattan
- downloading role from https://github.com/ProfessorManhattan/ansible-snapd/archive/v0.0.1.tar.gz
- extracting professormanhattan.snapd to /home/hawkwood/.ansible/roles/professormanhattan.snapd
[WARNING]: - professormanhattan.snapd was NOT installed successfully: the
specified role professormanhattan.snapd appears to already exist. Use --force
to replace it.
- downloading role 'homebrew', owned by professormanhattan
- downloading role from https://github.com/ProfessorManhattan/ansible-homebrew/archive/master.tar.gz
- extracting professormanhattan.homebrew to /home/hawkwood/.ansible/roles/professormanhattan.homebrew
[WARNING]: - professormanhattan.homebrew was NOT installed successfully: the
specified role professormanhattan.homebrew appears to already exist. Use
--force to replace it.
- downloading role 'java', owned by professormanhattan
- downloading role from https://github.com/ProfessorManhattan/ansible-java/archive/v1.0.1.tar.gz
- extracting professormanhattan.java to /home/hawkwood/.ansible/roles/professormanhattan.java
[WARNING]: - professormanhattan.java was NOT installed successfully: the
specified role professormanhattan.java appears to already exist. Use --force to
replace it.
Starting galaxy collection install process
Nothing to do. All requested collections are already installed. If you want to reinstall them, consider using `--force`.
task: [symlink:role] mkdir -p "$HOME/.ansible/roles"
task: [symlink:role] rm -rf "$HOME/.ansible/roles/professormanhattan.androidstudio"
task: [symlink:role] ln -sf "$PWD" "$HOME/.ansible/roles/professormanhattan.androidstudio"
INFO     Dependency completed successfully.
INFO     Running default > lint
INFO     Lint is disabled.
INFO     Running default > cleanup
WARNING  Skipping, cleanup playbook not configured.
INFO     Running default > destroy
[WARNING]: Invalid characters were found in group names but not replaced, use
-vvvv to see details
[WARNING]: Found both group and host with same name: CentOS-8
[WARNING]: Found both group and host with same name: CentOS-7
[WARNING]: Found both group and host with same name: Fedora-33
[WARNING]: Found both group and host with same name: Fedora-34
[WARNING]: Found both group and host with same name: CentOS-Stream-8
[WARNING]: Found both group and host with same name: Fedora-35

PLAY [Update platforms] ********************************************************

TASK [Gathering Facts] *********************************************************
Thursday 24 February 2022  03:06:01 -0500 (0:00:00.014)       0:00:00.014 *****
ok: [localhost]

TASK [Filtering platforms list using the group defined in the MOLECULE_GROUP environment variable] ***
Thursday 24 February 2022  03:06:08 -0500 (0:00:07.153)       0:00:07.167 *****
skipping: [localhost]

PLAY [Destroy] *****************************************************************

TASK [Destroy molecule instance(s)] ********************************************
Thursday 24 February 2022  03:06:08 -0500 (0:00:00.387)       0:00:07.554 *****
ok: [localhost] => (item=ArchLinux-Latest)
ok: [localhost] => (item=CentOS-7)
ok: [localhost] => (item=CentOS-8)
ok: [localhost] => (item=CentOS-Stream-8)
ok: [localhost] => (item=Debian-9-Stretch)
ok: [localhost] => (item=Debian-10-Buster)
ok: [localhost] => (item=Debian-11-Bullseye)
ok: [localhost] => (item=Fedora-33)
ok: [localhost] => (item=Fedora-34)
ok: [localhost] => (item=Fedora-35)
ok: [localhost] => (item=Ubuntu-18.04-Bionic-Beaver)
ok: [localhost] => (item=Ubuntu-20.04-Focal-Fossa)
ok: [localhost] => (item=Ubuntu-21.04-Hirsute-Hippo)
ok: [localhost] => (item=Ubuntu-21.10-Impish-Indri)
ok: [localhost] => (item=Windows-10)

TASK [Populate instance config] ************************************************
Thursday 24 February 2022  03:06:56 -0500 (0:00:47.399)       0:00:54.954 *****
ok: [localhost]

TASK [Dump instance config] ****************************************************
Thursday 24 February 2022  03:06:56 -0500 (0:00:00.185)       0:00:55.140 *****
skipping: [localhost]

PLAY RECAP *********************************************************************
localhost                  : ok=3    changed=0    unreachable=0    failed=0    skipped=2    rescued=0    ignored=0

Thursday 24 February 2022  03:06:56 -0500 (0:00:00.372)       0:00:55.513 *****
===============================================================================
Destroy molecule instance(s) ------------------------------------------- 47.40s
Gathering Facts --------------------------------------------------------- 7.15s
Filtering platforms list using the group defined in the MOLECULE_GROUP environment variable --- 0.39s
Dump instance config ---------------------------------------------------- 0.37s
Populate instance config ------------------------------------------------ 0.19s
Playbook run took 0 days, 0 hours, 0 minutes, 55 seconds
INFO     Running default > syntax
[WARNING]: Invalid characters were found in group names but not replaced, use
-vvvv to see details
[WARNING]: Found both group and host with same name: Fedora-34
[WARNING]: Found both group and host with same name: CentOS-Stream-8
[WARNING]: Found both group and host with same name: CentOS-7
[WARNING]: Found both group and host with same name: Fedora-33
[WARNING]: Found both group and host with same name: Fedora-35
[WARNING]: Found both group and host with same name: CentOS-8

playbook: /home/hawkwood/gas-station/roles/applications/androidstudio/molecule/converge.yml
INFO     Running default > create
[WARNING]: Invalid characters were found in group names but not replaced, use
-vvvv to see details
[WARNING]: Found both group and host with same name: Fedora-33
[WARNING]: Found both group and host with same name: CentOS-7
[WARNING]: Found both group and host with same name: Fedora-35
[WARNING]: Found both group and host with same name: CentOS-Stream-8
[WARNING]: Found both group and host with same name: Fedora-34
[WARNING]: Found both group and host with same name: CentOS-8

PLAY [Update platforms] ********************************************************

TASK [Gathering Facts] *********************************************************
Thursday 24 February 2022  03:06:59 -0500 (0:00:00.015)       0:00:00.015 *****
ok: [localhost]

TASK [Filtering platforms list using the group defined in the MOLECULE_GROUP environment variable] ***
Thursday 24 February 2022  03:07:07 -0500 (0:00:07.068)       0:00:07.084 *****
skipping: [localhost]

PLAY [Create] ******************************************************************

TASK [Create molecule instance(s)] *********************************************
Thursday 24 February 2022  03:07:07 -0500 (0:00:00.381)       0:00:07.465 *****
changed: [localhost] => (item=ArchLinux-Latest)
changed: [localhost] => (item=CentOS-7)
changed: [localhost] => (item=CentOS-8)
changed: [localhost] => (item=CentOS-Stream-8)
changed: [localhost] => (item=Debian-9-Stretch)
changed: [localhost] => (item=Debian-10-Buster)
failed: [localhost] (item=Debian-11-Bullseye) => changed=false 
  ansible_loop_var: item
  cmd:
  - /usr/bin/vagrant
  - up
  - --no-provision
  item:
    box: bento/debian-11.1
    cpus: 1
    groups:
    - Debian
    - Debian-11
    - Debian-Flavor
    - Linux
    memory: 512
    name: Debian-11-Bullseye
    provider_raw_config_args:
    - customize [ 'modifyvm', :id, '--natdnshostresolver1', 'on' ]
  msg: 'Failed to start the VM: See log file ''/home/hawkwood/.cache/molecule/androidstudio/default/vagrant-Debian-11-Bullseye.err'''
  rc: 1
  stderr: |-
    ### 2022-01-04 20:01:56 ###
    ### 2022-01-04 20:06:56 ###
    ### 2022-01-04 20:06:56 ###
    ### 2022-01-04 20:06:56 ###
    ### 2022-01-04 20:17:30 ###
    ### 2022-01-04 20:17:30 ###
    ### 2022-01-04 20:17:30 ###
    ### 2022-01-04 21:47:44 ###
    ### 2022-01-04 21:52:25 ###
    ### 2022-01-04 21:52:25 ###
    ### 2022-01-04 21:52:25 ###
    ### 2022-01-04 22:17:43 ###
    ### 2022-01-04 22:17:43 ###
    ### 2022-01-04 22:17:43 ###
    ### 2022-01-04 23:24:53 ###
    ### 2022-01-04 23:29:55 ###
    ### 2022-01-04 23:29:55 ###
    ### 2022-01-04 23:29:55 ###
    ### 2022-01-04 23:53:30 ###
    ### 2022-01-04 23:53:30 ###
    ### 2022-01-04 23:53:30 ###
    ### 2022-02-24 03:06:30 ###
    ### 2022-02-24 03:12:23 ###
    ### 2022-02-24 03:12:23 ###
    Timed out while waiting for the machine to boot. This means that
    Vagrant was unable to communicate with the guest machine within
    the configured ("config.vm.boot_timeout" value) time period.
  
    If you look above, you should be able to see the error(s) that
    Vagrant had when attempting to connect to the machine. These errors
    are usually good hints as to what may be wrong.
  
    If you're using a custom box, make sure that networking is properly
    working and you're able to connect to the machine. It is a common
    problem that networking isn't setup properly in these boxes.
    Verify that authentication configurations are also setup properly,
    as well.
  
    If the box appears to be booting properly, you may want to increase
    the timeout ("config.vm.boot_timeout") value.
  stderr_lines: <omitted>
changed: [localhost] => (item=Fedora-33)
changed: [localhost] => (item=Fedora-34)
changed: [localhost] => (item=Fedora-35)
changed: [localhost] => (item=Ubuntu-18.04-Bionic-Beaver)
changed: [localhost] => (item=Ubuntu-20.04-Focal-Fossa)
changed: [localhost] => (item=Ubuntu-21.04-Hirsute-Hippo)
changed: [localhost] => (item=Ubuntu-21.10-Impish-Indri)
changed: [localhost] => (item=Windows-10)

PLAY RECAP *********************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1    skipped=1    rescued=0    ignored=0

Thursday 24 February 2022  03:22:33 -0500 (0:15:26.073)       0:15:33.539 *****
===============================================================================
Create molecule instance(s) ------------------------------------------- 926.07s
Gathering Facts --------------------------------------------------------- 7.07s
Filtering platforms list using the group defined in the MOLECULE_GROUP environment variable --- 0.38s
Playbook run took 0 days, 0 hours, 15 minutes, 33 seconds
WARNING  Retrying execution failure 2 of: ansible-playbook --inventory /home/hawkwood/.cache/molecule/androidstudio/default/inventory --skip-tags molecule-notest,notest /home/hawkwood/gas-station/roles/applications/androidstudio/.config/molecule/vagrant.create.yml
CRITICAL Ansible return code was 2, command was: ['ansible-playbook', '--inventory', '/home/hawkwood/.cache/molecule/androidstudio/default/inventory', '--skip-tags', 'molecule-notest,notest', '/home/hawkwood/gas-station/roles/applications/androidstudio/.config/molecule/vagrant.create.yml']
WARNING  An error occurred during the test sequence action: 'create'. Cleaning up.
INFO     Running default > cleanup
WARNING  Skipping, cleanup playbook not configured.
INFO     Running default > destroy
[WARNING]: Invalid characters were found in group names but not replaced, use
-vvvv to see details
[WARNING]: Found both group and host with same name: Fedora-35
[WARNING]: Found both group and host with same name: CentOS-Stream-8
[WARNING]: Found both group and host with same name: CentOS-8
[WARNING]: Found both group and host with same name: Fedora-33
[WARNING]: Found both group and host with same name: CentOS-7
[WARNING]: Found both group and host with same name: Fedora-34

PLAY [Update platforms] ********************************************************

TASK [Gathering Facts] *********************************************************
Thursday 24 February 2022  03:22:35 -0500 (0:00:00.022)       0:00:00.022 *****
ok: [localhost]

TASK [Filtering platforms list using the group defined in the MOLECULE_GROUP environment variable] ***
Thursday 24 February 2022  03:22:44 -0500 (0:00:09.622)       0:00:09.644 *****
skipping: [localhost]

PLAY [Destroy] *****************************************************************

TASK [Destroy molecule instance(s)] ********************************************
Thursday 24 February 2022  03:22:45 -0500 (0:00:00.442)       0:00:10.086 *****
changed: [localhost] => (item=ArchLinux-Latest)
changed: [localhost] => (item=CentOS-7)
changed: [localhost] => (item=CentOS-8)
changed: [localhost] => (item=CentOS-Stream-8)
changed: [localhost] => (item=Debian-9-Stretch)
changed: [localhost] => (item=Debian-10-Buster)
changed: [localhost] => (item=Debian-11-Bullseye)
changed: [localhost] => (item=Fedora-33)
changed: [localhost] => (item=Fedora-34)
changed: [localhost] => (item=Fedora-35)
changed: [localhost] => (item=Ubuntu-18.04-Bionic-Beaver)
changed: [localhost] => (item=Ubuntu-20.04-Focal-Fossa)
changed: [localhost] => (item=Ubuntu-21.04-Hirsute-Hippo)
changed: [localhost] => (item=Ubuntu-21.10-Impish-Indri)
changed: [localhost] => (item=Windows-10)

TASK [Populate instance config] ************************************************
Thursday 24 February 2022  03:25:36 -0500 (0:02:51.173)       0:03:01.260 *****
ok: [localhost]

TASK [Dump instance config] ****************************************************
Thursday 24 February 2022  03:25:36 -0500 (0:00:00.185)       0:03:01.446 *****
ok: [localhost]

PLAY RECAP *********************************************************************
localhost                  : ok=4    changed=1    unreachable=0    failed=0    skipped=1    rescued=0    ignored=0

Thursday 24 February 2022  03:25:37 -0500 (0:00:01.018)       0:03:02.465 *****
===============================================================================
Destroy molecule instance(s) ------------------------------------------ 171.17s
Gathering Facts --------------------------------------------------------- 9.62s
Dump instance config ---------------------------------------------------- 1.02s
Filtering platforms list using the group defined in the MOLECULE_GROUP environment variable --- 0.44s
Populate instance config ------------------------------------------------ 0.19s
Playbook run took 0 days, 0 hours, 3 minutes, 2 seconds
INFO     Pruning extra files from scenario ephemeral directory

If a file cannot be parsed, then just ignore it and make sure the app doesn't crash.