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

Optimize GitHub PR plan time #607

Closed smoy closed 1 year ago

smoy commented 1 year ago

What changed?

Rationale

Upon a pull request is open, automation consists of linting and actual planning. Both operation requires the usage of config object. Introduce optional parameters to pass in the config object to avoid additional loading time.

Skip flagging expired resources during plan and let either main branch apply or git apply to handle the resource expiration.

How was it tested?

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

Rely on existing test suite, manually open pull request against iambic-templates-itest to run the simulation GitHub action to watch the interaction.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 52.94% and project coverage change: -0.01% :warning:

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #607 +/- ## ========================================== - Coverage 82.97% 82.96% -0.01% ========================================== Files 105 105 Lines 12568 12575 +7 ========================================== + Hits 10428 10433 +5 - Misses 2140 2142 +2 ``` | [Flag](https://app.codecov.io/gh/noqdev/iambic/pull/607/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/607/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev) | `65.65% <11.76%> (-0.02%)` | :arrow_down: | | [functional_tests_config_discovery](https://app.codecov.io/gh/noqdev/iambic/pull/607/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev) | `45.81% <0.00%> (-0.03%)` | :arrow_down: | | [unit_tests](https://app.codecov.io/gh/noqdev/iambic/pull/607/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev) | `73.25% <52.94%> (-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/607?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev) | Coverage Δ | | |---|---|---| | [iambic/config/utils.py](https://app.codecov.io/gh/noqdev/iambic/pull/607?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev#diff-aWFtYmljL2NvbmZpZy91dGlscy5weQ==) | `84.90% <ø> (ø)` | | | [iambic/main.py](https://app.codecov.io/gh/noqdev/iambic/pull/607?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev#diff-aWFtYmljL21haW4ucHk=) | `49.05% <0.00%> (-0.47%)` | :arrow_down: | | [iambic/request\_handler/git\_plan.py](https://app.codecov.io/gh/noqdev/iambic/pull/607?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev#diff-aWFtYmljL3JlcXVlc3RfaGFuZGxlci9naXRfcGxhbi5weQ==) | `46.15% <50.00%> (+4.48%)` | :arrow_up: | | [iambic/request\_handler/git\_apply.py](https://app.codecov.io/gh/noqdev/iambic/pull/607?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev#diff-aWFtYmljL3JlcXVlc3RfaGFuZGxlci9naXRfYXBwbHkucHk=) | `66.10% <71.42%> (+0.03%)` | :arrow_up: | | [iambic/plugins/v0\_1\_0/github/github.py](https://app.codecov.io/gh/noqdev/iambic/pull/607?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=noqdev#diff-aWFtYmljL3BsdWdpbnMvdjBfMV8wL2dpdGh1Yi9naXRodWIucHk=) | `61.21% <100.00%> (+0.07%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/noqdev/iambic/pull/607/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.