Conversation
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for HashiCorp Nomad as a new provider for Sablier, enabling dynamic scaling of Nomad job task groups from 0 to N allocations on demand.
Key changes:
- Implements the Nomad provider with full support for job lifecycle management (start, stop, inspect, list, groups)
- Adds event stream monitoring for real-time allocation status updates
- Includes comprehensive test coverage using testcontainers
Reviewed Changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/sabliercmd/provider.go | Adds Nomad provider initialization and configuration setup |
| pkg/provider/nomad/*.go | Core provider implementation including job operations and event handling |
| pkg/provider/nomad/*_test.go | Comprehensive test suite with testcontainers integration |
| pkg/config/provider.go | Adds Nomad configuration structure with ACL, namespace, and region support |
| go.mod/go.sum | Adds Nomad API and related dependencies |
| docs/providers/nomad.md | Complete documentation for Nomad provider usage |
| README.md | Updates provider list to include Nomad |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| // Determine status | ||
| if desiredCount == 0 { | ||
| return sablier.NotReadyInstanceState(instanceName, runningCount, p.desiredReplicas), nil |
There was a problem hiding this comment.
When desiredCount is 0, the third parameter should be desiredCount instead of p.desiredReplicas to maintain consistency with line 92 and properly reflect the actual desired state. The DesiredReplicas field in InstanceInfo should represent the target count from the job spec (which is 0), not the provider's default desired replicas (which is 1).
| return sablier.NotReadyInstanceState(instanceName, runningCount, p.desiredReplicas), nil | |
| return sablier.NotReadyInstanceState(instanceName, runningCount, desiredCount), nil |
❌ 12 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
❌ 12 Tests Failed:
View the top 3 failed tests by shortest run time
📣 Thoughts on this report? Let Codecov know! | Powered by Codecov |
|


Closes #217