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

Latest package version fetching regex fix - Package resource #5797

Merged
merged 1 commit into from
Jan 20, 2022

Conversation

Nik08
Copy link
Contributor

@Nik08 Nik08 commented Jan 12, 2022

Signed-off-by: Nikita Mathur nikita.mathur@chef.io

Description

Latest package version fetching regex fix - Package resource

Based on below comment by @myii

This doesn't handle certain version numbers, resulting in a Malformed version number string error, such as:

×  DHCPD package: should be installed
   ×  System Package dhcp is expected to be installed
   Malformed version number string 4.4.2.

In this example, the problem is the trailing period (4.4.2. vs. 4.4.2).

Here are 5 such failures when running our weekly CI testing across a number of repos in our org:

Platform Package Version Malformed version number string
Debian 10 bind 1:9.11.5.P4+dfsg-5.1+deb10u6 9.11.5.
Arch dhcp 4.4.2.P1-4 4.4.2.
Debian 9 powerdns 4.5.0+master.0.g2717eea26-1pdns.stretch r.0.g2717
Debian 10 powerdns 4.7.0~alpha0+master.182.g8d0ac5936-1pdns.buster r.182.g8
Debian 11 powerdns 4.7.0~alpha0+master.182.g8d0ac5936-1pdns.bullseye r.182.g8

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New content (non-breaking change)
  • Breaking change (a content change which would break existing functionality or processes)

Checklist:

  • I have read the CONTRIBUTING document.

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
@Nik08 Nik08 requested a review from a team as a code owner January 12, 2022 12:46
@netlify
Copy link

netlify bot commented Jan 12, 2022

✔️ Deploy Preview for chef-inspec canceled.

🔨 Explore the source changes: 9b6637f

🔍 Inspect the deploy log: https://app.netlify.com/sites/chef-inspec/deploys/61decda70dab3400072cb04d

@sonarcloud
Copy link

sonarcloud bot commented Jan 12, 2022

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.0% 0.0% Duplication

@myii
Copy link
Contributor

myii commented Jan 19, 2022

This definitely appears to be working better:

This highlights the problem with the current implementation (as mentioned in #5771 (comment)):

@clintoncwolfe clintoncwolfe merged commit 7c5d41c into main Jan 20, 2022
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.

3 participants