-
Notifications
You must be signed in to change notification settings - Fork 881
fix: Improve Terraform agent<->resource association testing #2187
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
Conversation
3f63dce
to
5821ab5
Compare
There were a few bugs with multiple agent association this fixes, and it adds thorough tests using real Terraform state and plans.
b7eb9b5
to
b208e8e
Compare
Does this encompass the bugs discovered in #1884? |
b208e8e
to
88f08b7
Compare
@bpmct yup! |
88f08b7
to
4fa9a3b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go code lgtm, can't speak to the tf files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test cases are very epic
set -euo pipefail | ||
cd "$(dirname "${BASH_SOURCE[0]}")" | ||
|
||
for d in */; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate that you've included the script for this :)
This was regressed in #2187. There was bad testing around this before, and this should prevent a similiar situation from happening again!
This was regressed in #2187. There was bad testing around this before, and this should prevent a similiar situation from happening again!
This was regressed in #2187. There was bad testing around this before, and this should prevent a similiar situation from happening again!
This was regressed in #2187. There was bad testing around this before, and this should prevent a similiar situation from happening again!
An agent could be associated with multiple resources prior to this, which broke all workspace access (and doesn't make any sense). This adds tests based on Terraform output. The raw Terraform statefiles are pushed for fast testing, and can be iterated on by editing the Terraform and running
generate.sh
.This should improve test times and provide a much more stable solution for resource association!