Skip to content

Commit 4489687

Browse files
authored
fix: Update max_instances default to reflect actual value (#2302)
The default maximum instances for cloud functions is 100, not 0. Updated the `expected_max_instances` in the `parametrize` decorator to 100 for the 'no-set' and 'set-None' test cases to accurately reflect the runtime behavior. Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-bigquery-dataframes/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes b/465212379 🦕
1 parent aae1b04 commit 4489687

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/system/large/functions/test_remote_function.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,13 +1651,12 @@ def square(x):
16511651
return x * x
16521652

16531653

1654-
# Note: Zero represents default, which is 100 instances actually, which is why the remote function still works
1655-
# in the df.apply() call here
1654+
# The default value of 100 is used if the maximum instances value is not set.
16561655
@pytest.mark.parametrize(
16571656
("max_instances_args", "expected_max_instances"),
16581657
[
1659-
pytest.param({}, 0, id="no-set"),
1660-
pytest.param({"cloud_function_max_instances": None}, 0, id="set-None"),
1658+
pytest.param({}, 100, id="no-set"),
1659+
pytest.param({"cloud_function_max_instances": None}, 100, id="set-None"),
16611660
pytest.param({"cloud_function_max_instances": 1000}, 1000, id="set-explicit"),
16621661
],
16631662
)

0 commit comments

Comments
 (0)