Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Support backward compatability #141

Merged
merged 4 commits into from
Dec 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v0.6.0-rc1] - 2021-12-29
## [v0.6.0] - 2021-12-31

### :gear: Changed
* **Breaking Change**: changed column attribute `IgnoreInTests` to `IgnoreInTests` API [#138](https://github.com/cloudquery/cq-provider-sdk/pull/137)
* **Breaking Change**: changed `TestResource` API [#137](https://github.com/cloudquery/cq-provider-sdk/pull/137)

### :rocket: Added
* Added `SkipEmptyColumn` and `SkipEmptyRows` to `ResourceTestCase`
* If test fail it will print what are the missing columns as well.

## [v0.6.0-beta] - 2021-12-29
### :gear: Changed
* **Breaking Change**: changed `TestResource` API [#137](https://github.com/cloudquery/cq-provider-sdk/pull/137)
* Added attribute `IgnoreInTests` to column API [#138](https://github.com/cloudquery/cq-provider-sdk/pull/137)
* `ConfigureProvider` now supports standard `hcl` byte streamq

## [v0.5.7]- 2021-12-20

Expand Down
8 changes: 6 additions & 2 deletions provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,12 @@ func (p *Provider) ConfigureProvider(_ context.Context, request *cqproto.Configu
if len(request.Config) == 0 {
p.Logger.Info("Received empty configuration, using only defaults")
} else if err := hclsimple.Decode("config.hcl", request.Config, nil, providerConfig); err != nil {
p.Logger.Error("Failed to load configuration.", "error", err)
return &cqproto.ConfigureProviderResponse{}, err
p.Logger.Warn("Failed to read config as hcl, will try as json", "error", err)
// this part will be deprecated.
if err := hclsimple.Decode("config.json", request.Config, nil, providerConfig); err != nil {
p.Logger.Error("Failed to load configuration.", "error", err)
return &cqproto.ConfigureProviderResponse{}, err
}
}

client, err := p.Configure(p.Logger, providerConfig)
Expand Down