Skip to content

feat: Add validate-config command#17530

Merged
kodiakhq[bot] merged 18 commits intomainfrom
cli-no-init
Apr 5, 2024
Merged

feat: Add validate-config command#17530
kodiakhq[bot] merged 18 commits intomainfrom
cli-no-init

Conversation

@bbernays
Copy link
Copy Markdown
Collaborator

@bbernays bbernays commented Apr 4, 2024

Summary

This PR adds a strict validate-config command that ensures that all specified configs match with the plugin JSON Spec. This validation is more strict than what we require during a sync but if a config passes this validation it will pass the validation at sync time

@cq-bot cq-bot added the area/cli label Apr 4, 2024
Comment thread cli/cmd/specs.go Outdated
@bbernays bbernays changed the title validate-only-no-init feat: Add validate-config command Apr 5, 2024
@bbernays bbernays marked this pull request as ready for review April 5, 2024 13:06
@bbernays bbernays requested review from a team and candiduslynx and removed request for a team April 5, 2024 13:06
Comment thread cli/cmd/test_connection.go Outdated
Comment thread website/pages/docs/reference/cli/cloudquery_validate-config.md
Comment thread cli/cmd/validate_config.go Outdated
Comment thread cli/cmd/validate_config.go Outdated
Comment thread cli/cmd/validate_config_test.go Outdated
name: aws
path: cloudquery/aws
registry: cloudquery
version: "v25.5.0"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Our CLI tests are unauthenticated so using this version might not work

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I am seeing other weird issues as well even locally

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

38c85d8 should fix it and uses cloudflare as it's faster to download

@erezrokah
Copy link
Copy Markdown
Member

I would also point us that this won't validate the tables configuration is valid. For that we would need to init the plugin and call the Tables gRPC method

@bbernays
Copy link
Copy Markdown
Collaborator Author

bbernays commented Apr 5, 2024

I would also point us that this won't validate the tables configuration is valid. For that we would need to init the plugin and call the Tables gRPC method

Added that caveat to the description

@bbernays bbernays added the automerge Automatically merge once required checks pass label Apr 5, 2024
@kodiakhq kodiakhq bot merged commit 959c5f7 into main Apr 5, 2024
@kodiakhq kodiakhq bot deleted the cli-no-init branch April 5, 2024 15:23
kodiakhq bot pushed a commit that referenced this pull request Apr 5, 2024
🤖 I have created a release *beep* *boop*
---


## [5.14.0](cli-v5.13.1...cli-v5.14.0) (2024-04-05)


### Features

* Add `validate-config` command ([#17530](#17530)) ([959c5f7](959c5f7))
* Expose `test-connection` command in docs ([#17308](#17308)) ([709a4c9](709a4c9))


### Bug Fixes

* **deps:** Update module github.com/cloudquery/plugin-pb-go to v1.19.8 ([#17482](#17482)) ([b37d109](b37d109))
* **deps:** Update module github.com/cloudquery/plugin-sdk/v4 to v4.36.4 ([#17485](#17485)) ([f370de4](f370de4))
* **deps:** Update module github.com/cloudquery/plugin-sdk/v4 to v4.36.5 ([#17526](#17526)) ([554c499](554c499))
* **deps:** Update module github.com/cloudquery/plugin-sdk/v4 to v4.37.0 ([#17532](#17532)) ([8080970](8080970))

---
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

Labels

area/cli area/website automerge Automatically merge once required checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants