R
Railwayβ€’13mo ago
kylegill (kg)

Plugin -> Database Service migration resulted in unlinked Preview Environment variables

We went through the 1-Click Plugin to Service migration for our Redis database that we saw in the recent notice. Our production service had the service variables inside it auto-updated by the migration flow, but they are now unlinked when we create preview environments. When I say "unlinked", I'm not sure if that's the right word, but it looks like they are hard coded into our production env's other service now instead of magically linked to Redis like they used to be (see screenshot #1). We have our project setup to fork from the production environment and not isolate changes between other environments (see screenshot #2). In preview environments, I am seeing no variables on the new Redis service. My question is, with new Database Services should I be creating new shared environment variables? Should those have been created automatically? I found some steps in the Redis migration template here (https://github.com/railwayapp-templates/redis-plugin-migration/blob/864b51a946aea908b85f7c1acd2b6e8fb155df31/migrate.sh#L113C1-L116) but wonder if I'm missing something obvious. Project ID: 1d3ab213-7e4f-45f6-a136-1326d80d0606 I appreciate any help πŸ™
GitHub
redis-plugin-migration/migrate.sh at 864b51a946aea908b85f7c1acd2b6e...
Contribute to railwayapp-templates/redis-plugin-migration development by creating an account on GitHub.
No description
No description
7 Replies
Percy
Percyβ€’13mo ago
Project ID: 1d3ab213-7e4f-45f6-a136-1326d80d0606
kylegill (kg)
kylegill (kg)OPβ€’13mo ago
For more context, here's my preview env's redis service with no variables in it. When I compare that to the prod service it does have some variables that were set properly. The preview environment was created after the migration took place a few days ago.
No description
No description
kylegill (kg)
kylegill (kg)OPβ€’13mo ago
When I open up the API server variables in the preview env, I see the Redis Legacy variables visible as shared references, but I do not see any auto-generated Redis variables from the newer Redis database service.
No description
jr
jrβ€’13mo ago
Hey Kyle, Since databases are now just regular services, the variables are not automatically populated in a new environment. This is why you don't see them in the PR environment. To get around this you can tick "Isolate changes..." which will copy the variables from the base environment when creating the PR env
No description
jr
jrβ€’13mo ago
We are very aware that this flow is not great and are working on a bunch of improvements to environments that will make this much smoother
kylegill (kg)
kylegill (kg)OPβ€’13mo ago
Thanks jr, we'll try the isolate changes option as a workaround for the time being. I expected I might see some variables on the Redis service though, does that mean that the exact same variables from the prod environment remain the same on each new preview environment's service? (same password, same host, etc?..) I guess I assumed maybe those variables were changing. Just tried the isolate changes options and that worked to make sure we got the variables on new preview environments. We'll look forward to other changes but that does help us keep our same workflow, thank you!
jr
jrβ€’13mo ago
The password will be the same yes. The host and port are reference variables and will be point to the correct database in the environment.
Want results from more Discord servers?
Add your server