Skip to content

Commit

Permalink
Merge pull request #375 from hmlanigan/fix-os-not-found
Browse files Browse the repository at this point in the history
Handle resolved charm origins without base.
  • Loading branch information
hmlanigan authored Jan 9, 2024
2 parents 3fe2910 + 5cac43d commit c6301d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/juju/applications.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,11 @@ func (c applicationsClient) CreateApplication(ctx context.Context, input *Create

// Of the resolvedURL.Series, resolvedOrigin.Series and resolvedOrigin.Base,
// the latter is the only trustworthy across all juju controllers supported.
// If we resolve a charm with a revision and no user specified operating
// system, none of the above will have values.
suggestedSeries, err := series.GetSeriesFromBase(resolvedOrigin.Base)
if err != nil {
return nil, err
c.Warnf("failed to get a suggested operating system from resolved charm response", map[string]interface{}{"err": err})
}

seriesToUse, err := c.seriesToUse(modelconfigAPIClient, userSuppliedSeries, suggestedSeries, set.NewStrings(supportedSeries...))
Expand Down

0 comments on commit c6301d1

Please sign in to comment.