Railway deploying an outdated GitHub commit instead of the current main HEAD
scaratigiannantonio-ops
HOBBYOP

a month ago

Hello, I need help investigating a deployment issue with my Railway service.

Project:

  • Project ID: 2ed0ecd9-60b9-4b57-918f-ecd2b674fabd
  • Service ID: 2dcbfc83-a4f0-4ebe-a58b-7484f5f6119f
  • Environment: Production
  • Environment ID: 3e3dea17-9121-4e0a-a222-8221d86b8643
  • GitHub repository: scaratigiannantonio-ops/social-ai-pro-backend
  • Branch: main
  • Root directory: /backend

There appears to be a source snapshot/cache issue.

The current GitHub main HEAD is:

910cb9668de3a5f48654a488c2609b338ff4086d

The current file:

backend/app/services/leadflow/discovery.py

contains the correct Python statement:

from __future__ import annotations

However, a previous Railway deployment was built from commit:

8db4a952f9ed4d450ef54d6ab6a18174ae929264

and that version contained an invalid statement:

from **future** import annotations

which caused a Python SyntaxError: invalid syntax.

What is confusing is that using Railway's Redeploy operation appears to keep creating deployments from the older commit/snapshot instead of pulling the current GitHub main HEAD.

Could you please check:

  1. Which exact Git commit/source snapshot Railway is using for the latest deployment.
  2. Whether the service is currently pinned to an old GitHub commit or source snapshot.
  3. Whether Railway's build cache could be causing the old source files to be reused.
  4. Whether the GitHub source needs to be re-synchronized or the build cache needs to be invalidated.
  5. What is the correct way to force this existing service to deploy the current main commit 910cb9668de3a5f48654a488c2609b338ff4086d without creating a new Railway service.

Please do not modify the application code. The GitHub source is already correct; I want to resolve the Railway deployment/source synchronization issue.

Also, if possible, please tell me whether a "Redeploy" is expected to rebuild from the current GitHub HEAD or from the source snapshot associated with the previous deployment.

Solved

1 Replies

Railway
BOT

a month ago

A "Redeploy" is designed to rebuild from the same source snapshot as the deployment it was triggered on, not from the current GitHub HEAD. This is why redeploying keeps using the older commit. To deploy from your current main HEAD, open the Command Palette (CMD/CTRL + K) and select "Deploy latest commit", which pulls and builds from the latest commit on your configured branch.


Status changed to Awaiting User Response Railway • 28 days ago


Status changed to Solved scaratigiannantonio-ops • 28 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...