Skip to content

fix: Init command cleanup#502

Merged
disq merged 4 commits into
cloudquery:mainfrom
disq:fix/init-command-cleanup
Feb 28, 2022
Merged

fix: Init command cleanup#502
disq merged 4 commits into
cloudquery:mainfrom
disq:fix/init-command-cleanup

Conversation

@disq
Copy link
Copy Markdown
Member

@disq disq commented Feb 23, 2022

  • Don't set source if default org
  • Include drift config only with AWS
  • Support cloudquery init provider@version
  • Add hint to use cloudquery init <provider> if config.hcl loading fails with fs.ErrNotExist

Don't set "source" if default org, include drift config only with AWS
@disq disq requested a review from yevgenypats February 23, 2022 13:34
@github-actions github-actions Bot added the fix label Feb 23, 2022
@github-actions github-actions Bot added fix and removed fix labels Feb 23, 2022
@disq disq requested a review from bbernays February 23, 2022 14:15
@github-actions github-actions Bot added fix and removed fix labels Feb 23, 2022
Comment thread pkg/plugin/registry/organization.go

// ParseProviderNameWithVersion parses the given string as "repository/provider@version" or "provider@version" (or @version omitted, defaulting to "latest")
func ParseProviderNameWithVersion(nameWithVersion string) (string, string, string, error) {
versionParts := strings.Split(nameWithVersion, "@")
Copy link
Copy Markdown
Collaborator

@bbernays bbernays Feb 23, 2022

Choose a reason for hiding this comment

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

I think we should be documenting what characters can be in a provider name, because this assumes that there is never an @ in a provider name

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Screen Shot 2022-02-23 at 17 35 15

Yes but a repo with @ in the name is not possible with github anyway...

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

For my own knowledge, do providers have to be on Github? I know that policies can be in many different locations

Copy link
Copy Markdown
Member Author

@disq disq Feb 23, 2022

Choose a reason for hiding this comment

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

Looks like they can be anywhere as long as they're indexed in our Firestore (registry/hub.go)

Copy link
Copy Markdown
Collaborator

@bbernays bbernays left a comment

Choose a reason for hiding this comment

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

lgtm

@disq disq merged commit a9ebc84 into cloudquery:main Feb 28, 2022
@disq disq deleted the fix/init-command-cleanup branch February 28, 2022 10:31
TinLe pushed a commit to TinLe/cloudquery that referenced this pull request Mar 22, 2022
* upstream/main: (21 commits)
  feat: Ignore ignored diags unless -v is specified (cloudquery#545)
  chore: Sync form .github (cloudquery#527)
  chore: Clean up db version checks (cloudquery#542)
  fix: Validate Timescale Version (cloudquery#540)
  feat: Support timeouts in fetch (cloudquery#537)
  fix: Warn on providers with no resources requested (cloudquery#528)
  fix: Fixed local policy run (cloudquery#535)
  fix: Make Date a static value (cloudquery#534)
  fix: Downgrade provider (cloudquery#531)
  feat: Store cq_fetch_id in meta (cloudquery#523)
  fix: Foreign Keys in Snapshots (cloudquery#525)
  feat: Add file() func to config parser (cloudquery#522)
  feat: Drift: Add @getbool modifier (cloudquery#515)
  fix: Diag: Don't report errors we don't care about (cloudquery#521)
  fix: Handle if Path doesn't exist (cloudquery#518)
  fix: Keep binary reference consistent (cloudquery#516)
  fix: Validate DB connection with an explicit timeout, rather than the… (cloudquery#510)
  fix: Missing views in history mode (cloudquery#508)
  fix: Init command cleanup (cloudquery#502)
  fix: Upgrade/downgrade providers cleanup (cloudquery#498)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants