Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: re-evaluate submodules when inputs change #187

Merged
merged 3 commits into from
Mar 22, 2024

Conversation

fwereade
Copy link
Contributor

@fwereade fwereade commented Mar 12, 2024

Addresses the failing test from #186

Uses a forked defsec with changes as seen here

To summarize that diff:

  • re-evaluates submodules when their inputs change
  • fixes object merge bug already handled upstream

There's a small performance hit from re-evaluating the modules but it's reasonably good at not re-evaling when nothing's changed, and I'm pretty confident in the approach. (The hit could probably be reduced by diffing current-submodule-inputs against merged-previous-inputs-and-outputs, instead of against previous-inputs.)

If/when the upstream bug is fixed, we would still likely be better served updating our dependency to point at https://github.com/aquasecurity/trivy/tree/main/pkg/iac instead of https://github.com/aquasecurity/defsec/tree/v0.93.1/pkg

@fwereade fwereade changed the title fix: better(?) submodule evaluation order fix: re-evaluate submodules when inputs change Mar 20, 2024
Copy link
Member

@ajkerrigan ajkerrigan left a comment

Choose a reason for hiding this comment

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

Thanks for working on this and sharing the discussion here 👍

@ajkerrigan ajkerrigan merged commit a0f7638 into cloud-custodian:main Mar 22, 2024
8 checks passed
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