pulumi/changelog/pending
Julien 43a9bd7fe6
Catch BaseException in automation API server (#17909)
Automation API is useful for writing tests for Pulumi programs, and a
user could write a test as follows:

```python
def program():
    with pytest.raises(ValueError):
        _a = 1 + 2  # No error here, pytest.raises should fail

stack = create_stack("mystack", program=program, project_name="proj")

with pytest.raises(InlineSourceRuntimeError):
    stack.preview()
```

If the block in `pytest.raises` does not raise the expected error or any
error, `pytest.raises` fails the test by raising an `OutcomeException`.
This exception class inherits from `BaseException`, not `Exception`, so
we would previously not catch this, and fail to report an error from the
automation API server's `Run` method, causing the call to
`stack.preview`
to hang indefinitely.

Fixes https://github.com/pulumi/pulumi/issues/17133
2024-12-03 15:47:58 +00:00
..
20241109--auto-go-nodejs-python--fixed-a-bug-where-token-information-was-not-present-in-types.yaml Fixed a bug where token information was not present in types (#17735) 2024-12-01 07:39:51 +00:00
20241125--programgen-dotnet-nodejs-python--emit-deferred-outputs-for-mutually-dependant-components.yaml [program-gen] Emit deferred outputs for mutually dependant components (#17859) 2024-11-27 23:36:31 +00:00
20241125--sdk-nodejs--throw-from-output-on-circular-structures.yaml [sdk/nodejs] Throw from output() on circular structures (#17852) 2024-11-27 18:40:29 +00:00
20241126--protobuf--add-handshake-to-the-provider-protocol.yaml Add `Handshake` to the provider protocol (#17819) 2024-11-26 17:35:47 +00:00
20241126--sdkgen--include-parameterization-details-in-pulumi-plugin-json.yaml Add 'parameterization' to pulumi-plugin.json (#17867) 2024-11-27 16:46:15 +00:00
20241127--sdk-python--drop-python-3-8-support.yaml Drop Python 3.8 support (#17883) 2024-12-02 16:13:08 +00:00
20241127--sdk-python--switch-to-ruff-for-linting.yaml Switch to ruff for linting and formatting (#17882) 2024-12-02 12:41:19 +00:00
20241202--auto-nodejs--dont-hang-indefinitely-on-failed-inputs.yaml Don't hang indefinitely on failed inputs (#17899) 2024-12-03 10:18:25 +00:00
20241202--cli-install--dont-recreate-virtualenvs-when-using-venv.yaml Don't recreate virtualenvs when using venv (#17892) 2024-12-02 16:22:31 +00:00
20241203--auto-python--catch-baseexception-in-automation-api-server.yaml Catch BaseException in automation API server (#17909) 2024-12-03 15:47:58 +00:00