Page MenuHomePhabricator

Is there a concrete relationship between harbormaster artifact types and drydock resource types?
OpenPublic

Asked by yelirekim on Jul 5 2016, 5:10 AM.

Details

I guess I'm looking for clarification here on how these things are related (if at all) and what the implications may be of treating one as the other. At a more basic level, clarification on what Drydock resource types represent in general would be helpful.

It's fairly clear via APIs and existing implementations what the intentions are for harbormaster artifact types.

I'm referring specifically to the string constant that the artifacts and blueprints each define. There is some indication that these constants are not interchangeable, specifically in HarbormasterLeaseWorkingCopyBuildStepImplementation, the constant for the resource is pulled from the resource blueprint, and the constant representing the artifact type is referenced using the class constant.

Answers

hach-que
Updated 2,858 Days Ago

Harbormaster artifact types specify the type of artifacts. Artifacts that are relevant for Drydock are the "Drydock lease artifact", which you can think of as a link or pointer to the actual Drydock lease.

Drydock resource types are the type of resource. Currently you can have host resources ('host') and working copies ('working-copy'?). You can define your own blueprints which can provide custom resource types, or resources that match the same type as existing blueprints. When Drydock attempts to satisfy leases, it has to use a resource whose type matches the lease.

Thus the relationship is somewhat like:

Harbormaster artifact for Drydock leaseDrydock leaseDrydock resource

However the type of Harbormaster artifact is always Drydock lease, regardless of the underlying Drydock resource type.

New Answer