Commit graph

1496 commits

Author SHA1 Message Date
Mahima Singh
0930c65f45 Fix nil provider crash when purging unconfigured EC2 resources
Add nil guard in purge_vms_and_resources: when a provider is listed in
config but not initialized in $providers, log and return early instead
of crashing with: undefined method provider_config for nil:NilClass
2026-03-23 12:47:18 +05:30
Mahima Singh
74059a1442
Merge pull request #698 from puppetlabs/fix-release-notes-workflow
Some checks failed
Security / Mend Scanning (push) Has been cancelled
(maint) Fix release-notes.md and auto-generate from CHANGELOG in release workflow
2026-03-19 12:10:59 +05:30
Mahima Singh
7157f9237e (maint) Fix release-notes.md for 3.9.1 and auto-generate from CHANGELOG in workflow 2026-03-19 12:07:27 +05:30
Mahima Singh
23eb5dc949
Merge pull request #697 from puppetlabs/release_prep_3-9-1
(maint) Release prep for 3.9.1
2026-03-19 12:00:39 +05:30
Mahima Singh
e67057962b (maint) Update CHANGELOG section to match generator output 2026-03-19 11:56:23 +05:30
Mahima Singh
b6c9e15b00 (maint) Release prep for 3.9.1 2026-03-19 11:54:15 +05:30
Mahima Singh
0f5ad7aafd
Merge pull request #696 from puppetlabs/fix-wire-rate-limiter-middleware
(P4DEVOPS-9434) Wire RateLimiter middleware into API Rack stack
2026-03-19 11:53:10 +05:30
Mahima Singh
bbd299a4a5 (maint) Fix rubocop: use modifier if form for rate limiter 2026-03-19 11:48:31 +05:30
Mahima Singh
dfb2a384ab (P4DEVOPS-9434) Wire RateLimiter middleware into API Rack stack 2026-03-19 11:43:34 +05:30
Mahima Singh
2d4eec1f85
Merge pull request #694 from puppetlabs/release_prep_3-9-0
Some checks failed
Security / Mend Scanning (push) Has been cancelled
Release prep for 3.9.0
2026-03-17 11:20:45 +05:30
Mahima Singh
91d2971024 Release prep for 3.9.0
- Bump version 3.8.1 -> 3.9.0
- Update CHANGELOG with circuit breaker / adaptive timeout (P4DEVOPS-9438)
- Update Gemfile.lock
2026-03-17 11:17:07 +05:30
Mahima Singh
21c261f0e1
Merge pull request #691 from puppetlabs/P4DEVOPS-9438-circuit-breaker
Some checks failed
Security / Mend Scanning (push) Has been cancelled
Implement circuit breaker pattern to prevent cascading failures
2026-03-09 15:23:15 +05:30
Mahima Singh
7449f23547 Add missing Prometheus metrics registration (vmpooler_performance, vmpooler_dlq, vmpooler_errors) 2026-03-09 15:21:32 +05:30
Mahima Singh
c9b0d7f258 Register circuit breaker metrics in Prometheus table 2026-03-09 15:21:32 +05:30
Mahima Singh
f52df9d3ce Fix RuboCop style violations in circuit_breaker.rb 2026-03-09 15:21:32 +05:30
Mahima Singh
1ca1fc5d47 Add circuit breaker and adaptive timeout for provider resilience 2026-03-09 15:21:32 +05:30
Mahima Singh
99056f7bf1
Merge pull request #693 from puppetlabs/release_prep_3-8-0
Some checks failed
Security / Mend Scanning (push) Has been cancelled
Added a action to generate release notes
2026-01-14 23:11:26 +05:30
Mahima Singh
a2c9fdd2df
Update release.yml 2026-01-14 23:10:14 +05:30
Mahima Singh
241eadf78b Added a action to generate release notes 2026-01-14 23:00:09 +05:30
Mahima Singh
98382e7fbc
Merge pull request #692 from puppetlabs/release_prep_3-8-0
Release 3.8.1
2026-01-14 22:54:47 +05:30
Mahima Singh
7c2fda643f Added gemfile.lock 2026-01-14 22:47:55 +05:30
Mahima Singh
d40af1b8f4 Release 3.8.1 2026-01-14 22:44:09 +05:30
Mahima Singh
76eb62577b
Merge pull request #690 from puppetlabs/P4DEVOPS-9434
Some checks failed
Security / Mend Scanning (push) Has been cancelled
Add rate limiting and input validation security enhancements
2025-12-26 15:44:39 +05:30
Mahima Singh
50efc5bddb
Merge pull request #689 from puppetlabs/P4DEVOPS-8570
Add performance instrumentation to key methods
2025-12-26 15:44:28 +05:30
Mahima Singh
7c9568466f
Merge branch 'main' into P4DEVOPS-8570 2025-12-26 15:31:29 +05:30
Mahima Singh
4656d8bd4a
Merge pull request #688 from puppetlabs/P4DEVOPS-8567
Add DLQ, auto-purge, and health checks for Redis queues
2025-12-26 15:30:15 +05:30
Mahima Singh
d0020becb3 Add rate limiting and input validation security enhancements 2025-12-24 17:43:36 +05:30
Mahima Singh
325a5c413c Revert status cache to use class variables with RuboCop exceptions
Class variables are needed here because:
- Cache must be shared across all Sinatra app instances
- Class instance variables don't work in Sinatra's dynamic instantiation model
- This is a valid use case for class variables despite RuboCop warning
2025-12-24 15:20:23 +05:30
Mahima Singh
a4abe2652a Fix RuboCop offenses 2025-12-24 15:06:22 +05:30
Mahima Singh
fe9f98e281 Fix test expectations for metrics in pool_manager_spec 2025-12-24 14:58:15 +05:30
Mahima Singh
46e77010f6 Prevent VM allocation for already-deleted request-ids 2025-12-24 14:11:30 +05:30
Mahima Singh
7b657edd0d Add Phase 2 optimizations: status API caching and improved Redis pipelining
- Add in-memory cache for /status endpoint with 30s TTL
- Cache keyed by view parameters to handle different query patterns
- Add cache clearing for tests to prevent interference
- Optimize get_queue_metrics to use single pipeline for all Redis calls
  - Previously made 7+ separate pipeline calls
  - Now combines all queue metrics into one pipeline (7n+2 operations)
  - Reduces Redis round trips and improves API response time
- Update unit tests to match new pipelining behavior
- All 866 tests passing
2025-12-24 13:55:24 +05:30
Mahima Singh
e5c0fa986e Add performance instrumentation to key methods
- Add timing metrics to check_pool loop for monitoring cycle duration
- Add performance metrics to purge methods (pending, ready, completed queues)
- Performance metrics track operation duration using vmpooler_performance gauge
- Add warning logs for operations exceeding 5 second threshold in check_pool
- All existing metrics (clone, destroy) already have timing instrumentation
- Tests passing: 866 examples, 0 failures
2025-12-24 13:43:36 +05:30
Mahima Singh
c24fe28d6d
Merge branch 'main' into P4DEVOPS-8567 2025-12-19 14:26:43 +05:30
Mahima Singh
1a6b08ab81
Merge pull request #687 from puppetlabs/retry_logic
Some checks failed
Security / Mend Scanning (push) Has been cancelled
Implement request cancellation handling to prevent unnecessary VM spi…
2025-12-19 14:23:55 +05:30
Mahima Singh
6d6e998bf4 Fix RuboCop style violations 2025-12-19 13:33:43 +05:30
Mahima Singh
a83916a0a4 Fix queue reliability test failures
- Add skip_metrics parameter to move_to_dlq to avoid double-counting when called from purge
- Fix purge_pending_queue to only increment count when not in dry-run mode
- Add nil check for config redis before accessing data_ttl
- Update health check tests to allow all gauge calls before checking specific metrics
- Reorder push_health_metrics to emit error/queue/task metrics before status

All 851 tests now pass including 40 queue reliability tests.
2025-12-19 13:29:34 +05:30
Mahima Singh
b3be210f99 Add DLQ, auto-purge, and health checks for Redis queues
- Implement dead-letter queue (DLQ) to capture failed VM operations
- Implement auto-purge to clean up stale queue entries
- Implement health checks to monitor queue health
- Add comprehensive tests and documentation

Features:
- DLQ captures failures from pending, clone, and ready queues
- Auto-purge removes stale VMs with configurable thresholds
- Health checks expose metrics for monitoring and alerting
- All features opt-in via configuration (backward compatible)
2025-12-19 13:17:02 +05:30
Mahima Singh
cd50c8ea65 Prevent re-queueing requests already marked as failed
- Check request status before re-queueing in clone_vm rescue block
- Only re-queue if status is not 'failed'
- Prevents infinite loop when permanent errors are detected
2025-12-19 12:18:14 +05:30
Mahima Singh
095b507a93 Add retry logic for immediate clone failures
- Check permanent_error? and retry count when clone fails immediately
- Cancel request if permanent error or max retries exceeded
- Re-queue request for retry if transient error and retries remaining
- Log retry decisions for debugging
2025-12-19 12:09:03 +05:30
Mahima Singh
0e8c3c66e9 Add debug logging to retry logic for troubleshooting 2025-12-18 22:35:06 +05:30
Mahima Singh
8372ea824f Fixed spec tests 2025-12-04 16:19:34 +05:30
Mahima Singh
9e75854ec4 Fixed robo issues 2025-12-04 16:12:23 +05:30
Mahima Singh
f290c6806e Implement request cancellation handling to prevent unnecessary VM spin-up 2025-12-04 16:05:07 +05:30
isaac-hammes
871c94ccff
Merge pull request #686 from puppetlabs/3.7.0-release
Some checks failed
Security / Mend Scanning (push) Has been cancelled
(maint) Release prep for 3.7.0 release again
2025-06-04 09:35:44 -07:00
isaac-hammes
86008d8ac7 (maint) Release prep for 3.7.0 release again 2025-06-04 09:30:47 -07:00
isaac-hammes
72a5b9c482
Merge pull request #685 from puppetlabs/P4DEVOPS-6096
(P4DEVOPS-6096) Fix gems to prevent warnings in logs
2025-06-04 09:20:44 -07:00
isaac-hammes
b2352b7578 (P4DEVOPS-6096) Fix gems to prevent warnings in logs 2025-06-04 09:17:38 -07:00
isaac-hammes
391f851d96
Merge pull request #683 from puppetlabs/fix_gems
Some checks failed
Security / Mend Scanning (push) Has been cancelled
(maint) Revert gems to last release
2025-05-22 08:49:42 -07:00
isaac-hammes
b7b1c6b1d3 (maint) Revert gems to last release 2025-05-22 08:34:48 -07:00