Skip to content

Conversation

@jog1t
Copy link
Contributor

@jog1t jog1t commented Nov 23, 2025

TL;DR

Updated Rivet environment variable names by removing the NEXT_PUBLIC_ prefix.

What changed?

Modified the environment variable keys displayed in the Railway connection dialog:

  • Changed NEXT_PUBLIC_RIVET_RUNNER to RIVET_RUNNER
  • Changed NEXT_PUBLIC_RIVET_TOKEN to RIVET_TOKEN
  • Changed NEXT_PUBLIC_RIVET_ENDPOINT to RIVET_ENDPOINT
  • Changed NEXT_PUBLIC_RIVET_NAMESPACE to RIVET_NAMESPACE

How to test?

  1. Open the Railway connection dialog
  2. Verify that the environment variable keys are displayed without the NEXT_PUBLIC_ prefix
  3. Ensure that the connection functionality still works correctly with the updated variable names

Why make this change?

The NEXT_PUBLIC_ prefix is typically used for client-side environment variables in Next.js applications. Since these Rivet variables are likely meant to be server-side only, removing this prefix ensures they won't be exposed to the client, improving security and following best practices for environment variable naming.

@vercel
Copy link

vercel bot commented Nov 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
rivet-inspector Ready Ready Preview Comment Nov 23, 2025 10:50pm
3 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
rivet-cloud Ignored Ignored Nov 23, 2025 10:50pm
rivet-site Ignored Ignored Preview Nov 23, 2025 10:50pm
rivetkit-serverless Skipped Skipped Nov 23, 2025 10:50pm

@vercel vercel bot temporarily deployed to Preview – rivetkit-serverless November 23, 2025 22:48 Inactive
Copy link
Contributor Author

jog1t commented Nov 23, 2025


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@jog1t jog1t marked this pull request as ready for review November 23, 2025 22:48
@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 23, 2025

Merge activity

  • Nov 23, 10:49 PM UTC: jog1t added this pull request to the Graphite merge queue.
  • Nov 23, 10:50 PM UTC: CI is running for this pull request on a draft pull request (#3532) due to your merge queue CI optimization settings.

@jog1t jog1t merged commit eeb01fc into main Nov 23, 2025
12 of 14 checks passed
@jog1t jog1t deleted the 11-23-fix_cloud_incorrect_property_names_for_railway branch November 23, 2025 22:50
graphite-app bot pushed a commit that referenced this pull request Nov 23, 2025
### TL;DR

Updated Rivet environment variable names by removing the `NEXT_PUBLIC_` prefix.

### What changed?

Modified the environment variable keys displayed in the Railway connection dialog:
- Changed `NEXT_PUBLIC_RIVET_RUNNER` to `RIVET_RUNNER`
- Changed `NEXT_PUBLIC_RIVET_TOKEN` to `RIVET_TOKEN`
- Changed `NEXT_PUBLIC_RIVET_ENDPOINT` to `RIVET_ENDPOINT`
- Changed `NEXT_PUBLIC_RIVET_NAMESPACE` to `RIVET_NAMESPACE`

### How to test?

1. Open the Railway connection dialog
2. Verify that the environment variable keys are displayed without the `NEXT_PUBLIC_` prefix
3. Ensure that the connection functionality still works correctly with the updated variable names

### Why make this change?

The `NEXT_PUBLIC_` prefix is typically used for client-side environment variables in Next.js applications. Since these Rivet variables are likely meant to be server-side only, removing this prefix ensures they won't be exposed to the client, improving security and following best practices for environment variable naming.
@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 23, 2025

Graphite Automations

"Test" took an action on this PR • (11/23/25)

1 assignee was added to this PR based on Kacper Wojciechowski's automation.

@claude
Copy link

claude bot commented Nov 23, 2025

PR Review: fix(cloud): incorrect property names for railway

Summary

This PR correctly updates the environment variable names displayed in the Railway connection dialog, removing the NEXT_PUBLIC_ prefix from four Rivet-related environment variables.

✅ Code Quality

The changes are straightforward and focused - simple string value replacements with no logic changes. The code follows existing patterns in the file.

✅ Correctness Verified

I verified these environment variable names against the RivetKit SDK source code:

rivetkit-typescript/packages/rivetkit/src/client/config.ts:8-31

endpoint: z.string().optional().transform(
    (x) => x ?? getEnvUniversal("RIVET_ENGINE") ?? getEnvUniversal("RIVET_ENDPOINT"),
),
token: z.string().optional().transform((x) => x ?? getEnvUniversal("RIVET_TOKEN")),
namespace: z.string().default(() => getEnvUniversal("RIVET_NAMESPACE") ?? "default"),
runnerName: z.string().default(() => getEnvUniversal("RIVET_RUNNER") ?? "default"),

The new values (RIVET_ENDPOINT, RIVET_TOKEN, RIVET_NAMESPACE, RIVET_RUNNER) match exactly what the RivetKit SDK expects.

✅ Security

The PR description is accurate - removing the NEXT_PUBLIC_ prefix ensures these variables won't be inadvertently exposed to the client-side bundle in Next.js applications. This is a security improvement.

✅ Documentation Consistency

The documentation in website/src/content/docs/connect/kubernetes.mdx already uses the non-prefixed names (RIVET_API_ENDPOINT, RIVET_NAMESPACE, RIVET_TOKEN), so this change brings the Railway dialog in line with existing documentation conventions.

⚠️ Minor Observation

The Kubernetes docs use RIVET_API_ENDPOINT while the Railway dialog shows RIVET_ENDPOINT. Both work per the SDK (getEnvUniversal("RIVET_ENGINE") ?? getEnvUniversal("RIVET_ENDPOINT")), but the inconsistency in documentation could potentially confuse users. This is outside the scope of this PR but worth noting.

Verdict

LGTM ✅ - Clean, correct, and improves security. Ready to merge.


🤖 Generated with Claude Code

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.

2 participants