[codex] fix samba share persistence on failed runs#161
Draft
Conversation
😰 RSpec failure3 examples, 1 failure
|
Slowest examplesTop 3 slowest examples (0.15 seconds, 100% of total time)
|
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.
Summary
samba_serverbuild the share data forsmb.conffrom the compiled resource collection instead of depending on latersamba_shareconvergence to mutate the templatesamba_sharecode path that edits the server template in place during its actionsamba_shareso the rendered config still includes the share blockWhy
Issue #96 describes a failure mode where an unrelated resource fails later in the Chef run after
samba_serverhas already queued the delayedsmb.confwrite. In the old implementation, shares were only attached to the template when eachsamba_shareactually converged, so a failed run could still flush a config file with no share definitions and interrupt service.Impact
samba_shareno longer needs to reach back into the server template to inject variables during convergeRoot cause
The delayed template write in
samba_serverused template variables that were populated bysamba_shareactions. If the Chef run aborted before those actions converged, the delayed template still executed with an emptyshareshash.Validation
cookstyle resources/server.rb resources/share.rb spec/resources/server_spec.rbruby -c resources/server.rbruby -c resources/share.rbchef exec rspec spec/resources/server_spec.rbcurrently fails in this environment because the local Chef Ruby cannot load the nativejsonextension (parser.bundlecode-signing / Team ID mismatch on macOS)Closes #96.
This change is