Commit graph

1476 commits

Author SHA1 Message Date
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
isaac-hammes
891a7da22d
Merge pull request #682 from puppetlabs/3.7.0-release
Some checks are pending
Security / Mend Scanning (push) Waiting to run
(maint) Release version 3.7.0
2025-05-21 04:48:56 -07:00
isaac-hammes
e305d38a9f (maint) Release version 3.7.0 2025-05-20 13:16:23 -07:00
isaac-hammes
05937d23e7
Merge pull request #681 from puppetlabs/P4DEVOPS-6096
Some checks failed
Security / Mend Scanning (push) Has been cancelled
(P4DEVOPS-6096) Include VMs that have been requested but not moved to pending when getting queue metrics
2025-05-09 05:44:07 -07:00
isaac-hammes
49adcfdbb6 (maint) Update jruby to version 9.4.12.1 2025-05-08 12:03:37 -07:00
isaac-hammes
f6af7cd2a6 (P4DEVOPS-6096) Include VMs that have been requested but not moved to pending when getting queue metrics 2025-05-08 11:45:31 -07:00
puppet-release-bot
713d2c9246
Merge pull request #675 from puppetlabs/dependabot/bundler/redis-5.2.0
Bump redis from 5.1.0 to 5.2.0
2024-04-22 00:33:56 -04:00
dependabot[bot]
24dad61341
Bump redis from 5.1.0 to 5.2.0
Bumps [redis](https://github.com/redis/redis-rb) from 5.1.0 to 5.2.0.
- [Changelog](https://github.com/redis/redis-rb/blob/master/CHANGELOG.md)
- [Commits](https://github.com/redis/redis-rb/compare/v5.1.0...v5.2.0)

---
updated-dependencies:
- dependency-name: redis
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-22 04:32:40 +00:00
puppet-release-bot
39ed8f7492
Merge pull request #673 from puppetlabs/dependabot/bundler/rake-13.2.1
Bump rake from 13.1.0 to 13.2.1
2024-04-08 00:37:20 -04:00
dependabot[bot]
147f2540c2
Bump rake from 13.1.0 to 13.2.1
Bumps [rake](https://github.com/ruby/rake) from 13.1.0 to 13.2.1.
- [Release notes](https://github.com/ruby/rake/releases)
- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc)
- [Commits](https://github.com/ruby/rake/compare/v13.1.0...v13.2.1)

---
updated-dependencies:
- dependency-name: rake
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-08 04:35:58 +00:00
puppet-release-bot
f0d36bea84
Merge pull request #672 from puppetlabs/dependabot/bundler/opentelemetry-sdk-1.4.1
Bump opentelemetry-sdk from 1.4.0 to 1.4.1
2024-04-01 00:20:34 -04:00
dependabot[bot]
a0bd1bc869
Bump opentelemetry-sdk from 1.4.0 to 1.4.1
Bumps [opentelemetry-sdk](https://github.com/open-telemetry/opentelemetry-ruby) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/open-telemetry/opentelemetry-ruby/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-ruby/blob/main/sdk/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-ruby/compare/opentelemetry-sdk/v1.4.0...opentelemetry-sdk/v1.4.1)

---
updated-dependencies:
- dependency-name: opentelemetry-sdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 04:19:10 +00:00
puppet-release-bot
5781275691
Merge pull request #665 from puppetlabs/dependabot/bundler/redis-5.1.0
Bump redis from 5.0.8 to 5.1.0
2024-03-25 00:17:53 -04:00
puppet-release-bot
4debfba154
Merge pull request #671 from puppetlabs/dependabot/bundler/rack-2.2.9
Bump rack from 2.2.8.1 to 2.2.9
2024-03-25 00:17:44 -04:00
dependabot[bot]
86e178d900
Bump rack from 2.2.8.1 to 2.2.9
Bumps [rack](https://github.com/rack/rack) from 2.2.8.1 to 2.2.9.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/v2.2.8.1...v2.2.9)

---
updated-dependencies:
- dependency-name: rack
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-25 04:16:21 +00:00
puppet-release-bot
3cbc2607fc
Merge pull request #668 from puppetlabs/dependabot/bundler/thor-1.3.1
Bump thor from 1.3.0 to 1.3.1
2024-03-03 23:04:50 -05:00
dependabot[bot]
7716e0c05a
Bump thor from 1.3.0 to 1.3.1
Bumps [thor](https://github.com/rails/thor) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/rails/thor/releases)
- [Commits](https://github.com/rails/thor/compare/v1.3.0...v1.3.1)

---
updated-dependencies:
- dependency-name: thor
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-04 04:03:34 +00:00
puppet-release-bot
2075fdf6c9
Merge pull request #666 from puppetlabs/dependabot/bundler/rack-2.2.8.1
Bump rack from 2.2.8 to 2.2.8.1
2024-02-25 23:27:38 -05:00
dependabot[bot]
2860b757c6
Bump rack from 2.2.8 to 2.2.8.1
Bumps [rack](https://github.com/rack/rack) from 2.2.8 to 2.2.8.1.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/v2.2.8...v2.2.8.1)

---
updated-dependencies:
- dependency-name: rack
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-26 04:26:22 +00:00
dependabot[bot]
4fd6007ea0
Bump redis from 5.0.8 to 5.1.0
Bumps [redis](https://github.com/redis/redis-rb) from 5.0.8 to 5.1.0.
- [Changelog](https://github.com/redis/redis-rb/blob/master/CHANGELOG.md)
- [Commits](https://github.com/redis/redis-rb/compare/v5.0.8...v5.1.0)

---
updated-dependencies:
- dependency-name: redis
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-12 04:46:56 +00:00
puppet-release-bot
2b087b86a7
Merge pull request #664 from puppetlabs/dependabot/bundler/rspec-3.13.0
Bump rspec from 3.12.0 to 3.13.0
2024-02-04 23:49:58 -05:00