pulumi / pulumi-github

A Pulumi package to facilitate interacting with GitHub
Apache License 2.0
59 stars 10 forks source link

[PATCH]: BranchProtection State Migration #595

Open iwahbe opened 7 months ago

iwahbe commented 7 months ago

Issue describing the patch introduced in https://github.com/pulumi/pulumi-github/pull/594.

The patch covers from lossy deserialization of old state (https://github.com/pulumi/pulumi-terraform-bridge/issues/1667).

It is under test via TestRepros/586 and can be safely removed when TestRepros/586 doesn't panic without the patch.

SharpEdgeMarshall commented 5 months ago

Looks like the state migration is still broken: pulumi-github 6.2.0

+-github:index/branchProtection:BranchProtection: (replace)
            [id=<ID>]
            [urn=<RESOURCE-URN>]
            [provider=<PROVIDER_URN>]
          ~ allowsDeletions              : false => false
          ~ allowsForcePushes            : false => false
          ~ enforceAdmins                : false => false
          ~ lockBranch                   : false => false
          ~ pattern                      : "master" => "master"
          ~ repositoryId                 : "<REPO-ID>" => "<REPO-ID>"
          ~ requireConversationResolution: false => false
          ~ requireSignedCommits         : false => false
          ~ requiredLinearHistory        : false => false
          + restrictPushes               : [
          +     [0]: {
                  + blocksCreations: true
                }
            ]
ringods commented 3 months ago

@iwahbe We encounter this strange state migration in Pulumiverse too after upgrading from v5 to v6:

Screenshot 2024-06-12 at 11 51 38
iwahbe commented 3 months ago

Hmm. Can you file a new issue with a repro.