Skip to content

CHEF-15721: Add Ruby 3.4 support and prepare for habitat bundling#560

Open
ashiqueps wants to merge 22 commits intomainfrom
CHEF-15721
Open

CHEF-15721: Add Ruby 3.4 support and prepare for habitat bundling#560
ashiqueps wants to merge 22 commits intomainfrom
CHEF-15721

Conversation

@ashiqueps
Copy link
Contributor

This PR implements Ruby 3.4 support for knife-azure and prepares it for integration with the knife habitat package, completing the first part of CHEF-15721 requirements.

Copilot AI review requested due to automatic review settings October 20, 2025 21:18
@ashiqueps ashiqueps added Type: Enhancement Adds new functionality. Platform: Azure ai-assisted Work completed with AI assistance following Progress AI policies labels Oct 20, 2025
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 adds Ruby 3.4 support to knife-azure and addresses test failures related to license checking functionality. The changes prepare the plugin for bundling with the knife habitat package.

Key Changes

  • Added Ruby 3.4 CI/CD pipeline steps for both Linux and Windows platforms
  • Enhanced test mocking to handle license validation and file operations more robustly
  • Relaxed test expectations from exact counts to minimum thresholds to accommodate Ruby 3.4 behavior

Reviewed Changes

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

File Description
.expeditor/verify.pipeline.yml Added Ruby 3.4 build configurations for Linux (Debian Bookworm) and Windows Server 2022
spec/spec_helper.rb Implemented comprehensive mocking for license checking and file operations to prevent test failures
spec/unit/bootstrap_azurerm_spec.rb Updated test expectations to use at_least matchers and added check_eula_license mocking
spec/unit/azurerm_server_create_spec.rb Enhanced file mocking with regex patterns and Chef extension method stubbing

Copilot AI review requested due to automatic review settings October 20, 2025 21:45
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

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

- Add Ruby 3.4 testing to CI pipeline (.expeditor/verify.pipeline.yml)
- Update spec helper to handle licensing compatibility
- Verify all 222 tests pass on Ruby 3.4.2
- Fix minor test compatibility issues for Ruby 3.4
- Prepare knife-azure for integration with knife habitat package

Signed-off-by: Ashique Saidalavi <Ashique.saidalavi@progress.com>
- Add mandatory compliance reminders at the top with 🚨 warnings
- Include step-by-step post-PR checklist to prevent missed requirements
- Add DCO signoff verification steps
- Emphasize immediate Jira field updates for AI governance
- Add final compliance verification to execution protocol
- Make ai-assisted label requirement more prominent
- Add quick reference checklist for all critical requirements

This addresses issues identified during CHEF-15721 implementation where
critical compliance steps were initially missed.

Signed-off-by: Ashique Saidalavi <Ashique.saidalavi@progress.com>
- Remove accidental pp statements from azurerm_server_create_spec.rb
- Addresses Copilot review feedback about debug code in tests
- All 147 tests continue to pass successfully

Signed-off-by: Ashique Saidalavi <Ashique.saidalavi@progress.com>
- Convert single quotes to double quotes in ENV assignments
- Addresses remaining Copilot style review feedback
- All 36 files now pass Chefstyle inspection with no offenses

Signed-off-by: Ashique Saidalavi <Ashique.saidalavi@progress.com>
Signed-off-by: Ashique Saidalavi <Ashique.saidalavi@progress.com>
Signed-off-by: Ashique Saidalavi <Ashique.saidalavi@progress.com>
Copilot AI review requested due to automatic review settings October 27, 2025 09:09
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

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

Signed-off-by: Ashique Saidalavi <Ashique.saidalavi@progress.com>
Signed-off-by: Ashique Saidalavi <Ashique.saidalavi@progress.com>
Copilot AI review requested due to automatic review settings October 27, 2025 09:23
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

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

Signed-off-by: Ashique Saidalavi <Ashique.saidalavi@progress.com>
Signed-off-by: Ashique Saidalavi <Ashique.saidalavi@progress.com>
Copilot AI review requested due to automatic review settings October 27, 2025 09:34
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

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

Signed-off-by: Ashique Saidalavi <Ashique.saidalavi@progress.com>
Signed-off-by: Ashique Saidalavi <Ashique.saidalavi@progress.com>
Copilot AI review requested due to automatic review settings October 27, 2025 10:36
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

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

Comments suppressed due to low confidence (1)

spec/spec_helper.rb:1

  • This mock in spec_helper.rb is overridden by the more specific mocks in azurerm_server_create_spec.rb lines 72-75. The global mock on line 72 of spec_helper will never be reached because line 71 calls and_call_original, then line 72 immediately overwrites it. Consider removing this redundant mock or clarifying the intended precedence.
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib"))

ashiqueps and others added 2 commits October 27, 2025 16:10
Signed-off-by: Ashique Saidalavi <Ashique.saidalavi@progress.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings October 27, 2025 12: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

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings October 27, 2025 12:27
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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

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

Signed-off-by: Ashique Saidalavi <Ashique.saidalavi@progress.com>
Signed-off-by: Ashique Saidalavi <Ashique.saidalavi@progress.com>
Signed-off-by: Ashique Saidalavi <Ashique.saidalavi@progress.com>
Signed-off-by: Ashique Saidalavi <Ashique.saidalavi@progress.com>
Copilot AI review requested due to automatic review settings October 27, 2025 13:01
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

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

Signed-off-by: Ashique Saidalavi <Ashique.saidalavi@progress.com>
Signed-off-by: Ashique Saidalavi <Ashique.saidalavi@progress.com>
Copilot AI review requested due to automatic review settings November 11, 2025 20:45
@sonarqube-for-infrastructure-prod

Quality Gate failed Quality Gate failed

Failed conditions
5 New issues
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE SonarQube for IDE

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

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


def common_arm_rescue_block(error)
if error.class == MsRestAzure::AzureOperationError && error.body
if (error.is_a?(MsRestAzure2::AzureOperationError) || error.is_a?(MsRestAzure2::AzureOperationError)) && error.body
Copy link

Copilot AI Nov 11, 2025

Choose a reason for hiding this comment

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

The conditional check is redundant - both sides of the OR operator check for the same class MsRestAzure2::AzureOperationError. The second check should likely verify a different exception type (possibly the original MsRestAzure::AzureOperationError for backward compatibility) or this should be simplified to a single check.

Suggested change
if (error.is_a?(MsRestAzure2::AzureOperationError) || error.is_a?(MsRestAzure2::AzureOperationError)) && error.body
if (error.is_a?(MsRestAzure2::AzureOperationError) || error.is_a?(MsRestAzure::AzureOperationError)) && error.body

Copilot uses AI. Check for mistakes.
✅ Jira Field: [Verify customfield_11170 = 'Yes']

📋 All compliance requirements satisfied? [Yes/No]
If No, identify and fix missing items before completing."
Copy link

Copilot AI Nov 11, 2025

Choose a reason for hiding this comment

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

[nitpick] Corrected capitalization: 'If No' should be 'If no' for consistency with standard sentence formatting.

Suggested change
If No, identify and fix missing items before completing."
If no, identify and fix missing items before completing."

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted Work completed with AI assistance following Progress AI policies Platform: Azure Type: Enhancement Adds new functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments