Skip to content

Add --force-push flag in rill deploy to force push changes for rill managed repos#9629

Merged
nishantmonu51 merged 5 commits into
mainfrom
force_push_deploy
Jul 2, 2026
Merged

Add --force-push flag in rill deploy to force push changes for rill managed repos#9629
nishantmonu51 merged 5 commits into
mainfrom
force_push_deploy

Conversation

@k-anshul

@k-anshul k-anshul commented Jun 30, 2026

Copy link
Copy Markdown
Member

https://linear.app/rilldata/issue/PLAT-489/change-to-rill-deploy-commands

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@k-anshul k-anshul self-assigned this Jun 30, 2026
@k-anshul k-anshul requested a review from nishantmonu51 June 30, 2026 09:08
@nishantmonu51

Copy link
Copy Markdown
Collaborator

@codex: review

@nishantmonu51 nishantmonu51 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, overall.

Comment thread cli/cmd/project/deploy.go
return err
}
if exists {
if p.ManagedGitId == "" && p.ArchiveAssetId == "" && o.ForcePush {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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..

@k-anshul k-anshul Jun 30, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 :

// Instead of a force push, we do a merge with favourLocal=true to ensure we don't lose history.
// This is not equivalent to a force push but is safer for users.

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread runtime/pkg/gitutil/commit.go
@nishantmonu51 nishantmonu51 added Type:Feature New feature request Area:CLI Size:M Medium change: 100-499 lines labels Jun 30, 2026

@nishantmonu51 nishantmonu51 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, 👍

@nishantmonu51 nishantmonu51 merged commit 0a70e80 into main Jul 2, 2026
12 checks passed
@nishantmonu51 nishantmonu51 deleted the force_push_deploy branch July 2, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area:CLI Size:M Medium change: 100-499 lines Type:Feature New feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants