MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / resolve_ami

Function resolve_ami

misc/python/materialize/scratch.py:78–83  ·  view source on GitHub ↗

Resolve the AMI for a machine, deriving it from the instance type's architecture unless the config pins one explicitly.

(desc: "MachineDesc")

Source from the content-addressed store, hash-verified

76
77
78def resolve_ami(desc: "MachineDesc") -> str:
79 """Resolve the AMI for a machine, deriving it from the instance type's
80 architecture unless the config pins one explicitly."""
81 if desc.ami:
82 return desc.ami
83 return AMIS_BY_ARCH[instance_type_arch(desc.instance_type)]
84
85
86def tags(i: Instance) -> dict[str, str]:

Callers 1

launch_clusterFunction · 0.85

Calls 1

instance_type_archFunction · 0.85

Tested by

no test coverage detected