nextmv 0.28.2__tar.gz → 0.28.3.dev1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/PKG-INFO +1 -1
- nextmv-0.28.3.dev1/nextmv/__about__.py +1 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/nextmv/cloud/application.py +19 -6
- nextmv-0.28.2/nextmv/__about__.py +0 -1
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/.gitignore +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/LICENSE +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/README.md +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/nextmv/__entrypoint__.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/nextmv/__init__.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/nextmv/base_model.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/nextmv/cloud/__init__.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/nextmv/cloud/acceptance_test.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/nextmv/cloud/account.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/nextmv/cloud/batch_experiment.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/nextmv/cloud/client.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/nextmv/cloud/input_set.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/nextmv/cloud/instance.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/nextmv/cloud/manifest.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/nextmv/cloud/package.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/nextmv/cloud/run.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/nextmv/cloud/safe.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/nextmv/cloud/scenario.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/nextmv/cloud/secrets.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/nextmv/cloud/status.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/nextmv/cloud/version.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/nextmv/deprecated.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/nextmv/input.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/nextmv/logger.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/nextmv/model.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/nextmv/options.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/nextmv/output.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/pyproject.toml +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/requirements.txt +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/__init__.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/cloud/__init__.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/cloud/app.yaml +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/cloud/test_application.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/cloud/test_client.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/cloud/test_manifest.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/cloud/test_package.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/cloud/test_run.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/cloud/test_safe_name_id.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/cloud/test_scenario.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/scripts/__init__.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/scripts/options1.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/scripts/options2.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/scripts/options3.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/scripts/options4.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/scripts/options5.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/scripts/options6.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/scripts/options7.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/scripts/options_deprecated.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/test_base_model.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/test_entrypoint/__init__.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/test_entrypoint/test_entrypoint.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/test_input.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/test_logger.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/test_model.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/test_options.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/test_output.py +0 -0
- {nextmv-0.28.2 → nextmv-0.28.3.dev1}/tests/test_version.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "v0.28.3.dev1"
|
|
@@ -3174,7 +3174,7 @@ class Application:
|
|
|
3174
3174
|
raise ValueError(f"Unknown scenario input type: {scenario.scenario_input.scenario_input_type}")
|
|
3175
3175
|
|
|
3176
3176
|
|
|
3177
|
-
def poll(polling_options: PollingOptions, polling_func: Callable[[], tuple[Any, bool]]) -> Any:
|
|
3177
|
+
def poll(polling_options: PollingOptions, polling_func: Callable[[], tuple[Any, bool]]) -> Any: # noqa: C901
|
|
3178
3178
|
"""
|
|
3179
3179
|
Poll a function until it succeeds or the polling strategy is exhausted.
|
|
3180
3180
|
|
|
@@ -3253,6 +3253,7 @@ def poll(polling_options: PollingOptions, polling_func: Callable[[], tuple[Any,
|
|
|
3253
3253
|
stopped = False
|
|
3254
3254
|
|
|
3255
3255
|
# Begin the polling process.
|
|
3256
|
+
max_reached = False
|
|
3256
3257
|
for ix in range(polling_options.max_tries):
|
|
3257
3258
|
# Check is we should stop polling according to the stop callback.
|
|
3258
3259
|
if polling_options.stop is not None and polling_options.stop():
|
|
@@ -3279,12 +3280,24 @@ def poll(polling_options: PollingOptions, polling_func: Callable[[], tuple[Any,
|
|
|
3279
3280
|
)
|
|
3280
3281
|
|
|
3281
3282
|
# Calculate the delay.
|
|
3282
|
-
delay =
|
|
3283
|
-
|
|
3284
|
-
|
|
3283
|
+
delay = 0.0
|
|
3284
|
+
if max_reached:
|
|
3285
|
+
# If we already reached the maximum, we don't want to further calculate the
|
|
3286
|
+
# delay to avoid overflows.
|
|
3287
|
+
delay = polling_options.max_delay
|
|
3288
|
+
delay += random.uniform(0, polling_options.jitter) # Add jitter.
|
|
3289
|
+
else:
|
|
3290
|
+
delay = polling_options.delay # Base
|
|
3291
|
+
delay += polling_options.backoff * (2**ix) # Add exponential backoff.
|
|
3292
|
+
delay += random.uniform(0, polling_options.jitter) # Add jitter.
|
|
3293
|
+
|
|
3294
|
+
# We cannot exceed the max delay.
|
|
3295
|
+
if delay >= polling_options.max_delay:
|
|
3296
|
+
max_reached = True
|
|
3297
|
+
delay = polling_options.max_delay
|
|
3285
3298
|
|
|
3286
|
-
# Sleep for the calculated delay.
|
|
3287
|
-
sleep_duration =
|
|
3299
|
+
# Sleep for the calculated delay.
|
|
3300
|
+
sleep_duration = delay
|
|
3288
3301
|
if polling_options.verbose:
|
|
3289
3302
|
log(f"polling | sleeping for duration: {sleep_duration}")
|
|
3290
3303
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "v0.28.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|