feat(railway): Railway provider#604
Open
sam-goodwin wants to merge 2 commits into
Open
Conversation
…tion, Database, and friends Adds the Railway cloud provider with resources (Project, Environment, Service, Function, Database, Variables, Volume, TcpProxy, ServiceDomain, CustomDomain, ProjectToken, Webhook), the DatabaseUrl/VolumeMount bindings, live integration tests sharing a single rate-limit-friendly project, and an end-to-end examples/railway-postgres app (Function + Postgres + DatabaseUrl binding) verified against Railway. Co-authored-by: Cursor <cursoragent@cursor.com>
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #637
Adds the Railway cloud provider: full resource coverage, live integration tests, and an end-to-end example.
Resources
Project,Environment,Service,Function(Effect-native runtime — bundles your Effect program, ships it through Railway's build pipeline, exposes it on a public domain),Database(template-equivalent Postgres/MySQL/Redis/Mongo with volume),Variables,Volume,TcpProxy,ServiceDomain,CustomDomain,ProjectToken,Webhook— plus theDatabaseUrlandVolumeMountbindings.Typed errors via distilled
All provider error handling goes through typed
@distilled.cloud/railwayerrors (EnvironmentNameConflict,ServiceNameConflict,ServiceNameInvalid,TcpProxyLimitExceeded,ProjectCreateRateLimited, ...) discovered by live testing and recorded as patches — no genericUnknownRailwayErrorhandling anywhere. Submodule bump pairs with alchemy-run/distilled#340.Reconciler notes
deletedAt);read/observe treat soft-deleted as missing and name-conflict adoption skips them.EnvironmentNameConflict/ServiceNameConflict(service enumeration via a hand-writtenenvironment.serviceInstancesquery — Railway has no top-level list-services API).TcpProxyreplaces delete-first (Railway allows one proxy per service instance) and treatsTcpProxyOperationInProgresson an already-removed proxy as success.Project.test.tsexercises the project lifecycle.Example
examples/railway-postgres—Project+Database+Functionwired through theDatabaseUrlbinding; verified live (/,/health, and/dbround-tripping a query through the bound Postgres) and destroyed.Tests
All 11 Railway suites pass against the shared project (
Project.test.tsexcluded from the default run per rate limits). Tests are idempotent: create adopts orphans by name and every test tears down viaEffect.ensuring(stack.destroy()).