File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import (
1111 "io"
1212 "net/http"
1313 "net/url"
14+ "strings"
1415 "time"
1516
1617 "github.com/elastic/elastic-package/internal/elasticsearch"
@@ -178,13 +179,13 @@ func (p *Project) getFleetHealth(ctx context.Context) error {
178179
179180func (p * Project ) CreateAgentPolicy (stackVersion string , kibanaClient * kibana.Client ) error {
180181 systemPackages , err := registry .Production .Revisions ("system" , registry.SearchOptions {
181- KibanaVersion : stackVersion ,
182+ KibanaVersion : strings . TrimSuffix ( stackVersion , kibana . SNAPSHOT_SUFFIX ) ,
182183 })
183184 if err != nil {
184- return fmt .Errorf ("could not get the system package version for kibana %v: %w" , stackVersion , err )
185+ return fmt .Errorf ("could not get the system package version for Kibana %v: %w" , stackVersion , err )
185186 }
186187 if len (systemPackages ) != 1 {
187- return fmt .Errorf ("unexpected number of system package versions - found %d expected 1" , len (systemPackages ))
188+ return fmt .Errorf ("unexpected number of system package versions for Kibana %s - found %d expected 1" , stackVersion , len (systemPackages ))
188189 }
189190 logger .Debugf ("Found %s package - version %s" , systemPackages [0 ].Name , systemPackages [0 ].Version )
190191
You can’t perform that action at this time.
0 commit comments