Skip to content

Defer master file list fetch in source_list until a salt:// URL is encountered#69823

Open
mangodxd wants to merge 2 commits into
saltstack:masterfrom
mangodxd:fix/defer-list-master-fetch
Open

Defer master file list fetch in source_list until a salt:// URL is encountered#69823
mangodxd wants to merge 2 commits into
saltstack:masterfrom
mangodxd:fix/defer-list-master-fetch

Conversation

@mangodxd

@mangodxd mangodxd commented Jul 17, 2026

Copy link
Copy Markdown

Every state using file.managed with a list source paid the cost of a full fileserver scan upfront, even when the first source was HTTP or local. Defer the cp.list_master / cp.list_master_dirs calls until a salt:// URL is actually hit.

@mangodxd
mangodxd requested a review from a team as a code owner July 17, 2026 04:58

@twangboy twangboy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you have commits from another PR in here. The changelog and tests aren't related to your file.managed fixes. Please remove those and add a changelog and tests for these changes.

mangodxd added 2 commits July 18, 2026 23:46
Instead of eagerly calling cp.list_master for every source list,
defer the fetch until a salt:// URL is actually encountered.
Fixes saltstack#69804.
@mangodxd
mangodxd force-pushed the fix/defer-list-master-fetch branch from f6a385c to 218dfaf Compare July 18, 2026 16:49
@mangodxd

Copy link
Copy Markdown
Author

Fixed. I've cleaned up the branch — removed the unrelated ZMQ commits and added:

  • Changelog: changelog/69823.fixed.md — documents the deferred cp.list_master behavior
  • Tests: Two new tests in est_file_basics.py:
    • est_source_list_defers_list_master_for_http — verifies cp.list_master is NOT called for HTTP sources
      
    • est_source_list_calls_list_master_for_salt_url — verifies cp.list_master IS called for salt:// sources
      

The branch now only contains the ile.py change plus changelog and tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants