Skip to content

Fix SSH with explicit project names - #1157

Open
anishfyi wants to merge 2 commits into
railwayapp:masterfrom
anishfyi:fix-1104-ssh-explicit-project
Open

Fix SSH with explicit project names#1157
anishfyi wants to merge 2 commits into
railwayapp:masterfrom
anishfyi:fix-1104-ssh-explicit-project

Conversation

@anishfyi

Copy link
Copy Markdown

Summary

Fixes #1104.

Allow railway ssh --project <name-or-id> --environment <environment> --service <service> to work outside a linked project directory. Explicit project values now use the existing project ID-or-name resolver before fetching project details.

A regression test covers resolving a project name with no local link and verifies that the resolved project ID is used for the project query.

Validation

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features
  • cargo test (1,274 tests)

@anishfyi

Copy link
Copy Markdown
Author

The label check requires a maintainer-applied release label. Could you please add release/patch if that is the appropriate classification for this fix?

@anishfyi

Copy link
Copy Markdown
Author

I also covered the explicit --project plus --environment case when --service is omitted. It no longer requires a local link and directly selects the project's sole service. The expanded regression test, full cargo test, formatting, and git diff --check pass. Normal Clippy completes with the repository's existing unrelated warnings.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

railway ssh requires a link even when project + environment are passed

1 participant