Add --force-push flag in rill deploy to force push changes for rill managed repos#9629
Conversation
|
@codex: review |
| return err | ||
| } | ||
| if exists { | ||
| if p.ManagedGitId == "" && p.ArchiveAssetId == "" && o.ForcePush { |
There was a problem hiding this comment.
well, Any specific reason for not allowing it for maanged repos ? If they are using a non-protected branch ideally we can do a force push, right ? If its a protected branch, it fails when doing the force push..
There was a problem hiding this comment.
For self hosted repos a user can still force their changes but it is done using MergeWithOursStrategy to avoid force push and let user recover changes. This was intentionally done sometime back :
rill/cli/pkg/cmdutil/helper.go
Lines 641 to 642 in 634efc7
For managed repos most users have their changes backed in other git providers so it is okay to do a force push for them if they choose to do so.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 058babcb27
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
https://linear.app/rilldata/issue/PLAT-489/change-to-rill-deploy-commands
Checklist: