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

[3006.x] Don't needlessly refresh fileserver backends during Pillar rendering #65991

Merged
merged 9 commits into from
Feb 9, 2024

Conversation

terminalmage
Copy link
Contributor

What does this PR do?

This uses the opts key that masterless runs use to limit fileserver backend refreshes to a single refresh. Adding it to the master opts ensures that FSChan instances created on the master do not trigger fileserver backend refreshes.

What issues does this PR fix or reference?

Fixes #65990

Previous Behavior

Fileserver backends are refreshed when the master instantiates an FSClient instance.

New Behavior

Fileserver backends are no longer refreshed.

Merge requirements satisfied?

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

Commits signed with GPG?

No

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

@terminalmage terminalmage requested a review from a team as a code owner February 6, 2024 00:53
@terminalmage terminalmage requested review from twangboy and removed request for a team February 6, 2024 00:53
@salt-project-bot-prod-environment salt-project-bot-prod-environment bot changed the title Don't needlessly refresh fileserver backends during Pillar rendering [master] Don't needlessly refresh fileserver backends during Pillar rendering Feb 6, 2024
@dmurphy18 dmurphy18 self-requested a review February 6, 2024 16:28
Copy link
Contributor

@dmurphy18 dmurphy18 left a comment

Choose a reason for hiding this comment

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

The tests case needs to be under tests/pytest and using pytest to test with.
Tests under tests/unit are considered unittest and will eventually be removed.

All tests PR's need tests now written using pytest, are they will be rejected.

@terminalmage
Copy link
Contributor Author

terminalmage commented Feb 6, 2024

The tests case needs to be under tests/pytest and using pytest to test with. Tests under tests/unit are considered unittest and will eventually be removed.

All tests PR's need tests now written using pytest, are they will be rejected.

You don't write tests using pytest. You run them using pytest, as I did before submitting this PR.

I brought this up with @dmurphy18 in Slack, but the above is directly contradicted by the following docs pages:

Additionally, the location where tests should be added is not covered by the recent changes to Project Management. Both the above two pages should arguably be linked from this page.

With two distinct sets of tests in the repo, it's a must to get this documentation updated to reflect the current policies of the project. Failure to do so increases the burden placed on the core team, as well as the contributors.

I've moved the tests over. I'm also available to assist in the process of updating the docs so that they more accurately reflect reality, provided I can get better clarity on the changes to these policies.

salt/config/__init__.py Outdated Show resolved Hide resolved
The LocalClient name has been deprecated for some time and now exists
only as an alias.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants