insights-core
insights-core copied to clipboard
The order of handling "branch_info" spec is wrong
The file "branch_info" is created by insights-client itself. However, the insights client will run all the specs first, and after that, the "/branch_info" is created. As a result, in the insights log, we can see the following errors:
2022-07-20 04:41:08,635 INFO insights.core.dr Trying insights.specs.default.DefaultSpecs.branch_info
2022-07-20 04:41:08,636 DEBUG insights.core.plugins /branch_info does not exist.
2022-07-20 04:41:08,636 INFO insights.core.dr Trying insights.specs.Specs.branch_info
2022-07-20 04:41:08,637 DEBUG insights.core.dr insights.specs.Specs.branch_info missing requirements All: [] Any: ['insights.specs.default.DefaultSpecs.branch_info']
....
2022-07-20 04:42:08,186 DEBUG insights.client.core_collector Collecting metadata...
2022-07-20 04:42:08,186 DEBUG insights.client.data_collector Writing branch information to archive...
```
In fact, we should create the file first before running the specs to avoid the wrong logs.