Compare commits

...

2 commits

Author SHA1 Message Date
joeduffy f65533fd48 Add CHANGELOG entry 2019-08-25 19:05:14 -07:00
joeduffy 4b4c0cecfe Deprecate PULUMI_TEST_MODE
Fixes #3045.
2019-08-25 19:03:24 -07:00
3 changed files with 13 additions and 2 deletions

View file

@ -7,6 +7,7 @@ CHANGELOG
- Fix a crash when using StackReference from the `1.0.0-beta.3` version of
`@pulumi/pulumi` and `1.0.0-beta.2` or earlier of the CLI.
- Deprecate `PULUMI_TEST_MODE`. See [#3045](https://github.com/pulumi/pulumi/issues/3045) for details.
## 1.0.0-beta.3 (2019-08-21)

View file

@ -71,7 +71,12 @@ export function _setTestModeEnabled(val: boolean) {
* Returns true if test mode is enabled (PULUMI_TEST_MODE).
*/
export function isTestModeEnabled(): boolean {
return options.testModeEnabled === true;
if (options.testModeEnabled === true) {
log.warn("PULUMI_TEST_MODE is deprecated, and will be removed soon; " +
"please see https://github.com/pulumi/pulumi/issues/3045 for details");
return true;
}
return false;
}
/**

View file

@ -21,6 +21,7 @@ import sys
from typing import Optional, Awaitable, TYPE_CHECKING
import grpc
from ..log import warn
from ..runtime.proto import engine_pb2_grpc, resource_pb2, resource_pb2_grpc
from ..errors import RunError
@ -99,7 +100,11 @@ def is_test_mode_enabled() -> bool:
"""
Returns true if test mode is enabled (PULUMI_TEST_MODE).
"""
return bool(SETTINGS.test_mode_enabled)
test_mode = bool(SETTINGS.test_mode_enabled)
if test_mode:
warn('PULUMI_TEST_MODE is deprecated, and will be removed soon; '+
'please see https://github.com/pulumi/pulumi/issues/3045 for details')
return test_mode
def _set_test_mode_enabled(v: Optional[bool]):