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

Fixed #602 Propagate errors if invalid user or group assignment #606

Closed smoy closed 1 year ago

smoy commented 1 year ago

What changed?

Rationale

How was it tested?

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

This is an example of the git workflow: https://github.com/noqdev/iambic-templates-itest/pull/327

[{"resource_id": "design", "resource_type": "aws:identity_center:permission_set", "template_path": "/var/folders/52/0fv0dv9s06dbps6g9td_bybh0000gn/T/lambdaxe_ku7dk/.iambic/repos/resources/aws/identity_center/permission_set/design.yaml", "proposed_changes": [], "exceptions_seen": [{"account": "iambic_test_org_account - (580605962305)", "resource_id": "design", "proposed_changes": [], "exceptions_seen": [{"change_type": "Unknown", "account": "iambic_test_org_account - (580605962305)", "resource_id": "design", "resource_type": "aws:identity_center:permission_set", "exceptions_seen": ["detected either unresolved_users: {'this_user_does_not_exist@example.com'} or unresolved_groups: set() Correct them in the template."]}]}]}]
codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 50.00% and project coverage change: -9.72% :warning:

Comparison is base (5dd22bc) 82.97% compared to head (df0598c) 73.26%. Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #606 +/- ## ========================================== - Coverage 82.97% 73.26% -9.72% ========================================== Files 105 105 Lines 12568 12573 +5 ========================================== - Hits 10428 9211 -1217 - Misses 2140 3362 +1222 ``` | [Flag](https://app.codecov.io/gh/noqdev/iambic/pull/606/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/606/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/606/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/606/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev) | `73.26% <50.00%> (-0.01%)` | :arrow_down: | 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/606?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev) | Coverage Δ | | |---|---|---| | [...0\_1\_0/aws/identity\_center/permission\_set/models.py](https://app.codecov.io/gh/noqdev/iambic/pull/606?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev#diff-aWFtYmljL3BsdWdpbnMvdjBfMV8wL2F3cy9pZGVudGl0eV9jZW50ZXIvcGVybWlzc2lvbl9zZXQvbW9kZWxzLnB5) | `75.45% <50.00%> (-9.47%)` | :arrow_down: | ... and [49 files with indirect coverage changes](https://app.codecov.io/gh/noqdev/iambic/pull/606/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.

smoy commented 1 year ago

I ran the one failed integration test locally and passed.

============================= test session starts ==============================
platform darwin -- Python 3.9.17, pytest-7.4.0, pluggy-1.2.0
rootdir: /Users/stevenmoy/noqdev/iambic
configfile: setup.cfg
plugins: mock-generator-1.2.0, Faker-19.1.0, cov-4.1.0, asyncio-0.21.1, rerunfailures-11.1.2, mock-3.11.1, xdist-3.3.1
asyncio: mode=strict
collected 1 item

functional_tests/aws/managed_policy/test_template_generation.py .        [100%]

- generated xml file: /var/folders/52/0fv0dv9s06dbps6g9td_bybh0000gn/T/tmp-58613MeBq8sfrFkJ9.xml -
========================= 1 passed in 82.05s (0:01:22) =========================