-
Notifications
You must be signed in to change notification settings - Fork 13
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
Upgrading provider version results in plan run time increase #271
Comments
@nbaju1 The If you have access to your state file/data, you will see the After upgrading your provider and run You can run What other resources are in your Terraform configuration? There were reports of slowness with |
On further inspection of the log output I see that
All of our policy resources has a similar error, but the 6 minutes time jump in the logs only happens after the license policy. When upgrading from Xray provider 2.8.0 to ~2.13 the expected type for to this Similar type changes happened for Reverting back to Xray provider 2.8.0, and changing our code accordingly for the policies reverted the plan run time back to ~30 seconds and the warning for the policy resources is not present in the logs. (I guess this issue should be migrated to the Xray provider repository) |
@nbaju1 Interesting. Can you try with Xray provider v2.11.0 and v2.11.1? I want to pin down when this performance issue first occurs. I have my suspicion but would like someone to confirm it 😄 |
@alexhung 2.11.0 works similar to 2.8.0. 2.11.1 introduces the new expected types mentioned above and results in the increase in run time. |
That's what I suspected. The change between 2.11.0 and 2.11.1 should be transparent to end users. The attribute types should be compatible between versions. Let me take a deeper look into this. |
@nbaju1 See my comment. If you have opinion on which approach works for you, please let me know. I suspect switching attribute type will help your use case. |
@alexhung, thanks for the update. I believe changing attribute type will work for us. Since we use the CDK, adding our own validation is relatively simple, so the loss of that functionality is not that important. |
Describe the bug
We recently did a refactor of our JFrog IAC where we also bumped the Artifactory provider version from 10.8.3 to ~12.3.0. The refactor was mostly renaming resources for better readability, no new resources were added.
After the version update the run time for
terraform plan
increased from ~30 seconds to ~8 minutes. Looking at the changes introduced in versions after 10.8.3, the addition ofUpgradeState
function forartifactory_user
is one of the suspects for the main source of the run time increase. Is the intention to execute this on eachterraform plan
run?We have ~1000 internal users (used for service accounts) and from the logs I see that an API call is made for each user which I don't see prior to the update.
As I would rather not be stuck on an outdated version of the provider, is there something we can do to avoid this long run time?
Requirements for and issue
curl
it at$host/artifactory/api/system/version
Terraform 1.9.8
Artifactory provider 12.3.0
Artifactory version: 7.100.2
Expected behavior
Hopefully not a 1500% increase in run time for
terraform plan
.The text was updated successfully, but these errors were encountered: