mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(cli): handle version mismatch re MatchedProvisioners response (#15682)
* Modifies `MatchedProvisioners` response of `codersdk.TemplateVersion` to be a pointer * CLI now checks for absence of `*MatchedProvisioners` before showing warning regarding provisioners * Extracts logic for warning about provisioners to a function * Improves test coverage for CLI template push with `coder_workspace_tags`.
This commit is contained in:
@@ -53,6 +53,7 @@ type ProvisionerDaemon struct {
|
||||
|
||||
// MatchedProvisioners represents the number of provisioner daemons
|
||||
// available to take a job at a specific point in time.
|
||||
// Introduced in Coder version 2.18.0.
|
||||
type MatchedProvisioners struct {
|
||||
// Count is the number of provisioner daemons that matched the given
|
||||
// tags. If the count is 0, it means no provisioner daemons matched the
|
||||
|
||||
@@ -32,7 +32,7 @@ type TemplateVersion struct {
|
||||
Archived bool `json:"archived"`
|
||||
|
||||
Warnings []TemplateVersionWarning `json:"warnings,omitempty" enums:"DEPRECATED_PARAMETERS"`
|
||||
MatchedProvisioners MatchedProvisioners `json:"matched_provisioners,omitempty"`
|
||||
MatchedProvisioners *MatchedProvisioners `json:"matched_provisioners,omitempty"`
|
||||
}
|
||||
|
||||
type TemplateVersionExternalAuth struct {
|
||||
|
||||
Reference in New Issue
Block a user