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

feat(secure-rule, secure-policy) use status code to determine if resource needs to be recreated #409

Merged
merged 3 commits into from
Sep 8, 2023

Conversation

kmvachhani
Copy link
Contributor

@kmvachhani kmvachhani commented Sep 8, 2023

We should differentiate between 404 errors and all other errors when trying to get a rule from the backend. If the response is non 404, we should not try to re-create the resource, as it might already exist.

@kmvachhani kmvachhani changed the title use status code to determine if resource needs to be recreated feat(secure-rule) use status code to determine if resource needs to be recreated Sep 8, 2023
Copy link
Contributor

@ombellare ombellare left a comment

Choose a reason for hiding this comment

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

Would the same be required for when a GetPolicyByID returns a 404?

@kmvachhani
Copy link
Contributor Author

Would the same be required for when a GetPolicyByID returns a 404?

yup I talked to @ben-m-lucas about this, going to add this in for policies too

Copy link
Contributor

@ombellare ombellare left a comment

Choose a reason for hiding this comment

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

LGTM

@kmvachhani kmvachhani changed the title feat(secure-rule) use status code to determine if resource needs to be recreated feat(secure-rule, secure-policy) use status code to determine if resource needs to be recreated Sep 8, 2023
@kmvachhani kmvachhani merged commit 000b507 into master Sep 8, 2023
23 checks passed
@kmvachhani kmvachhani deleted the feat/detection-policies-handle-non-404-errors branch September 8, 2023 18:58
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