Wait for a whole blueprint to be ready before going live (continued)

Continuing the discussion from Waiting for whole blueprint to be ready before going live:

I tried to implement the proposed solution. Unfortunately, it doesn’t work. The fast service comes online before the slow one is finished deploying. There must be something I don’t understand. Here is what I did:

  - type: pserv
    name: slow
    envVars:
      - key: FORCE_SLOW_DEPENDENCY
        value: 'force_slow_dependency'

  - type: web
    name: fast
    envVars:
      - key: IMPORTED_SLOW_DEPENDENCY
        fromService:
          type: pserv
          name: slow
          envVarKey: FORCE_SLOW_DEPENDENCY

What did I do wrong?

Hi Jérôme,

I was able to get this working by using a property instead of an Environment Variable.

i.e. for the service you want to be slower you’d pull in the host from the service you want to deploy first

...
  fromService: 
    type: pserv 
    name: first-service-to-deploy 
    property: host

Could you give that a try and let me know how it goes?

Regards,

Matt

Unfortunately, the fast service doesn’t wait for the slow one. It does import the ‘host’ value, but i think that it reads it from the previously running instance, not the one currently deploying.

I am also concerned about database migrations in this setup. Will the fast service do the migration, and leave the already running older instance access the new database schema with the outdated code?

Hi Jérôme,

I’m sorry these interim solutions don’t seem to work anymore. Something may have changed since the workaround was initially tested.

I see a solution proposed in this feedback topic: https://feedback.render.com/features/p/dependent-services-and-sequential-deploys , where another customer included a gist for their workaround for creating dependencies between services. Unfortunately, their solution doesn’t work for services managed by a blueprint.

I’d encourage you to upvote this feature request at https://feedback.render.com/features/p/express-servicejob-dependencies-in-blueprints. It helps to include as much context as possible about your particular use case, the problem you’re looking to solve, and how you’re getting around it today to help us develop the best possible solution. It sound like you may have a slightly different set of requirements than other, so capturing that will be very helpful for the team.

We rely heavily on customer feedback as a part of our planning and product roadmap process, so capturing interest on the feature request page is very helpful.

Regards,

Matt

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.