-
Notifications
You must be signed in to change notification settings - Fork 10
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
Updating just the Pulumi resource name ends up with us having no GitHub resources #744
Comments
Hi @xShteff - thank you for filing this issue and providing a repro. We're sorry you're encountering this issue and will take a look into it. |
No worries, let me know if there is more information needed from my side :) |
Hi @xShteff - so I looked into this via a repro, tried a few things, and unfortunately it turns out you're running into a long-standing issue on how the Pulumi engine understands and treats resource names. I'll try to summarize.
The good news here is that this is unlikely to happen to other resources in this provider. The upstream provider documents this courtesy import here and ours behaves the same. I will issue an update to the provider's API docs to this effect. Additionally, we do offer a workaround for renaming resources. By using the After creating the Label with the name
You can even remove the alias the next time you run I'm going to get that docs info up, and then close this issue as working as expected, but please feel free to re-open if you need. |
#744, while really an instance of pulumi/pulumi#918, happens in this particular way because this particular resource does a courtesy import/create for already existing (usually, github default) issue labels. The [upstream documentation](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/issue_label) to this effect was elided via docsgen. This pull request ensures that the information persists to our API docs. Closes #744.
This is also an issue for Action Variables and Secrets. |
The biggest problem is that in the end the real label doesn't exist despite Pulumi believing it does, and there is no elegant way of continuing updating the stack unless we disable integrity checks. I'm not quite sure how it works with the current implementation of Would that be perhaps something worth considering? (Not sure if this is worth reopening the issue, hopefully we can continue the discussion 🙃 ) |
@mbogh could you please file another issue with a repro for those resources? The "regular" behavior that we'd usually see here is that the @xShteff -
Is there a reason that The best way for us to follow up here is to open a followup issue or re-open this one so that our triage automation can alert us. 😄 |
It could work, we use GH Actions to do all these deployments and we would basically have to re-run the workflows when things change. I guess that could work, I just hoped to not have to do that :)
Got it! Thanks :) |
This issue has been addressed in PR #746 and shipped in release v6.2.5. |
Describe what happened
We noticed that updating the Pulumi resource name for Issue Labels will trigger a replacement update, which is fine, what is not fine is the order the replacement happens.
Let's say we have a label called
myRedLabel
in Pulumi, which creates a label namedDanger
in GitHub. If we plan on renaming the Pulumi name todangerLabel
, it will create a label calledDanger
in GitHub, then it will delete themyRedLabel
Pulumi label, which ends up with theDanger
label being deleted in GitHub.The end result is me having a Pulumi stack with a
dangerLabel
object but no actualDanger
label in GitHub.We've tried using
deleteBeforeReplace: true
andreplaceOnChanges: ["*"]
as custom pulumi options but neither have managed to trigger the correct order that would end up with us having an actual Label on GitHub.I think the fix for this would be to trigger a proper Pulumi replacement, which would then allow us (or have it by default) to delete the item before it being replaced.
Sample program
Start with this:
run
pulumi up
Then change it to this:
run
pulumi up
Log output
Affected Resource(s)
I've only identified this with IssueLabels but chances are more would be affected.
Output of
pulumi about
I've redacted the Backend URL and project name (:
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: