state.show_state_usage misses include:d states
Open
Nobody has claimed this yet.
bug
severity-high
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
If you have included states like I described in issue #11868 it seems that state.show_state_usage call puts the included states in the 'unused' part of the result:
web-1:
----------
base:
----------
count_all:
235
count_unused:
176
count_used:
59
unused:
- all-1804-fixups
- all-secure
- apache
[...]
used:
[...]
- machine.web.apache
The first lines of machine/web/apache/init.sls are:
include:
- apache
So i'd say its used.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the state.show_state_usage call and the example machine/web/apache/init.sls, focusing on how the include entry is represented in the used and unused results. Reproduce the shown output with an included state, then verify that included states are classified as used rather than unused.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100