[BUG] pkg.uptodate reports success when refresh=True but package database check fails
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
As title
Setup
Debian-10 master/minion set
Salt: 3003
update.sls:
update:
pkg.uptodate:
- refresh: True
Steps to Reproduce the behavior
Take master offline or block external access.
salt '*' state.apply update
Expected behavior
Result will show "False"
Optional - Comment may report failure to update packages
Versions Report
I'm not on that machine at present.
Fresh install of Salt 3003, but reproducible elsewhere
Additional context
pkg.uptodate returns only True or False.
The reported Result is True with comment System is already up-to-date
This is fine when refresh is False, but when user has explicitly set refresh to True, it's a reasonable assumption that the failure to refresh will be somehow reported.
See e.g. QubesOS/qubes-issues#6585
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 pkg.uptodate state entry point and reproduce the report using update.sls with refresh: True while the master or external access is unavailable. Compare the returned result and comment with the expected failure behavior; done means a failed database refresh is reported instead of success with "System is already up-to-date".
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100