noqdev / iambic

IAMbic is Version-Control for IAM. It centralizes and simplifies cloud access and permissions. It maintains an eventually consistent, human-readable, bi-directional representation of IAM in Git.
https://iambic.org
Apache License 2.0
281 stars 26 forks source link

EN-2348: add guards when schema generator fails #582

Closed JonathanLoscalzo closed 1 year ago

JonathanLoscalzo commented 1 year ago

What changed?

Rationale

We need testing to check the schema generator for IAMbic's docs. In some cases, some models have issues to be generated because of circular dependencies or forward_refs not loaded (pydantic).

How was it tested?

If it was manually verified, list the instructions for your reviewers to follow.

JonathanLoscalzo commented 1 year ago

@castrapel, test for AWSConfig is not working, so is just the only model that doesn't work. Let me know if you want to comment it out or what action we should take.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 41.17% and project coverage change: -9.77% :warning:

Comparison is base (685d050) 83.81% compared to head (1646ea5) 74.04%. Report is 31 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #582 +/- ## ========================================== - Coverage 83.81% 74.04% -9.77% ========================================== Files 105 104 -1 Lines 12361 12381 +20 ========================================== - Hits 10360 9168 -1192 - Misses 2001 3213 +1212 ``` | [Flag](https://app.codecov.io/gh/noqdev/iambic/pull/582/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev) | Coverage Δ | | |---|---|---| | [functional_tests](https://app.codecov.io/gh/noqdev/iambic/pull/582/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev) | `?` | | | [functional_tests_config_discovery](https://app.codecov.io/gh/noqdev/iambic/pull/582/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev) | `?` | | | [unit_tests](https://app.codecov.io/gh/noqdev/iambic/pull/582/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev) | `74.04% <41.17%> (+0.06%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files Changed](https://app.codecov.io/gh/noqdev/iambic/pull/582?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev) | Coverage Δ | | |---|---|---| | [iambic/plugins/v0\_1\_0/aws/iam/group/models.py](https://app.codecov.io/gh/noqdev/iambic/pull/582?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev#diff-aWFtYmljL3BsdWdpbnMvdjBfMV8wL2F3cy9pYW0vZ3JvdXAvbW9kZWxzLnB5) | `37.68% <ø> (-47.11%)` | :arrow_down: | | [iambic/plugins/v0\_1\_0/aws/iam/role/models.py](https://app.codecov.io/gh/noqdev/iambic/pull/582?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev#diff-aWFtYmljL3BsdWdpbnMvdjBfMV8wL2F3cy9pYW0vcm9sZS9tb2RlbHMucHk=) | `50.49% <ø> (-43.07%)` | :arrow_down: | | [iambic/plugins/v0\_1\_0/aws/iam/user/models.py](https://app.codecov.io/gh/noqdev/iambic/pull/582?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev#diff-aWFtYmljL3BsdWdpbnMvdjBfMV8wL2F3cy9pYW0vdXNlci9tb2RlbHMucHk=) | `46.78% <ø> (-45.62%)` | :arrow_down: | | [...0\_1\_0/aws/identity\_center/permission\_set/models.py](https://app.codecov.io/gh/noqdev/iambic/pull/582?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev#diff-aWFtYmljL3BsdWdpbnMvdjBfMV8wL2F3cy9pZGVudGl0eV9jZW50ZXIvcGVybWlzc2lvbl9zZXQvbW9kZWxzLnB5) | `75.53% <ø> (-9.31%)` | :arrow_down: | | [...bic/plugins/v0\_1\_0/aws/organizations/scp/models.py](https://app.codecov.io/gh/noqdev/iambic/pull/582?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev#diff-aWFtYmljL3BsdWdpbnMvdjBfMV8wL2F3cy9vcmdhbml6YXRpb25zL3NjcC9tb2RlbHMucHk=) | `61.96% <12.50%> (-28.56%)` | :arrow_down: | | [iambic/plugins/v0\_1\_0/aws/models.py](https://app.codecov.io/gh/noqdev/iambic/pull/582?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev#diff-aWFtYmljL3BsdWdpbnMvdjBfMV8wL2F3cy9tb2RlbHMucHk=) | `58.06% <60.00%> (-30.09%)` | :arrow_down: | | [...mbic/plugins/v0\_1\_0/aws/organizations/scp/utils.py](https://app.codecov.io/gh/noqdev/iambic/pull/582?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev#diff-aWFtYmljL3BsdWdpbnMvdjBfMV8wL2F3cy9vcmdhbml6YXRpb25zL3NjcC91dGlscy5weQ==) | `95.91% <66.66%> (-2.55%)` | :arrow_down: | | [iambic/plugins/v0\_1\_0/aws/iam/policy/models.py](https://app.codecov.io/gh/noqdev/iambic/pull/582?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev#diff-aWFtYmljL3BsdWdpbnMvdjBfMV8wL2F3cy9pYW0vcG9saWN5L21vZGVscy5weQ==) | `65.35% <100.00%> (-27.56%)` | :arrow_down: | ... and [46 files with indirect coverage changes](https://app.codecov.io/gh/noqdev/iambic/pull/582/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.