dotnet / tye

Tye is a tool that makes developing, testing, and deploying microservices and distributed applications easier. Project Tye includes a local orchestrator to make developing microservices easier and the ability to deploy microservices to Kubernetes with minimal configuration.
MIT License
5.29k stars 521 forks source link

--exclude flag for tye run #853

Open msschl opened 3 years ago

msschl commented 3 years ago

What should we add or change to make your life better?

Add a flag to tye run to exclude a specific project, e.g. tye run --watch --tags=area_a_developer_is_working_on --exclude=service_d

Why is this important to you?

Sometimes a developer just want to run n number of projects/services but exclude one specific project, for example when major changes are planned and someone wants a clean output of dotnet watch -p .... run without all other logs.

Currently we comment the specific service out and then run tye.

jkotalik commented 3 years ago

Hm, I'm a bit hesitant to add that explicitly. Have you tried out tags and creating collections of tags for each of your services? That should cover your use case of running all but a few projects.

jongio commented 3 years ago

I can see how it could be helpful to just exclude one - managing labels to do this is kinda rough...you'd have to add a label to all

unless, we can do exclusion with tags, like only run services that don't have this tag, or have an enable/disabled flag, so it still works with ingress.

msschl commented 3 years ago

Using tags would be quite rough. Imagine the following example: A company uses a mono repo for its application it is developing. The application is divided into multiple areas each having it's own team. One area for example, let's say responsible for creating routes for delivery products, consists of 5 microservices. Now, the team responsible for this area want to change one of those services and wants a single clean build/run output as described in my issue above. Using tags one has to map every possible combination. Further you'd have to introduce some sort of naming schema and remember the names. All in all, I think this doesn't scale well, having multiple teams and services.

So, I personally think it's just easier to provide a --exclude flag.

malisancube commented 2 years ago

@jkotalik could this could be solved by having multiple tye.yml files, where the user could run? e.g.

> tye run cms.tye.yml
> tye run identity.tye.yml
> tye run hrm.tye.yml

These file would have declaration to different services that the developer is currently working on.