To derive the original email from that, the code blindly splits on "+C" and panics if that doesn't work, which happened for our acceptance test.
So I changed our test mail address from test+py@mycompany.io to test+${customerid}@mycompany.io.
Now we get further, but this results in an unexpected change: the Terraform provider extracts +${customerid} from the given email and saves it as test@mycompany.io, different from the original email address. This results in an unexpected update due to changed email. But I cannot give the mail as test@mycompany.io in the first place, because then the string-splitting code panics.
I think email and user id were mixed up in this change. The actual email cannot be expected to have "+customerid" in it.
Reproduction steps
Create a new Wavefront user with email test@something.com
Reading this user will panic at resource_user.go line 99
Create a user with email test+customer@something.com
Creation will succeed bit email will be read back as test@something.com
Describe the bug
This recent change assumes that an ID for user foo@bar.com, of customer C, looks like foo+C@bar.com.
To derive the original email from that, the code blindly splits on "+C" and panics if that doesn't work, which happened for our acceptance test.
So I changed our test mail address from
test+py@mycompany.io
totest+${customerid}@mycompany.io
.Now we get further, but this results in an unexpected change: the Terraform provider extracts
+${customerid}
from the given email and saves it as test@mycompany.io, different from the original email address. This results in an unexpected update due to changed email. But I cannot give the mail as test@mycompany.io in the first place, because then the string-splitting code panics.I think email and user id were mixed up in this change. The actual email cannot be expected to have "+customerid" in it.
Reproduction steps
Expected behavior
Email and user id should be separate concepts.
Additional context
No response