Skip to content

fix: Exit with 1 on policy error#412

Merged
roneli merged 1 commit intomainfrom
fix/exit_1_on_policy_internal_error
Jan 14, 2022
Merged

fix: Exit with 1 on policy error#412
roneli merged 1 commit intomainfrom
fix/exit_1_on_policy_internal_error

Conversation

@yevgenypats
Copy link
Copy Markdown
Contributor

@yevgenypats yevgenypats commented Jan 14, 2022

Remove confusing and unused flags:
stop-on-failure
fail-on-violations

Reasoning:

If there is an internal error such as incorrect version, missing tables, there is no reason really to not stop, so this just creates additional documentation and not-intuitive default behaviour (such as not returning 1 on internal error)

stop-on-failure - policies run very fast so I would eliminate that flag as well, just have a default behaviour that shows all the results.

Why I started it:

In the CI we always had to add special flags to detect errors and sometimes we missed errors because the CI didn't fail on internal errors.

Remove confusing and unused flags:
stop-on-failure
fail-on-violations
@yevgenypats yevgenypats requested a review from roneli January 14, 2022 15:30
Copy link
Copy Markdown
Contributor

@roneli roneli left a comment

Choose a reason for hiding this comment

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

LGTM

@roneli roneli merged commit a9d7847 into main Jan 14, 2022
@roneli roneli deleted the fix/exit_1_on_policy_internal_error branch January 14, 2022 15:58
TinLe pushed a commit to TinLe/cloudquery that referenced this pull request Jan 19, 2022
* upstream/main:
  chore: Synced local '.github/workflows/' with remote 'workflows/common' (cloudquery#421)
  fix: Don't show telemetry notice when it's not enabled (cloudquery#418)
  feat: Increase ulimit in unix environment (cloudquery#416)
  feat: Support build-schema for all providers in config (cloudquery#414)
  fix: Fetch summary fixes (cloudquery#417)
  feat: Added store fetch summary routine (cloudquery#356)
  chore: Synced file(s) with cloudquery/.github (cloudquery#415)
  feat: Expose max_parallel_resource_fetch_limit (cloudquery#413)
  feat: Adjust log messages when .cq dir is absent (cloudquery#411)
  fix: Adjust policy describe message (cloudquery#409)
  fix: Exit with 1 on policy error (cloudquery#412)
@cq-bot cq-bot mentioned this pull request Aug 9, 2022
erezrokah pushed a commit that referenced this pull request Aug 14, 2022
As requested in cloudquery/cq-provider-azure#406, this adds support for listing tenants under a subscription. 

It can be used by adding `subscriptions.tenant` to the cloudquery config, which will then populate a table named `azure_subscription_tenants`.

To add this, we had to start using the new `armsubscriptions` Azure SDK, which requires Go 1.18 and uses generics. The implementation for the subscriptions client has been switched to use this now. The benefit of this is that we also get new columns and relations on the `accounts` and `subscriptions` tables. 

Tables updated in this PR:
 - `azure_account_location_paired_region` (new)
 - `azure_account_locations` (new columns)
 - `azure_subscription_subscriptions` (new columns, notably `tenant_id` and `managed_by_tenants`)
 - `azure_subscription_tenants` (new)

Closes cloudquery/cq-provider-azure#406
erezrokah pushed a commit that referenced this pull request Aug 14, 2022
🤖 I have created a release *beep* *boop*
---


## [0.12.3](cloudquery/cq-provider-azure@v0.12.2...v0.12.3) (2022-08-07)


### Features

* Add support for Tenants ([#412](cloudquery/cq-provider-azure#412)) ([940af7f](cloudquery/cq-provider-azure@940af7f))


### Bug Fixes

* **deps:** Update module github.com/Azure/go-autorest/autorest to v0.11.28 ([#443](cloudquery/cq-provider-azure#443)) ([bc87594](cloudquery/cq-provider-azure@bc87594))
* **deps:** Update module github.com/cloudquery/cq-gen to v0.0.7 ([#453](cloudquery/cq-provider-azure#453)) ([361d908](cloudquery/cq-provider-azure@361d908))
* **deps:** Update module github.com/cloudquery/cq-gen to v0.0.8 ([#457](cloudquery/cq-provider-azure#457)) ([7d61851](cloudquery/cq-provider-azure@7d61851))
* **deps:** Update module github.com/hashicorp/go-hclog to v1.2.2 ([#444](cloudquery/cq-provider-azure#444)) ([6c769c9](cloudquery/cq-provider-azure@6c769c9))
* **deps:** Update tubone24/update_release digest to 2146f15 ([#389](cloudquery/cq-provider-azure#389)) ([e5682fd](cloudquery/cq-provider-azure@e5682fd))
* **docs:** Some minor docs fixes ([#454](cloudquery/cq-provider-azure#454)) ([6feb015](cloudquery/cq-provider-azure@6feb015))
* **tests:** Remove terraform for Azure ExpressRoute port ([#440](cloudquery/cq-provider-azure#440)) ([7413740](cloudquery/cq-provider-azure@7413740))

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants