witty-family-13337
06/21/2022, 8:29 AMexperimental-deploy
goal and a PoC implementation for the Helm backend: https://docs.google.com/document/d/17wZRjiIxM5918ybC_0EnKY42qwd47-1ZporBdua8vRQ/edit?usp=sharing
My apologies for how drafty the document feels, having a mix of plenty at my plate and family issues at the moment so I couldn’t dedicate much time to it. Hope that the document plus the PoC Pull Request are useful to trigger a conversation.happy-kitchen-89482
06/21/2022, 9:21 AMwitty-family-13337
06/21/2022, 9:22 AMwide-midnight-78598
06/21/2022, 12:05 PMdeploy
goal means in the Pants world, and if something else would work well enough.
A while back, I created this deploy
goal:
https://github.com/sureshjoshi/pants-plugins/blob/main/pants-plugins/experimental/ansible/deploy.py
But as I think about it more, I realized in the ansible
case, deploy
only really meant "run this tool on these files/packages and it will magically provision a server or localhost", so ./pants run
on an ansible_deployment
target could arguably work as well.
Anyways, I got to the point where I'm not for or against anything on this, but I did reach a semantic existential crisis.witty-family-13337
06/21/2022, 2:28 PMinstall
as it correlated with helm install
and it could fit well in case we wanted to instead a Go binary too (which would have a different behaviour for the run goal
A run goal would in fact fit well with helm_deployment
targets so now I falling into the same semantic crisis. Think the key difference is the ability to trigger the publish
goal for the deployment dependencies, but not sure that's a general enough case worth pursuing.witty-crayon-22786
06/21/2022, 6:50 PMpublish
. but i think that an argument can still be made that unifying a few different semantically similar implementations (ansible + helm, for example) behind a dedicated goal will frequently make sense, primarily because it encourages consistency:
1. if the answer to “how do i publish/deploy” is “write a ${lang}_binary
target with particular arguments and then use run
on it”, then there isn’t necessarily anything encouraging consistency across the implementation of those binary targets.
2. from a type safety perspective, if run
usually means running user code, it’s odd for run
to do something else entirely for ansible/helm (because it means that even if you have empty input files, something might happen).
but yea: worth being cautious: thanks for the proposal! will read in the next few days.happy-kitchen-89482
06/21/2022, 9:13 PMdeploy
makes sense as a standalone goal, not run
, e.g., to avoid ./pants run ::
doing dangerous you didn't intend..../pants run path/to/thing.py
deploy
doeswide-midnight-78598
06/21/2022, 9:34 PM::
- definitely not what you want to casually run for side-effect laden goals!careful-address-89803
06/22/2022, 3:43 AMwitty-family-13337
06/23/2022, 7:10 AMhappy-kitchen-89482
07/06/2022, 2:02 AMwitty-family-13337
07/11/2022, 10:07 AM