Prisma1: prisma generate throws an error if part of secret and endpoint came from a variable

Created on 5 Dec 2018  路  4Comments  路  Source: prisma/prisma1

Describe the bug
prisma generate throws an error if part of secret and endpoint came from a variable

To Reproduce
Set this as prisma.yml

endpoint: https://internal.example.com/example-api/${self:custom.name}
datamodel: datamodel.graphql
secret: ${self:custom.endpoint-secret}

generate:
  - generator: typescript-client
    output: ../src/generated/prisma-client/
  - generator: graphql-schema
    output: ../src/generated/prisma-client/

custom:
  endpoint-secret: ${env:PRISMA_ENDPOINT_SECRET}
  name: ${env:PRISMA_DEPLOYMENT_UID}

Expected behavior
prisma generate would still work

Screenshots
screenshot from 2018-12-06 03-13-58

Versions (please complete the following information):

  • OS: Ubuntu 18.04
  • prisma CLI: prisma/1.22.1 (linux-x64) node-v11.2.0]
  • Prisma Server: v1.22

Additional Information
prisma deploy would still work

bu2-confirmed areclient kinbug

All 4 comments

I was able to reproduce it, here is my output:

image

Reproduction repository: https://github.com/pantharshit00/prisma-issue-3659

CLI version: prisma/1.22.1 (darwin-x64) node-v11.2.0

I've encountered this when trying to get prisma working nicely in a local docker dev setup. Granted I'm a bit of a docker noob so struggling!

I have an app in one container and it needs to access prisma api via the hostname (resolved through docker network) prisma. However on the host computer I need to run the playground which has to access prisma backend via localhost.

Is there a recommended approach for this?

I can still reproduce with 1.30 @divyenduz

Faced the error as well, here's my config similar

custom:
  endpoint: http://localhost:4466/sample/${env:NODE_ENV, 'dev'}

datamodel: datamodel.prisma
generate:
  - generator: typescript-client
    output: ../src/generated/prisma-client/
seed:
  run: ts-node ./prisma/seed.ts
hooks:
  post-deploy:
    - npx nexus-prisma-generate --client ./src/generated/prisma-client --output ./src/generated/nexus-prisma
endpoint: ${self:custom.endpoint}

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlessandroAnnini picture AlessandroAnnini  路  3Comments

MitkoTschimev picture MitkoTschimev  路  3Comments

nikolasburk picture nikolasburk  路  3Comments

marktani picture marktani  路  3Comments

thomaswright picture thomaswright  路  3Comments