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: alert rule and tests association #167

Closed

Conversation

brumarqu-te
Copy link
Contributor

@brumarqu-te brumarqu-te commented May 9, 2024

fixes #158

Changes the alert rule test_ids schema attribute to be computed so that it is not considered in the TF plan.
Also, since the alert rule returns a field tests when getting by id and receives a field testIds when updating the alert rule, had to implement a map from the GenericTest to get only the testId.

One drawback of this approach (not a huge one IMO) is that the state may not always be accurate. This is because a test <-> alert rules association can be changed from the test perspective and not get reflected on the alert rule perspective. Anyways, it will eventually update the state when the next alert rule update is performed.

The compilation and test failure is because the following PR needs to be merged and released and then updated the version here: thousandeyes/thousandeyes-sdk-go#122

@brumarqu-te brumarqu-te force-pushed the fix_alert_rule_tests branch from 94da99b to b566f8d Compare May 10, 2024 08:01
@brumarqu-te brumarqu-te marked this pull request as ready for review May 10, 2024 08:05
@brumarqu-te
Copy link
Contributor Author

closing in favour of #168

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant