Require versions for real deployments
When we're deploying in CI, we should always have pinned versions for
every artifact we're using. If we don't, that's an error, by
definition.
@@ -164,6 +164,16 @@ def configured_version_for(artifact_name: str) -> Optional[str]:
"""
artifacts = pulumi.Config().get_object("artifacts") or {}
version = artifacts.get(artifact_name)
+
+ if (not version) and REAL_DEPLOYMENT:
+ raise Exception(
+ f"""
+ Tried to deploy the {pulumi.get_stack()} stack, but no version for {artifact_name} was found!
+
+ This stack must have a version configured for ALL artifacts that it uses.
+ """
+ )
+
return version
