runway.exceptions module

Runway exceptions.

exception runway.exceptions.ConfigNotFound[source]

Bases: RunwayError

Configuration file could not be found.

__init__(path: Path, looking_for: list[str] | None = None) None[source]

Instantiate class.

Parameters:
  • path – Path where the config file was expected to be found.

  • looking_for – List of file names that were being looked for.

__reduce__() tuple[type[Exception], tuple[Any, ...]][source]

Support for pickling.

message: str

Error message.

exception runway.exceptions.DockerConnectionRefusedError[source]

Bases: RunwayError

Docker connection refused.

This can be caused by a number of reasons:

  • Docker is not installed.

  • Docker service is not running.

  • The current user does not have adequate permissions (e.g. not a member of the docker group).

__init__() None[source]

Instantiate class.

exception runway.exceptions.DockerExecFailedError[source]

Bases: RunwayError

Docker failed when trying to execute a command.

This can be used for docker container run, docker container start and docker exec equivalents.

__init__(response: dict[str, Any]) None[source]

Instantiate class.

Parameters:

response – The return value of docker.models.containers.Container.wait(), Docker API’s response as a Python dictionary. This can contain important log information pertinent to troubleshooting that may not streamed.

__reduce__() tuple[type[Exception], tuple[Any, ...]][source]

Support for pickling.

exit_code: int

The StatusCode returned by Docker.

message: str = 'error message undefined'

Error message.

exception runway.exceptions.FailedLookup[source]

Bases: RunwayError

Intermediary Exception to be converted to FailedVariableLookup.

Should be caught by error handling and runway.cfngin.exceptions.FailedVariableLookup raised instead to construct a proper error message.

__init__(lookup: VariableValueLookup, cause: Exception, *args: Any, **kwargs: Any) None[source]

Instantiate class.

Parameters:
  • lookup – The variable value lookup that was attempted and resulted in an exception being raised.

  • cause – The exception that was raised.

  • *args – Variable length argument list.

  • **kwargs – Arbitrary keyword arguments.

__reduce__() tuple[type[Exception], tuple[Any, ...]][source]

Support for pickling.

message: str = 'Failed lookup'

Error message.

exception runway.exceptions.FailedVariableLookup[source]

Bases: RunwayError

Lookup could not be resolved.

Raised when an exception is raised when trying to resolve a lookup.

__init__(variable: Variable, lookup_error: FailedLookup, *args: Any, **kwargs: Any) None[source]

Instantiate class.

Parameters:
  • variable – The variable containing the failed lookup.

  • lookup_error – The exception that was raised directly before this one.

  • *args – Variable length argument list.

  • **kwargs – Arbitrary keyword arguments.

__reduce__() tuple[type[Exception], tuple[Any, ...]][source]

Support for pickling.

message: str

Error message.

exception runway.exceptions.HclParserError[source]

Bases: RunwayError

HCL/HCL2 parser error.

__init__(exc: Exception, file_path: Path | str, parser: ModuleType | None = None) None[source]

Instantiate class.

Parameters:
  • exc – Exception that was raised.

  • file_path – File that resulted in the error.

  • parser – The parser what was used to try to parse the file (hcl|hcl2).

message: str

Error message.

exception runway.exceptions.InvalidLookupConcatenation[source]

Bases: RunwayError

Invalid return value for a concatenated (chained) lookup.

The return value must be a string when lookups are concatenated.

__init__(invalid_lookup: VariableValue, concat_lookups: VariableValueConcatenation[Any], *args: Any, **kwargs: Any) None[source]

Instantiate class.

__reduce__() tuple[type[Exception], tuple[Any, ...]][source]

Support for pickling.

message: str

Error message.

exception runway.exceptions.KubectlVersionNotSpecified[source]

Bases: RunwayError

kubectl version is required but was not specified.

Version can be specified by using a file or option.

__init__(*args: Any, **kwargs: Any) None[source]

Instantiate class.

message: str

Error message.

exception runway.exceptions.NpmNotFound[source]

Bases: RunwayError

Raised when npm could not be executed or was not found in path.

__init__(*args: Any, **kwargs: Any) None[source]

Instantiate class.

message: str

Error message.

exception runway.exceptions.OutputDoesNotExist[source]

Bases: RunwayError

Raised when a specific stack output does not exist.

__init__(stack_name: str, output: str, *args: Any, **kwargs: Any) None[source]

Instantiate class.

Parameters:
  • stack_name – Name of the stack.

  • output – The output that does not exist.

  • *args – Variable length argument list.

  • **kwargs – Arbitrary keyword arguments.

__reduce__() tuple[type[Exception], tuple[Any, ...]][source]

Support for pickling.

output: str

Name of the CloudFormation Stack’s Output that does not exist.

stack_name: str

Name of a CloudFormation Stack.

exception runway.exceptions.RequiredTagNotFoundError[source]

Bases: RunwayError

Required tag not found on resource.

__init__(resource: str, tag_key: str) None[source]

Instantiate class.

Parameters:
  • resource – An ID or name to identify a resource.

  • tag_key – Key of the tag that could not be found.

__reduce__() tuple[type[Exception], tuple[Any, ...]][source]

Support for pickling.

resource: str

An ID or name to identify a resource.

tag_key: str

Key of the tag that could not be found.

exception runway.exceptions.RunwayError[source]

Bases: Exception

Base class for custom exceptions raised by Runway.

__init__(*args: Any, **kwargs: Any) None[source]

Instantiate class.

message: str

Error message.

exception runway.exceptions.UnknownLookupType[source]

Bases: RunwayError

Lookup type provided does not match a registered lookup.

Example

If a lookup of ${<lookup_type> query} is used and <lookup_type> is not a registered lookup, this exception will be raised.

__init__(lookup: VariableValueLookup, *args: Any, **kwargs: Any) None[source]

Instantiate class.

Parameters:
  • lookup – Variable value lookup that could not find a handler.

  • *args – Variable length argument list.

  • **kwargs – Arbitrary keyword arguments.

message: str = 'Unknown lookup type'

Error message.

exception runway.exceptions.UnresolvedVariable[source]

Bases: RunwayError

Raised when trying to use a variable before it has been resolved.

__init__(variable: Variable, *args: Any, **kwargs: Any) None[source]

Instantiate class.

Parameters:
  • variable – The unresolved variable.

  • *args – Variable length argument list.

  • **kwargs – Arbitrary keyword arguments.

message: str = 'Unresolved variable'

Error message.

exception runway.exceptions.UnresolvedVariableValue[source]

Bases: RunwayError

Intermediary Exception to be converted to UnresolvedVariable.

Should be caught by error handling and runway.cfngin.exceptions.UnresolvedVariable raised instead to construct a proper error message.

__init__(lookup: VariableValueLookup, *args: Any, **kwargs: Any) None[source]

Instantiate class.

Parameters:
  • lookup – The variable value lookup that is not resolved.

  • *args – Variable length argument list.

  • **kwargs – Arbitrary keyword arguments.

message: str = 'Unresolved lookup'

Error message.

exception runway.exceptions.VariablesFileNotFound[source]

Bases: RunwayError

Defined variables file could not be found.

__init__(file_path: Path) None[source]

Instantiate class.

Parameters:

file_path – Path where the file was expected to be found.

message: str

Error message.