Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3007.x] Don't unnecessarily download remote sources to cache #66343

Merged
merged 2 commits into from May 13, 2024

Conversation

lkubb
Copy link
Contributor

@lkubb lkubb commented Apr 10, 2024

What does this PR do?

Makes file.managed check if an existing file's contents match the expected ones early (for remote sources with known source_hash). If they do, forces replace to false and thus skips fetching the file to cache.

What issues does this PR fix or reference?

Fixes: #66342
Ref: #64373

Previous Behavior

Essentially manages both intended file and file in cache, wastes resources.

New Behavior

Only manages intended file.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

@salt-project-bot-prod-environment salt-project-bot-prod-environment bot changed the title Don't unnecessarily download remote sources to cache [3007.x] Don't unnecessarily download remote sources to cache Apr 10, 2024
@lkubb lkubb force-pushed the file-managed-unnecessary-download branch from 6ace31a to 2d77487 Compare April 10, 2024 17:24
@lkubb lkubb force-pushed the file-managed-unnecessary-download branch from 2d77487 to de9a0f9 Compare April 10, 2024 19:59
@lkubb lkubb force-pushed the file-managed-unnecessary-download branch from 5353102 to 109dd48 Compare May 10, 2024 15:24
@dwoz
Copy link
Contributor

dwoz commented May 13, 2024

@lkubb Can you please backport this too?

@dwoz dwoz merged commit 1976763 into saltstack:3007.x May 13, 2024
173 checks passed
@lkubb
Copy link
Contributor Author

lkubb commented May 13, 2024

@dwoz Sure. :)

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.

None yet

3 participants