Fix resourceCache to return proper modules when PS modules are installed during run#748
Merged
SteveL-MSFT merged 18 commits intoPowerShell:mainfrom Apr 13, 2025
Merged
Conversation
3 tasks
Collaborator
Author
|
@SteveL-MSFT, if you have some time, you might taking a glimpse? In the issue, I've also mentioned steps to reproduce it through the module. |
SteveL-MSFT
requested changes
Apr 12, 2025
Member
SteveL-MSFT
left a comment
There was a problem hiding this comment.
Can you repro the original issue by having a test case that executes a test resource that adds a new test resource?
992c730 to
c8da022
Compare
added 2 commits
April 13, 2025 15:50
SteveL-MSFT
requested changes
Apr 13, 2025
3 tasks
Collaborator
Author
|
Should be good to go @SteveL-MSFT . Workstation did not cooperate today. I hadn't re-requested a review yet, you sharp eye ;) |
SteveL-MSFT
reviewed
Apr 13, 2025
SteveL-MSFT
approved these changes
Apr 13, 2025
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.
PR Summary
This PR addresses the issue described in #745. When modules are installed during a document being applied, the subsequent modules that are checked in the cache are overwritten. Example:
Invoke-DscCacheRefresh -Module '<module>', flushing out the cache with only that particular module.It's a pretty rough edge case and quite interesting to debug. Nevertheless, there isn't any test added because it would either introduce an external dependency or require internal work to be implemented. Of course, I can be wrong on this and would appreciate some help to write one.