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

Add missing description to windows_service load_current_resource for idempotent check to be successful #14064

Merged

Conversation

jakauppila
Copy link
Contributor

When using windows_service to create/configure Windows services, if you specify a description, it will trigger a change on every execution due to the value not being discovered in load_current_value

 

Description

Discover the Windows Service description from win-32/service output.

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

  • I have read the CONTRIBUTING document.
  • I have run the pre-merge tests locally and they pass.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • If Gemfile.lock has changed, I have used --conservative to do it and included the full output in the Description above.
  • All new and existing tests passed.
  • All commits have been signed-off for the Developer Certificate of Origin.

…r idempotent check to be successful

Signed-off-by: Jared Kauppila <Jared.Kauppila@sentry.com>
@jakauppila jakauppila requested review from a team as code owners November 13, 2023 21:09
Copy link

sonarcloud bot commented Nov 13, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.4% 0.4% Duplication

@tpowell-progress tpowell-progress merged commit 68e6d2c into chef:main Nov 14, 2023
30 of 32 checks passed
@johnmccrae johnmccrae mentioned this pull request Dec 20, 2023
11 tasks
@bdwyertech
Copy link

bdwyertech commented Feb 2, 2024

This is broken. ServiceConfigInfo does not include a description field, do we even test things anymore?

image

https://github.com/chef/win32-service/blob/67a0f7ac46a5e0332d95867f1ee2e7cd733b9117/lib/win32/service.rb#L206-L217

@tpowell-progress I would suggest reverting this or marking another version as "stable" for Windows.

@bdwyertech
Copy link

bdwyertech commented Mar 27, 2024

@tpowell-progress @johnmccrae this is still broken FYI. Any service on Windows using description field will error out...

@tpowell-progress
Copy link
Contributor

This is broken. ServiceConfigInfo does not include a description field, do we even test things anymore?

Yes, we have added an internal UAT process which is part of the longer timeframes between releases. However, the focus of those tests are generally product driven requests. My fault for not requesting an explicit test to validate the new code, but I'm assuming that the resource continues to work without the description, or else there would be kitchen-tests that would be failing in CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants