Repository navigation
Add AsyncPillar.aclose so file_client: local minions can connect - #70653
Merged
Merged
Conversation
twangboy
previously approved these changes
Nov 5, 2026
twangboy
force-pushed
the
fix/70637-asyncpillar-aclose
branch
from
November 5, 2026 22:54
d5f0c96 to
8d55d93
Compare
Since 3008.3 the minion awaits async_pillar.aclose() after compiling pillar, but only AsyncRemotePillar defined it. With file_client: local, get_async_pillar() returns an AsyncPillar, so _post_master_init and the pillar refresh raised AttributeError and the minion never connected. AsyncPillar.aclose() now calls destroy(), matching the sync teardown. Fixes saltstack#70637
dwoz
force-pushed
the
fix/70637-asyncpillar-aclose
branch
from
November 20, 2026 07:13
060e4e1 to
2786932
Compare
Parenthesized `with` statements are Py3.10+ grammar. Salt's Ruff config
targets Py3.8 syntax, which caused `Check new Ruff violations` to fail
with:
Cannot use parentheses within a `with` statement on Python 3.8
(syntax was added in Python 3.9)
Switch to `contextlib.ExitStack` so the test still exercises the same
patches in the same order with identical semantics.
dwoz
approved these changes
Nov 23, 2026
|
Congratulations on your first PR being merged! 🎉 |
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds
AsyncPillar.aclose(). Since 3008.3 the minion awaitsasync_pillar.aclose()after compiling pillar(
salt/minion.pylines 2405 and 4786), but onlyAsyncRemotePillardefined it. Withfile_client: local,get_async_pillar()returns anAsyncPillar, so_post_master_initand the pillar refresh raiseAttributeError: 'AsyncPillar' object has no attribute 'aclose'and the minion never connects.The new method calls
destroy(), the same teardown the sync path uses.What issues does this PR fix or reference?
Fixes #70637
Previous Behavior
A minion with
file_client: localcrashes on connect with theAttributeErrorabove.New Behavior
The local async pillar closes cleanly; the minion connects and pillar refresh works as in 3008.2.
Merge requirements satisfied?
changelog/70637.fixed.mdtests/pytests/unit/pillar/test_async_pillar.pyfails on 3008.x without the fix(1 failed) and passes with it (1 passed). The existing pillar suite is left to CI.
Commits signed with GPG?
No
AI-assisted: the change was written with AI coding tools; I directed, reviewed and tested it.