Skip to content

Conversation

@hermanschaaf
Copy link
Member

@hermanschaaf hermanschaaf commented Nov 7, 2022

This updates (and replaces) this earlier PR for making path a required config parameter: #265

We have received numerous user reports of the distinction between name and path being confusing, so rather than infer path from name in some circumstances (and not in some others), this change makes things consistent by always requiring both. I've also added a small hint for users running into this error when upgrading from earlier versions.

We will not consider this a breaking SDK change, as it doesn't change any protocols, but it will be a breaking CLI change.

// give a small hint to help users transition from the old config format that didn't require path
officialPlugins := []string{"aws", "azure", "gcp", "digitalocean", "github", "heroku", "k8s", "okta", "terraform", "cloudflare"}
if funk.ContainsString(officialPlugins, s.Name) {
msg += fmt.Sprintf(". Hint: try setting path to cloudquery/%s in your config", s.Name)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

giphy

if funk.ContainsString(officialPlugins, s.Name) {
msg += fmt.Sprintf(". Hint: try setting path to cloudquery/%s in your config", s.Name)
}
return fmt.Errorf(msg)
Copy link
Member

@disq disq Nov 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be errors.New because if msg contains % it will fail weirdly (but understandably)

@kodiakhq kodiakhq bot merged commit 77fdaf8 into main Nov 8, 2022
@kodiakhq kodiakhq bot deleted the make-path-required branch November 8, 2022 08:53
kodiakhq bot pushed a commit that referenced this pull request Nov 8, 2022
🤖 I have created a release *beep* *boop*
---


## [1.0.4](v1.0.3...v1.0.4) (2022-11-08)


### Bug Fixes

* Make path a required config parameter ([#368](#368)) ([77fdaf8](77fdaf8))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Detach GitHub path generation from name of the plugin

5 participants