Open t0yv0 opened 6 months ago
Can you describe the exact steps that produce this behavior? We upgrade against upstream/main on purpose, but any changes applied to the upgrade git branch (specifically to resources.go
) should not get clobbered.
Are you expecting that other branches should be the ones being upgraded against as well, e.g.
I'm just relaying the user confusion. This is not what the users expect it seems. I'd venture the expectation is that the tool takes the current worktree, possibly a dirty worktree where there are uncommitted changes, and performs an upgrade from there. When the upgrade fails, users expect to iterate on the configuration by editing resources.go and trying again. I think if the workflow above is how this needs to work and we do not want to change how the tool works, a little error messaging and guidance can go a long way, for example rejecting dirty worktree or responding with next steps to tfgen failures.
Even if we don't make any changes here it's good to have this filed up so we can direct users here for workarounds. Thanks a lot!
This makes sense - thank you!
What happened?
As user attempting to work with
upgrade-provider
CLI interactively, I expect to be able to edit code and checkout different branches of the project and re-runupgrade-provider
to try to perform an upgrade from the current state of the folder to some new desired state. This especially relevant when iterating on a failedupgrade-provider
run.However I am finding that the default settings wipe out any changes, and checkout
main
, including wiping out any local changes tomain
compared toorigin/main
.This interaction with
git fetch
should be under a flag I think and not the default behavior.Example
upgrade-provider version: 6c445682384d34091cdda3f616956d44d3254879
This invocation fails with go 1.17 issues in sdk/go.mod, however fixing that and trying again fails again which is highly confusing.
Another issue was reported about https://github.com/ovh/pulumi-ovh where tfgen was failing with token mapping issues, and the maintainer was trying to edit
resources.go
and retry upgrade-provider run. I've not verified this in depth but it could be stemming from the same issue of reverting tomain
.Output of
pulumi about
N/A
Additional context
N/A
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).