Skip to content

Conversation

@sathish-progress
Copy link
Contributor

@sathish-progress sathish-progress commented Aug 21, 2025

This pull request updates how the chef-licensing gem is integrated and installed, switching to a custom branch and working around dependency resolution issues with internal artifactory. The changes affect the Gemfile, build/install scripts, and gemspec dependencies to ensure the correct version of chef-licensing is used during development and packaging.

Description

Dependency management and installation changes:

  • Added the chef-licensing gem to the Gemfile, sourcing it from a custom branch (nm/introducing-optional-mode) on GitHub instead of the default version. This will go away when the custom branch is released as gem.
  • Commented out the direct dependency on chef-licensing in inspec-core.gemspec, relying on the Gemfile and build scripts to provide the correct version.

Build and packaging script updates:

  • Modified habitat/plan.sh (do_install) to clone the custom chef-licensing branch from GitHub, build, and install the gem directly, and added a workaround to manually download and install the chef-official-distribution gem from internal artifactory due to incompatibility with standard gem dependency resolution.
  • Updated habitat/plan.ps1 (Invoke-Install) to perform similar steps on Windows: clone and install the custom chef-licensing branch, manually download and install the chef-official-distribution gem, and verify both installations.

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.

@netlify
Copy link

netlify bot commented Aug 21, 2025

Deploy Preview for chef-inspec ready!

Name Link
🔨 Latest commit 817ed0c
🔍 Latest deploy log https://app.netlify.com/projects/chef-inspec/deploys/68a6ed3f76e9bd0007d4875f
😎 Deploy Preview https://deploy-preview-7507--chef-inspec.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sathish-progress sathish-progress changed the base branch from main to inspec-7 August 21, 2025 09:56
@github-actions github-actions bot added the Documentation ZH multi-repo label for the docs-team label Aug 21, 2025
@Vasu1105 Vasu1105 removed the Documentation ZH multi-repo label for the docs-team label Aug 22, 2025
@sathish-progress sathish-progress force-pushed the CHEF-23547-use-offc-distrib-in-hab-plan branch from 21d49a5 to 19ef3e7 Compare September 5, 2025 11:30
@sathish-progress sathish-progress marked this pull request as ready for review September 9, 2025 08:53
@sathish-progress sathish-progress requested a review from a team as a code owner September 9, 2025 08:53
@Vasu1105 Vasu1105 requested a review from Copilot September 9, 2025 09:25
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modifies the Habitat packaging configuration to use the official chef-official-distribution gem instead of relying on default dependency resolution, while also integrating a custom chef-licensing branch.

  • Comments out the chef-licensing dependency in the gemspec
  • Adds manual installation of a custom chef-licensing branch from GitHub
  • Installs chef-official-distribution gem from internal artifactory in both shell and PowerShell plans

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
inspec-core.gemspec Comments out chef-licensing dependency
habitat/plan.sh Adds manual installation of custom chef-licensing and chef-official-distribution gems
habitat/plan.ps1 Adds PowerShell equivalent with verification steps for gem installations
Gemfile Adds chef-licensing dependency from GitHub branch

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

habitat/plan.sh Outdated
popd
rm -rf /tmp/chef-licensing

# internal artificatory is not compatible to resolve gem deps and fails with gem install <URL>
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a typo in the comment: 'artificatory' should be 'artifactory'.

Suggested change
# internal artificatory is not compatible to resolve gem deps and fails with gem install <URL>
# internal artifactory is not compatible to resolve gem deps and fails with gem install <URL>

Copilot uses AI. Check for mistakes.
habitat/plan.ps1 Outdated
gem list chef-licensing
If ($lastexitcode -ne 0) { Exit $lastexitcode }

# internal artificatory is not compatible to resolve gem deps and fails with gem install <URL>
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a typo in the comment: 'artificatory' should be 'artifactory'.

Suggested change
# internal artificatory is not compatible to resolve gem deps and fails with gem install <URL>
# internal artifactory is not compatible to resolve gem deps and fails with gem install <URL>

Copilot uses AI. Check for mistakes.
habitat/plan.sh Outdated
}

do_install() {
# Work around to load custom chef-licensing branch
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment should use 'workaround' (one word) instead of 'Work around' for consistency with technical terminology.

Suggested change
# Work around to load custom chef-licensing branch
# Workaround to load custom chef-licensing branch

Copilot uses AI. Check for mistakes.
habitat/plan.ps1 Outdated
}

function Invoke-Install {
# Work around to load custom chef-licensing branch
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment should use 'workaround' (one word) instead of 'Work around' for consistency with technical terminology.

Suggested change
# Work around to load custom chef-licensing branch
# Workaround to load custom chef-licensing branch

Copilot uses AI. Check for mistakes.
@sathish-progress sathish-progress force-pushed the CHEF-23547-use-offc-distrib-in-hab-plan branch from 1558c6e to 258f060 Compare September 10, 2025 07:07
@Vasu1105 Vasu1105 force-pushed the CHEF-23547-use-offc-distrib-in-hab-plan branch from b2e56a1 to e96f3a5 Compare September 10, 2025 17:27
@sathish-progress sathish-progress force-pushed the CHEF-23547-use-offc-distrib-in-hab-plan branch from e96f3a5 to d4a388d Compare September 26, 2025 10:32
sathish-progress and others added 9 commits October 6, 2025 16:22
Signed-off-by: Sathish <sbabu@progress.com>
Signed-off-by: Sathish <sbabu@progress.com>
Signed-off-by: Sathish <sbabu@progress.com>
Signed-off-by: Sathish <sbabu@progress.com>
Signed-off-by: Sathish <sbabu@progress.com>
Signed-off-by: Vasu1105 <vjagdale@progress.com>
Signed-off-by: Vasu1105 <vjagdale@progress.com>
Signed-off-by: Vasu1105 <vjagdale@progress.com>
… code clean up

Signed-off-by: Vasu1105 <vjagdale@progress.com>
@sathish-progress sathish-progress force-pushed the CHEF-23547-use-offc-distrib-in-hab-plan branch from d4a388d to dee96dc Compare October 6, 2025 10:53
Signed-off-by: Sathish <sbabu@progress.com>
Signed-off-by: Sathish <sbabu@progress.com>
Signed-off-by: Sathish <sbabu@progress.com>
Signed-off-by: Sathish <sbabu@progress.com>
Signed-off-by: Sathish <sbabu@progress.com>
@sathish-progress sathish-progress force-pushed the CHEF-23547-use-offc-distrib-in-hab-plan branch 2 times, most recently from 9d38c50 to f3db4c9 Compare October 7, 2025 09:34
@Vasu1105 Vasu1105 merged commit be6a891 into inspec-7 Oct 7, 2025
57 of 61 checks passed
@Vasu1105 Vasu1105 deleted the CHEF-23547-use-offc-distrib-in-hab-plan branch October 7, 2025 10:18
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.

4 participants