From dfb2a384abb2c9e58f4d5e09a7cf7e8d7c6c012e Mon Sep 17 00:00:00 2001 From: Mahima Singh Date: Thu, 19 Mar 2026 11:43:34 +0530 Subject: [PATCH 1/5] (P4DEVOPS-9434) Wire RateLimiter middleware into API Rack stack --- lib/vmpooler/api.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/vmpooler/api.rb b/lib/vmpooler/api.rb index 3b0d9de..7c81fcf 100644 --- a/lib/vmpooler/api.rb +++ b/lib/vmpooler/api.rb @@ -3,7 +3,7 @@ module Vmpooler class API < Sinatra::Base # Load API components - %w[helpers dashboard v3 request_logger healthcheck].each do |lib| + %w[helpers dashboard v3 request_logger healthcheck rate_limiter].each do |lib| require "vmpooler/api/#{lib}" end # Load dashboard components @@ -50,6 +50,11 @@ module Vmpooler # Enable API request logging only if required use Vmpooler::API::RequestLogger, logger: logger if config[:config]['request_logger'] + # Enable rate limiting if configured + if config[:config]['rate_limiting_enabled'] + use Vmpooler::API::RateLimiter, redis, config + end + use Vmpooler::Dashboard use Vmpooler::API::Dashboard use Vmpooler::API::V3 From bbd299a4a511ae6c819776282a9636bc144f57cb Mon Sep 17 00:00:00 2001 From: Mahima Singh Date: Thu, 19 Mar 2026 11:48:31 +0530 Subject: [PATCH 2/5] (maint) Fix rubocop: use modifier if form for rate limiter --- lib/vmpooler/api.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/vmpooler/api.rb b/lib/vmpooler/api.rb index 7c81fcf..7f3236f 100644 --- a/lib/vmpooler/api.rb +++ b/lib/vmpooler/api.rb @@ -51,9 +51,7 @@ module Vmpooler use Vmpooler::API::RequestLogger, logger: logger if config[:config]['request_logger'] # Enable rate limiting if configured - if config[:config]['rate_limiting_enabled'] - use Vmpooler::API::RateLimiter, redis, config - end + use Vmpooler::API::RateLimiter, redis, config if config[:config]['rate_limiting_enabled'] use Vmpooler::Dashboard use Vmpooler::API::Dashboard From b6c9e15b0005f61412fd6556cec1d7d03df261c1 Mon Sep 17 00:00:00 2001 From: Mahima Singh Date: Thu, 19 Mar 2026 11:46:30 +0530 Subject: [PATCH 3/5] (maint) Release prep for 3.9.1 --- CHANGELOG.md | 8 ++++++++ Gemfile.lock | 2 +- lib/vmpooler/version.rb | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9fcdf4..6383ab6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [3.9.1](https://github.com/puppetlabs/vmpooler/tree/3.9.1) (2026-03-19) + +[Full Changelog](https://github.com/puppetlabs/vmpooler/compare/3.9.0...3.9.1) + +**Fixed bugs:** + +- \(P4DEVOPS-9434\) Wire RateLimiter middleware into API Rack stack [\#696](https://github.com/puppetlabs/vmpooler/pull/696) ([smahima27](https://github.com/smahima27)) + ## [3.9.0](https://github.com/puppetlabs/vmpooler/tree/3.9.0) (2026-03-17) [Full Changelog](https://github.com/puppetlabs/vmpooler/compare/3.8.1...3.9.0) diff --git a/Gemfile.lock b/Gemfile.lock index 78533a2..902e95f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - vmpooler (3.9.0) + vmpooler (3.9.1) concurrent-ruby (~> 1.1) connection_pool (~> 2.4) deep_merge (~> 1.2) diff --git a/lib/vmpooler/version.rb b/lib/vmpooler/version.rb index 32c6b36..837a47b 100644 --- a/lib/vmpooler/version.rb +++ b/lib/vmpooler/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Vmpooler - VERSION = '3.9.0' + VERSION = '3.9.1' end From e67057962b14bb800906b7241228feaa61d9cb7f Mon Sep 17 00:00:00 2001 From: Mahima Singh Date: Thu, 19 Mar 2026 11:56:23 +0530 Subject: [PATCH 4/5] (maint) Update CHANGELOG section to match generator output --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6383ab6..3b919e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ [Full Changelog](https://github.com/puppetlabs/vmpooler/compare/3.9.0...3.9.1) -**Fixed bugs:** +**Merged pull requests:** - \(P4DEVOPS-9434\) Wire RateLimiter middleware into API Rack stack [\#696](https://github.com/puppetlabs/vmpooler/pull/696) ([smahima27](https://github.com/smahima27)) From 7157f9237e41e095b293360c677756d2184b1e08 Mon Sep 17 00:00:00 2001 From: Mahima Singh Date: Thu, 19 Mar 2026 12:07:27 +0530 Subject: [PATCH 5/5] (maint) Fix release-notes.md for 3.9.1 and auto-generate from CHANGELOG in workflow --- .github/workflows/release.yml | 7 +++++++ release-notes.md | 16 ++++------------ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d020d40..5767050 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,6 +29,13 @@ jobs: echo "version=$version" >> $GITHUB_OUTPUT echo "Found version $version from lib/vmpooler/version.rb" + - name: Generate Release Notes + run: | + version=$(grep VERSION lib/vmpooler/version.rb |rev |cut -d "'" -f2 |rev) + awk "/^## \[${version}\]/{found=1; next} found && /^## \[/{exit} found{print}" CHANGELOG.md > release-notes.md + echo "Generated release-notes.md for version ${version}:" + cat release-notes.md + - name: Tag Release uses: ncipollo/release-action@v1 with: diff --git a/release-notes.md b/release-notes.md index 7e9892e..14b79ff 100644 --- a/release-notes.md +++ b/release-notes.md @@ -1,15 +1,7 @@ -## [3.8.1](https://github.com/puppetlabs/vmpooler/tree/3.8.1) (2026-01-14) +## [3.9.1](https://github.com/puppetlabs/vmpooler/tree/3.9.1) (2026-03-19) -[Full Changelog](https://github.com/puppetlabs/vmpooler/compare/3.7.0...3.8.1) +[Full Changelog](https://github.com/puppetlabs/vmpooler/compare/3.9.0...3.9.1) -**Implemented enhancements:** +**Merged pull requests:** -- \(P4DEVOPS-9434\) Add rate limiting and input validation security enhancements [\#690](https://github.com/puppetlabs/vmpooler/pull/690) ([mahima-singh](https://github.com/mahima-singh)) -- \(P4DEVOPS-8570\) Add Phase 2 optimizations: status API caching and improved Redis pipelining [\#689](https://github.com/puppetlabs/vmpooler/pull/689) ([mahima-singh](https://github.com/mahima-singh)) -- \(P4DEVOPS-8567\) Add DLQ, auto-purge, and health checks for Redis queues [\#688](https://github.com/puppetlabs/vmpooler/pull/688) ([mahima-singh](https://github.com/mahima-singh)) -- Add retry logic for immediate clone failures [\#687](https://github.com/puppetlabs/vmpooler/pull/687) ([mahima-singh](https://github.com/mahima-singh)) - -**Fixed bugs:** - -- \(P4DEVOPS-8567\) Prevent VM allocation for already-deleted request-ids [\#688](https://github.com/puppetlabs/vmpooler/pull/688) ([mahima-singh](https://github.com/mahima-singh)) -- Prevent re-queueing requests already marked as failed [\#687](https://github.com/puppetlabs/vmpooler/pull/687) ([mahima-singh](https://github.com/mahima-singh)) +- \(P4DEVOPS-9434\) Wire RateLimiter middleware into API Rack stack [\#696](https://github.com/puppetlabs/vmpooler/pull/696) ([smahima27](https://github.com/smahima27))