Skip to content

Comments

feat: Add Railway Integration#3024

Open
shambel-amare wants to merge 33 commits intosuperplanehq:mainfrom
shambel-amare:feat/railway-integration
Open

feat: Add Railway Integration#3024
shambel-amare wants to merge 33 commits intosuperplanehq:mainfrom
shambel-amare:feat/railway-integration

Conversation

@shambel-amare
Copy link

@shambel-amare shambel-amare commented Feb 10, 2026

Implements #2910

Summary

This PR adds the Railway integration to SuperPlane, enabling users to deploy and monitor Railway applications.

What Changed

Backend (pkg/integrations/railway/)

  • Base Integration (railway.go): API token authentication with project caching
  • Trigger Deploy (trigger_deploy.go): Component to trigger deployments for a service in an environment
  • On Deployment Event (on_deployment_event.go): Webhook-based trigger for Railway deployment status changes (succeeded, failed, crashed, etc.)
  • GraphQL Client (client.go): Railway API client using GraphQL
  • Webhook Handler (webhook_handler.go): Handles incoming Railway webhooks

Frontend (web_src/src/pages/workflowv2/mappers/railway/)

  • Component mappers for Trigger Deploy with metadata display
  • Trigger renderer for On Deployment Event
  • Custom field renderer showing webhook URL with copy button and setup instructions
  • Event state registry for failed deployment styling

Documentation

  • Detailed setup instructions for API token creation and scoping
  • Webhook configuration guide
  • Troubleshooting section for common issues

Why

Railway is a popular deployment platform, and this integration allows SuperPlane users to:

  • Trigger deployments programmatically as part of workflows
  • React to deployment events (success, failure, crash) to trigger downstream actions
  • Build CI/CD pipelines with Railway deployments

How

  • Video 1

  • Video 2

  • Uses Railway's GraphQL API (https://backboard.railway.com/graphql/v2) with Bearer token auth

  • Projects are cached in integration metadata during sync for efficient resource listing

  • Webhook-based triggers require manual webhook configuration in Railway (Railway doesn't support programmatic webhook creation)

  • Supports filtering deployment events by status (succeeded, failed, crashed, building, etc.)

Test Plan

  • Connect Railway integration with API token
  • Verify project/service/environment dropdowns populate correctly
  • Create Trigger Deploy component and execute a deployment
  • Create On Deployment Event trigger and verify webhook URL is displayed
  • Configure webhook in Railway and verify events are received
  • Test event filtering by deployment status

Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
@shiroyasha
Copy link
Collaborator

shiroyasha commented Feb 11, 2026

@shambel-amare looking good. Thanks for opening the PR.

Before we continue, please make sure to:

1/ Attach a video in the PR description that shows how the new components are working
2/ Make sure that tests on the CI are green
3/ Link to the issue that you are integrating

These steps are covered in more detail in this document:
https://github.com/superplanehq/superplane/blob/main/docs/contributing/integration-prs.md.

Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
- setup early skips metadata update on config change

Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
…sing

Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
@shambel-amare
Copy link
Author

@shambel-amare looking good. Thanks for opening the PR.

Before we continue, please make sure to:

1/ Attach a video in the PR description that shows how the new components are working 2/ Make sure that tests on the CI are green 3/ Link to the issue that you are integrating

These steps are covered in more detail in this document: https://github.com/superplanehq/superplane/blob/main/docs/contributing/integration-prs.md.

@darkofabijan i will be creating the video shortly, however i have a question on attaching Issue on this PR. is it the core team who create Issues? or is it fine if i create it?

@AleksandarCole
Copy link
Collaborator

@shambel-amare the issue already exists: #2910

project scoped token required, updated docs with proper description

Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
@AleksandarCole AleksandarCole added pr:stage-2/3 Needs to pass functional review and removed pr:stage-1/3 Needs to pass basic review. labels Feb 12, 2026
@AleksandarCole
Copy link
Collaborator

AleksandarCole commented Feb 12, 2026

@shambel-amare here are some ux/functional notes:

Integration form

  1. No need for such a detailed description
  2. The link to tokens is fixed https://railway.com/account/tokens add a button link that will take you there and in the description explain that they need to go there and create a token
image

Trigger component

  1. In details tab - put the timestamp at the top and ideally link the project so user can navigate to that deployment easily

  2. Webhook setup:
    Flow should be like this:

  • You select the project > you have to save component settings
  • You then have to configure webhook - since we have the project we should be able to give you a button with direct link to the page instead of detailed instructions (eg: https://railway.com/project/{project id}/settings/webhooks/new)
  • after you configure webhook - you get the filter option with the events that webhook has access to

Action component

  • It does not have zero state or show the event on the component node
image
  • Statuses are wrong - it shows as Success even though the build and deployment failed - status needs to reflect the state of the action.

@shambel-amare
Copy link
Author

  • Statuses are wrong - it shows as Success even though the build and deployment failed - status needs to reflect the state of the action.

@AleksandarCole when you say Statuses are wrong - it shows as Success even though the build and deployment failed - status needs to reflect the state of the action. do you mean we wait for the deployment to finish and show the correct status? cause that is not the work of the triggerDeploy, triggerDeploy calls the deployment api and shows the response it gets right away, not the final deployment status.

Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
@AleksandarCole
Copy link
Collaborator

Hi @shambel-amare as discussed on Discord, we want to have polling to get the live status of the deployment until its finished.

Regarding other issues, with the latest changes:
The action component is still not showing events
image

Seems like trigger component stopped working - it's not showing that webhook setup form anymore
image

And there seems to be another regression with the icon that was displaying properly before, but doesn't now:
image

@AleksandarCole AleksandarCole self-assigned this Feb 17, 2026
Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
Signed-off-by: Shambel Amare <shambelamare2006@gmail.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

err = ctx.ExecutionState.SetKV("deployment_id", deploymentID)
if err != nil {
return fmt.Errorf("failed to store deployment ID: %w", err)
}
Copy link

Choose a reason for hiding this comment

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

Deployment ID stored in KV but never retrieved

Low Severity

ctx.ExecutionState.SetKV("deployment_id", deploymentID) writes to the execution KV store, but no code in the Railway integration ever calls FindExecutionByKV or GetKV with this key. The TriggerDeploy.HandleWebhook is a no-op, so the KV is never used for webhook-to-execution matching. The poll action reads the deployment ID from ctx.Metadata.Get() instead. This appears copied from the Render Deploy pattern (which does use KV for webhook matching) but is unnecessary here since Railway relies solely on polling.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:stage-2/3 Needs to pass functional review wfh

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants