-
Notifications
You must be signed in to change notification settings - Fork 81
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
WindowsEventLog: Evaluation of event log differ #229
Comments
Working on this along with a few other issues with this resource. |
Cool! That would be awesome @cohdjn . Just an FYI, there is an existing problem with the integration tests that are causing the CI to fail. I'll try and get some time this weekend to finally figure out what is going on. |
This is turning into a refactor. As I've been going through the module, there's a lot of things in here I really don't understand why/how they were done. This could end up being a breaking change across all the open issues for WIndowsEventLog. Let me know how you'd like to proceed. |
Hi @cohdjn, I feel like I encountered this issue too (the duplicate queries of EventLog), some time back. I believe I also couldn't figure out why it was needed, but it did seem to break integration tests or something like that. So I left it in. What would the breaking change be? We can take them if they improve the resource - but try to avoid them if possible. |
So far the only possible breaking change is on Get-TargetResource. The IsEnabled parameter is not required and doesn't really do anything. Additionally, the requirement of having IsEnabled declared $True doesn't make sense which (based on what I've done so far) doesn't feel like a breaking change. At least not yet. I'm still reworking parts of the script along with the tests so I don't fully know just yet. |
The |
Sounds good to me. Agree with @johlju. We'll make it a non-breaking change. |
Done. I'm down to re(writing) tests and cleaning/formatting the code so as soon as @PlagueHO gets CI straighten out I should be ready to issue the PR. |
@cohdjn it should be good to go. Rebase with the latest changes in main and the pipeline should work. |
I'm on it. |
@cohdjn yes, it was just the API key that had expired in the deploy step. The tests pipeline did work. But now it is green all over. 😄 |
The existence of the event log name is evaluated twice in this code, this is redundant and should be only evaluated once. Also, the two evaluation differ in that one uses
-like
and the other uses-eq
, this should probably only be either one, not both.https://github.com/PowerShell/ComputerManagementDsc/blob/75152fc76595b7c36ce6e18439d7488a2df0c0d0/DSCResources/MSFT_WindowsEventLog/MSFT_WindowsEventLog.psm1#L180-L184
The text was updated successfully, but these errors were encountered: