Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

add dependency map #1613

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

add dependency map #1613

wants to merge 3 commits into from

Conversation

Phiph
Copy link

@Phiph Phiph commented Oct 11, 2023

This PR aims to solve #1608 & #652

it introduces the dependsOn yaml that looks for services that match the name and ensure the startup order is honoured.

For Example:

name: VotingSample
services:
- name: vote
  project: vote.csproj
  dependsOn:
    - redis
- name: worker
  include: ../worker/tye.yaml
- name: redis
  image: redis
  bindings:
    - port: 6379
      connectionString: ${host}:${port}

Should await the Redis server to start before the vote service.

I will write more E2E tests to validate this and ensure that environment variables are added to services.

@davidfowl
Copy link
Member

Should await the Redis server to start before the vote service.

This will leave you with brittle service code. It encourages the wrong defaults.

@Phiph
Copy link
Author

Phiph commented Oct 11, 2023

referring issue #443

@Phiph
Copy link
Author

Phiph commented Oct 11, 2023

Should await the Redis server to start before the vote service.

This will leave you with brittle service code. It encourages the wrong defaults.

Totally get that your services should be fault tolerant, but I think It would help support the way tye injects env variables. Do you have any suggestions :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants