mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Bug Fix: Respect data source version when provisioning (#77428)
This commit is contained in:
committed by
GitHub
parent
b13395afbc
commit
82a7e1229a
@@ -80,7 +80,11 @@ func (dc *DatasourceProvisioner) provisionDataSources(ctx context.Context, cfg *
|
||||
updateCmd := createUpdateCommand(ds, dataSource.ID)
|
||||
dc.log.Debug("updating datasource from configuration", "name", updateCmd.Name, "uid", updateCmd.UID)
|
||||
if _, err := dc.store.UpdateDataSource(ctx, updateCmd); err != nil {
|
||||
return err
|
||||
if errors.Is(err, datasources.ErrDataSourceUpdatingOldVersion) {
|
||||
dc.log.Debug("ignoring old version of datasource", "name", updateCmd.Name, "uid", updateCmd.UID)
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user