Closed VenelinMartinov closed 3 hours ago
Attention: Patch coverage is 63.63636%
with 48 lines
in your changes missing coverage. Please review.
Project coverage is 60.62%. Comparing base (
0b6ff1b
) to head (906529a
). Report is 5 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
My only concern here is migrations
I'm not sure I understand what you mean here - do you mean moving from previous bridge to this one?
I updated the code here to guard the change behind a provider flag, LMK what you think.
As for rollout we can do a light version of the PRC plan:
I updated the code here to guard the change behind a provider flag, LMK what you think.
As for rollout we can do a light version of the PRC plan:
- Cloudflare + GCP
- AWS
- Everything else
The rollout plan sounds good, I'm assuming ~2 weeks per stage. As part of merging, please create an issue for each stage of the plan in this repo to track the rollout of the feature and the removal of the flag post-rollout.
Opened https://github.com/pulumi/pulumi-terraform-bridge/issues/2133 for the rollout
fixes https://github.com/pulumi/pulumi-terraform-bridge/issues/2039
The bridge assumes that a missing
schema_version
in the meta state means "current version". That is wrong as we only miss theschema_version
if it is 0 - we write all non-zero versions to the state.Any resources created under a v0 TF schema version will not save the the v0 in the state. This means that if this resource then gets a TF state upgrade, we will assume we are already on the new version and NOT run the state upgrade as we should.
This PR changes the assumption to mean missing
schema_version
means "v0". Note thatTestUpgradeInputsStringBasicNonZeroVersionSame
passed before, which shows that any existing resources which had state upgrades defined should have the correct state version in their meta property.It also adds tests around this both for PRC and non-PRC.
The feature is flagged behind a provider flag, supplied in
ProviderInfo
- the feature flag mechanism is adapted from the sdkv2 feature flag mechanism.