careful-address-89803
10/27/2024, 9:10 PMexperimental-deploy to publish packages before deploying. Currently I have
class MockDeployTarget(Target):
core_fields = (
*DeployFieldSet.fields.values(),
...
)
It works but feels like I'm abusing the machineryfast-nail-55400
10/28/2024, 12:02 AMCOMMON_TARGET_FIELDS) and use that, but that does not seem right here.fast-nail-55400
10/28/2024, 12:03 AMUnionMembership.get(PublishFieldSet) and see if the target matches at least one of the returned field sets.fast-nail-55400
10/28/2024, 12:04 AMfast-nail-55400
10/28/2024, 12:07 AMfast-nail-55400
10/28/2024, 12:09 AMpublish_dependencies field? https://github.com/pantsbuild/pants/blob/63e8b7b2743a01f69ace373ac0527950691144fa/src/python/pants/core/goals/deploy.py#L80careful-address-89803
10/28/2024, 1:38 AMDeployProcess.publish_dependencies, but with a way to hook into that manually. I think the only thing that fill that attribute is helm_deployment publishing inferred `docker_image`s. I want to provide a generic field that we can use to manually specify those. I'm thinking in particular of an issue where the user wanted docker images to be pushed before a Terraform deployment.
I need to look into publish_process_for_target .
Also yeah, it would be good to check that the things specified for publishing are actually publishable.fast-nail-55400
10/28/2024, 1:42 AMcareful-address-89803
10/28/2024, 1:52 AMdependencies and publishing anything publishable would be surprising.
I thought of this implementation in analogy with runtime_package_dependencies for tests. Although, it looks like the implementation there is to just have targets include that field in their core_fields manually