-
Notifications
You must be signed in to change notification settings - Fork 62
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: retrocompatibility break when v0.16.3 was released #218
fix: retrocompatibility break when v0.16.3 was released #218
Conversation
@jdamata kindly review :) |
@david-ortiz-saez Can you add one or more unit tests to demonstrate that you have fixed the problem you have reported? |
Also there is no v0.62.3 :} |
hi @freeranger, thanks for pointing out these errors. I've fixed them. Regarding the unit tests, this method is already covered with tests. We have built the plugin and run the terraform plan that was failing and now it doesn't |
Since those tests pass with or without your change, that suggests that the use case is not covered by the tests - hence I am suggesting you add additional tests to cover this and demonstrate that the code works in all cases. |
Hi @freeranger! I've added a test case where we take the language from the sonarqube project itself, same as my changes are doing. Hope that helps |
hi @freeranger, @jdamata. After further reviewing it I've reached the conclusion that sadly we cannot create a test for this use case. This PR is fixing the provider to work with the already existing Since v0.16.3 each new So when we try to access idSlice[2] there is no problem. However, for those As this To test that this pr is working we have built the provider locally and use it inside our terraform code. |
WHAT
This is fixing ISSUE-216.
In v0.16.3 release this was changed.
As a consequence, when new
qualityprofile_project_associations
are created, it will provideidSlice[2]
with the language of the qualityProfile.However, for qualityProfileAssociations that were created using this module before that association, the
idSlice
lenght is only 2, beingidSlice[0]
the name andidSlice[1]
the key. As a consequence, when we try to upgrade from v0.16.2 to v0.16.3 we're getting an error:This Pr is fixing the issue, if idSlice[2] doesn't exist, it will use the Get method to populate the language