-
Notifications
You must be signed in to change notification settings - Fork 81
CHEF-15721: Add Ruby 3.4 support and prepare for habitat bundling #560
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
Open
ashiqueps
wants to merge
22
commits into
main
Choose a base branch
from
CHEF-15721
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
6f11569
CHEF-15721: Add Ruby 3.4 support and prepare for habitat bundling
ashiqueps a33cabe
Enhance copilot-instructions with critical compliance requirements
ashiqueps 9f34b18
Remove debug print statements from test file
ashiqueps 7db9798
Fix Chefstyle string literal violations
ashiqueps 9c27961
Removed the unwanted files
ashiqueps 96281f5
Using the forked gems
ashiqueps a08b629
Updated the windows image
ashiqueps 44654f4
Style issue fixes
ashiqueps 8d3fbf2
Fixed the specs
ashiqueps c74af9f
Fixed the style issues
ashiqueps b08fbb2
Fixed the specs with openssl failures
ashiqueps beef117
Fixed the specs for ruby 3.1
ashiqueps 03b1f84
Fixed the style issues
ashiqueps 512e841
Apply suggestion from @Copilot
ashiqueps 969d70c
Apply suggestion from @Copilot
ashiqueps 7f42391
Apply suggestion from @Copilot
ashiqueps 29968e5
Review comments
ashiqueps d77497d
Merge branch 'CHEF-15721' of github.com:chef/knife-azure into CHEF-15721
ashiqueps ee91e42
Updated the linux version and spec fixes
ashiqueps 57fc1f7
Fixed the additional specs
ashiqueps b8aac24
Moved the windows tests to its own file
ashiqueps f9d7173
Fixed the issue with faraday-cookie_jar gem
ashiqueps File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| #!/usr/bin/env powershell | ||
| # | ||
| # This script runs a passed in command, but first sets up the bundler caching on the repo | ||
| # for Windows environments with network resilience | ||
|
|
||
| # Set error handling | ||
| $ErrorActionPreference = "Stop" | ||
|
|
||
| # Set UTF-8 encoding for consistency | ||
| $env:LANG = "en_US.UTF-8" | ||
| $env:LC_ALL = "en_US.UTF-8" | ||
|
|
||
| Write-Host "--- Setting up bundle configuration for Windows" | ||
|
|
||
| # Configure bundler for local caching and network resilience | ||
| bundle config --local path vendor/bundle | ||
| bundle config set --local without docs debug | ||
| bundle config set --local retry 5 | ||
| bundle config set --local timeout 30 | ||
| bundle config set --local jobs 3 | ||
|
|
||
| Write-Host "--- bundle install with network resilience" | ||
|
|
||
| # Retry bundle install with exponential backoff for network issues | ||
| $maxAttempts = 3 | ||
| $attempt = 1 | ||
| $success = $false | ||
|
|
||
| while ($attempt -le $maxAttempts -and -not $success) { | ||
| try { | ||
| Write-Host "Bundle install attempt $attempt of $maxAttempts" | ||
| bundle install --retry=5 | ||
| $success = $true | ||
| Write-Host "Bundle install successful on attempt $attempt" | ||
| } | ||
| catch { | ||
| Write-Host "Bundle install failed on attempt $attempt`: $($_.Exception.Message)" | ||
| if ($attempt -lt $maxAttempts) { | ||
| $waitTime = [math]::Pow(2, $attempt) * 5 # Exponential backoff: 10s, 20s | ||
| Write-Host "Waiting $waitTime seconds before retry..." | ||
| Start-Sleep -Seconds $waitTime | ||
| } | ||
| $attempt++ | ||
| } | ||
| } | ||
|
|
||
| if (-not $success) { | ||
| Write-Host "Bundle install failed after $maxAttempts attempts" | ||
| exit 1 | ||
| } | ||
|
|
||
| Write-Host "+++ bundle exec task" | ||
|
|
||
| # Execute the passed command | ||
| $command = $args -join " " | ||
| if ($command) { | ||
| Invoke-Expression "bundle exec $command" | ||
| } else { | ||
| Write-Host "No command specified" | ||
| exit 1 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.