You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration
Adrian Likins 95abc1d82e Fix fact failures cause by ordering of collectors (#30777)
* Fix fact failures cause by ordering of collectors

Some fact collectors need info collected by other facts.
(for ex, service_mgr needs to know 'ansible_system').
This info is passed to the Collector.collect method via
the 'collected_facts' info.

But, the order the fact collectors were running in is
not a set order, so collectors like service_mgr could
run before the PlatformFactCollect ('ansible_system', etc),
so the 'ansible_system' fact would not exist yet. 

Depending on the collector and the deps, this can result
in incorrect behavior and wrong or missing facts.

To make the ordering of the collectors more consistent
and predictable, the code that builds that list is now
driven by the order of collectors in default_collectors.py,
and the rest of the code tries to preserve it.

* Flip the loops when building collector names

iterate over the ordered default_collectors list
selecting them for the final list in order instead
of driving it from the unordered collector_names set.

This lets the list returned by select_collector_classes
to stay in the same order as default_collectors.collectors

For collectors that have implicit deps on other fact collectors,
the default collectors can be ordered to include those early.

* default_collectors.py now uses a handful of sub lists of
collectors that can be ordered in default_collectors.collectors.

fixes #30753
fixes #30623
7 years ago
..
targets Fix fact failures cause by ordering of collectors (#30777) 7 years ago
asa.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 7 years ago
cloud-config-aws.yml.template Add region to ansible-test AWS cloud config. (#30733) 7 years ago
cloud-config-azure.yml.template Fix Azure config template. 7 years ago
cloud-config-cs.ini.template Add support for cloud tests to ansible-test. (#24315) 7 years ago
dellos6.yaml Migrate Network Tests into ansible/ansible (#18233) 8 years ago
dellos9.yaml Migrate Network Tests into ansible/ansible (#18233) 8 years ago
dellos10.yaml Migrate Network Tests into ansible/ansible (#18233) 8 years ago
eos.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 7 years ago
integration_config.yml Fix cosmetic problems in YAML source 8 years ago
inventory Fix fact failures cause by ordering of collectors (#30777) 7 years ago
inventory.network Add VyOS integration tests for net_linkagg (#26478) 7 years ago
inventory.networking.template Increase python version coverage for tests. (#24762) 7 years ago
inventory.remote.template Add support for OS X CI on Shippable. (#17160) 8 years ago
inventory.winrm.template Increase python version coverage for tests. (#24762) 7 years ago
ios.yaml IOS Ping: Add new module to support ping tests from IOS devices (#28557) 7 years ago
iosxr.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 7 years ago
junos.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 7 years ago
network-all.yaml New module: management of the Nuage Networks VSP SDN solution (network/nuage/nuage_vspk) (#24895) 7 years ago
network-integration.cfg Increase socket connect retry timeout for integration test (#30681) 7 years ago
nxos.yaml Fix nxos_snmp_community idempotence issue (#30388) 7 years ago
ops.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 7 years ago
platform_agnostic.yaml remove net_command (#28525) 7 years ago
target-prefixes.network openvswitch targets via network-integration (#27295) 7 years ago
vyos.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 7 years ago