Service Environment vairable sfailing to deploy
pebblespaces
PROOP

19 days ago

Hey folks,

Trying to deploy some environment variables to a couple of my services

@pebble/worker

@pebble/web

And I keep getting errors like this when I go to deploy the changes:


install apt packages: libatomic1

install mise packages: node

ERROR: failed to build: failed to solve: secret SESSION_GRACE_EXIT_TIMEOUT_SECONDS: not found
install apt packages: libatomic1
ERROR: failed to build: failed to solve: secret SESSION_PAUSE_TIMEOUT_SECONDS: not found

We have these variables defined, but they're not able to be shared with these services due to the errors above when I deploy.

Any help here would be super appreciated!

$10 Bounty

18 Replies

Railway
BOT

19 days ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open Railway 19 days ago


are you referencing these variables in your build step?


dharmateja

are you referencing these variables in your build step?

pebblespaces
PROOP

18 days ago

Not in the build step specifically, no. These variables are used in the applications hosted on the services themselves. I've even gone so far as to delete the environment variables entirely, and redeploy the services. The build logs are still showing the same errors, referencing env variables that no longer exist.


I think its build cache issue..Did you try to redeploy ? Try adding NO_CACHE=1 as a service variable and redeploy. That disables build layer caching.
https://docs.railway.com/builds/build-configuration#disable-build-layer-caching


pebblespaces
PROOP

18 days ago

Same deal on both services even with no cache

install mise packages: node

25ms

ERROR: failed to build: failed to solve: secret SESSION_GRACE_EXIT_TIMEOUT_SECONDS: not found


pebblespaces
PROOP

18 days ago

Removed the env variables from the codebase entirely too, still no dice


pebblespaces

Same deal on both services even with no cache install mise packages: node25msERROR: failed to build: failed to solve: secret SESSION_GRACE_EXIT_TIMEOUT_SECONDS: not found

For some reason your build plan is trying to load those values as “build secrets”, but Railpack can’t find variables with those exact names available to that environment..


dharmateja

For some reason your build plan is trying to load those values as “build secrets”, but Railpack can’t find variables with those exact names available to that environment..

pebblespaces
PROOP

18 days ago

Yeah super strange. I wonder if something misconfigured when I cloned our staging environment when we launched? Kind of at a loss here


Can you also check your railpack.json for a "secrets" field? It should be empty or not present if you've removed everything. Also do a quick search across your repo


pebblespaces
PROOP

18 days ago

No secrets field in the railpack.json in any of my 3 services, no references across the entire codebase for those .env variables either


pebblespaces

No secrets field in the railpack.json in any of my 3 services, no references across the entire codebase for those .env variables either

can you also check in railpack-plan.json if it exists ? also you redeployed right?


dharmateja

can you also check in railpack-plan.json if it exists ? also you redeployed right?

pebblespaces
PROOP

18 days ago

No railpack-plan exists. And yep yep! Redeployed both services with the same result.


pebblespaces

No railpack-plan exists. And yep yep! Redeployed both services with the same result.

can you share build logs before error?


pebblespaces
PROOP

18 days ago

Absolutely, see attached!

Attachments


Did you seal any variables in staging before cloning to production? sealed variables don't copy over when duplicating environments ..


dharmateja

Did you seal any variables in staging before cloning to production? sealed variables don't copy over when duplicating environments ..

pebblespaces
PROOP

18 days ago

None at all - for what it's worth we have many other env variables, all behaving properly.

I Have not yet tried to share them with other services (they're all shared appropriately as it stands, and the app is working), but don't want to try in case it breaks as well.


pebblespaces

None at all - for what it's worth we have many other env variables, all behaving properly.I Have not yet tried to share them with other services (they're all shared appropriately as it stands, and the app is working), but don't want to try in case it breaks as well.

so other variables are working fine..how are those variables shared with the services ?. are you using reference variables like ${{shared.SESSION_GRACE_EXIT_TIMEOUT_SECONDS}} on each service?


dharmateja

so other variables are working fine..how are those variables shared with the services ?. are you using reference variables like ${{shared.SESSION_GRACE_EXIT_TIMEOUT_SECONDS}} on each service?

pebblespaces
PROOP

18 days ago

ohhh my goodness....they were somehow still stuck in the services themselves? Removed them manually from there as well and the deploy went through. Testing a couple more things but I think we're good here.


pebblespaces

ohhh my goodness....they were somehow still stuck in the services themselves? Removed them manually from there as well and the deploy went through. Testing a couple more things but I think we're good here.

Ah nice, glad you found it...those leftover variables were tripping up the build!!!


Loading...