[RPD-279] [BUG] Automatically deal with stale states #170
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This bug is recreated by allowing the state storage to be provisioned and stopping the program before reaching the AKS and other resources provisioning. This meant that the
matcha.state
file looks similar to:Which does not include
resource-group-name
hence when we try to access this value to check if the matcha state is stalewe get an error that the value does not exist.
Instead the
matcha.state
file needs to be:After the resource group and state storage is provisioned.
This bug can happen if there is something wrong with the
resources
Terraform and the Terraform init/apply fails causing matcha to halt halfway through provisioning.To fix this we add the resource group name to
matcha.state
file after provisioning the remote state rg and storage.Checklist
Please ensure you have done the following:
Type of change
Tick all those that apply: