git commit --amend
and triggering builds
anthonysette
PROOP

a month ago

Our org recently started playing around with the Graphite CLI, which has a custom command for committing changes. Under the hood it is by default running the following.

```

git commit --amend ...

```

From our testing executing this command and pushing, is not triggering a build in Railway. Is this expected?

We have Railway connected to the branch where we are committing / pushing changes, but with git commit --amend the build isn't triggering after push. Perhaps because there is no new commit or because the commit hash is unchanged?

$10 Bounty

3 Replies

Railway
BOT

a month ago

Our autodeploys trigger when new commits are detected on the connected branch, and force pushes that rewrite history (like git commit --amend followed by git push --force) are not currently treated as new commits by our system. You can manually trigger a deployment from the latest commit using the Command Palette (CMD/Ctrl + K, then "Deploy Latest Commit").


Status changed to Awaiting User Response Railway about 1 month ago


anthonysette
PROOP

a month ago

Understood, I manually triggered a redeploy and the deployed changes still do not represent the latest changes. Does Railway by chance cache data pulled from github by the hash? Wondering if it tries to pull the latest commit but gets a cache hit


Status changed to Awaiting Railway Response Railway about 1 month ago


Status changed to Open Railway about 1 month ago


domehane
FREE

a month ago

Hello anthonysette,

i think deploy latest commit in railway actually redeploys from railway's deployment history, not directly from github. since your amended commit was never recorded as a new commit by railway, it just replays the old one , the safest fix is to push a brand new regular commit on top, that gives railway a new hash to detect and should pull the actual latest code

Hope this help you :)


Welcome!

Sign in to your Railway account to join the conversation.

Loading...