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: parse custom run step output in policy_check #3502

Merged

Conversation

pseudomorph
Copy link
Contributor

@pseudomorph pseudomorph commented Jun 8, 2023

what

Changes in #3086 did not account for custom run steps being implemented in the policy_check workflow step. This addresses that.

Output from custom run steps is separated from the conftest output, and passed to the markdown renderer as separate fields.

why

Some Atlantis deployments have custom run steps in policy_check workflow. Currently this breaks policy parsing and results in an error.

tests

  • Added e2e test, which highlights example of parsing outputs from run steps before and after the policy_check step.
  • Had trouble developing a unit test; so, this is not included at the moment.

references

@pseudomorph pseudomorph marked this pull request as ready for review June 13, 2023 15:28
@pseudomorph pseudomorph requested a review from a team as a code owner June 13, 2023 15:28
@github-actions github-actions bot added the go Pull requests that update Go code label Jun 13, 2023
@pseudomorph pseudomorph force-pushed the fix_custom_run_output_policy_check branch from 48eb585 to b65b85b Compare June 13, 2023 15:44
@pseudomorph pseudomorph force-pushed the fix_custom_run_output_policy_check branch from b65b85b to d33561d Compare June 13, 2023 15:47
@pseudomorph
Copy link
Contributor Author

@nitrocode - How does this look? Seems to address the issues @Banders2 was seeing

Copy link
Contributor

@jamengual jamengual left a comment

Choose a reason for hiding this comment

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

LGTM

@jamengual
Copy link
Contributor

@GenPage

@GenPage GenPage merged commit 7545296 into runatlantis:main Jun 20, 2023
mtavaresmedeiros pushed a commit to mtavaresmedeiros/atlantis that referenced this pull request Jul 3, 2023
* parse custom run output in policy_check

* error if no conftest output

* e2e test

* Adding other policy template.

* update markdown renderer test
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
* parse custom run output in policy_check

* error if no conftest output

* e2e test

* Adding other policy template.

* update markdown renderer test
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
* parse custom run output in policy_check

* error if no conftest output

* e2e test

* Adding other policy template.

* update markdown renderer test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants