Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[wip] Add copy on write opts handling#68528

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
dwoz wants to merge13 commits intosaltstack:master
base:master
Choose a base branch
Loading
fromdwoz:opts_memory_optimization

Conversation

@dwoz
Copy link
Contributor

Reduce duplicated data and memory consuption by adding copy on write opts dictionary

What does this PR do?

What issues does this PR fix or reference?

Fixes

Previous Behavior

Remove this section if not relevant

New Behavior

Remove this section if not relevant

Merge requirements satisfied?

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

Commits signed with GPG?

Yes/No

frebib reacted with eyes emoji
Reduce duplicated data and memory consuption by adding copy on writeopts dictionary
@dwozdwoz added the test:fullRun the full test suite labelDec 12, 2025
@dwozdwoz requested a review froma team as acode ownerDecember 12, 2025 22:25
Add validation to ensure:- opts is a valid dict-like object- new_value is not None (or handle None case properly)- Better error handling for edge casesThis helps prevent issues in CI environments where test isolationor parallel execution might expose edge cases not seen locally.
The isinstance() check for master_opts() was failing when it returnedan OptsDict instead of a dict. OptsDict is a MutableMapping, not a dictsubclass, so the check `isinstance(mopts, dict)` would fail and causethe code to incorrectly use default file_roots (/srv/salt) instead ofthe actual configured file_roots.This caused 175 test failures in CI where tests would return emptyresults because the file client couldn't find the test files.Fixed by checking for both dict and Mapping types:    isinstance(mopts, (dict, Mapping))🤖 Generated with [Claude Code](https://claude.com/claude-code)Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

test:fullRun the full test suite

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@dwoz

[8]ページ先頭

©2009-2025 Movatter.jp