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

CT project settings version mismatch #481

Closed
randalvs opened this issue Feb 23, 2024 · 2 comments
Closed

CT project settings version mismatch #481

randalvs opened this issue Feb 23, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@randalvs
Copy link

randalvs commented Feb 23, 2024

Hi,
We use the pulumi-commercetools provider which is a bridge to this Terraform provider.

One of the resources we provision are the project settings (Currency, Language, etc.). The provider checks to see if something needs to be updated in the project settings by comparing the state (in Pulumi) with the current state (in Commercetools). One of the properties stored in the state is the project settings version value.

There seem to be some background processes running internally at Commercetools that update the version number of the project settings. This was confirmed by Commercetools support. After this we encounter an issue because the state in Pulumi is out of sync with the current state in Commercetools. To be more precise the current version number of the project settings in Commercetools is higher than the version number stored in the state in Pulumi. As a consequence Pulumi provisioning fails.
Since the Pulumi provider is nothing more than a wrapper around the Terraform provider we wonder if this is also an issue when using Terraform.
Has anyone encountered this?
Any suggestions, work arounds (other then manually adapting the state in Pulumi 😊) ?

Thanks in advance.

@randalvs randalvs added bug Something isn't working triage Needs triage labels Feb 23, 2024
@demeyerthom demeyerthom removed the triage Needs triage label Mar 1, 2024
@demeyerthom
Copy link
Member

Hi @randalvs ! I have no experience with Pulumi, so I am unsure what it does under the hood here.

In our own terraform provider implementation we first refresh the state in memory which actually updates the version number to the current one also, so generally I would not expect version mismatches to occur there.

However if Pulumi just looks at the shape of the data without doing this refresh-before-change that might be what causes the issue. Commercetools versions can change in state, so any tool that uses these versions to update stuff needs to check what the latest version in Commercetools is, instead of using the latest version it has seen... I guess this is something that needs to be solved in that provider.

Not exactly a helpful response 😅

@randalvs
Copy link
Author

randalvs commented Mar 6, 2024

@demeyerthom, thanks for your reply.

I guess you're right and the way the terraform provider works differs from the way the Pulumi provider works. There is probably no refresh action in Pulumi. We're currently investigating the best way to solve this.
I will update this issue again once we have a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants