vmware-archive / dispatch

Dispatch is a framework for deploying and managing serverless style applications.
http://dispatchframework.io
Apache License 2.0
532 stars 58 forks source link

Dispatch apply #604

Closed pzmrzy closed 6 years ago

pzmrzy commented 6 years ago

fix #394

zimengyang commented 6 years ago

In my opinion, the functionality of apply looks pretty overlapped with update. apply will create new entity instead of throwing error. What about adding a flag in update to create a new entity if no one present? (like helm upgrade --install RELEASE)

berndtj commented 6 years ago

I agree I had thought this would be addressed with a flag to update (i.e. update -i). Also, please squash commits and provide a good commit message.

neosab commented 6 years ago

Yeah, agree to have one unified command.

I would rather follow kubectl than helm CLI approach (as we have done before in our CLI's). How about just one unified apply command that updates/creates new resource.

I don't think the current update behavior of throwing an error when a resource doesn't exist is that useful. Say I have an all-in-one yaml and I add new resources to it e.g. add a new event subscription to an existing function, I would expect this to just work with whatever update command that's provided.

neosab commented 6 years ago

As discussed, proceed with update -i instead of apply. We can add apply if needed later.

kars7e commented 6 years ago

I was able to convince Berndt to apply :) Rationale: the command used more often should be the top level one, and I don't see us using update anymore if apply semantics are available (apart from specific use cases). We use kubectl apply everyday, but kubectl patch is very rare (although it's not an exact equivalent of dispatch update, it's close enough).