Skip to content

Conversation

@ScruffyProdigy
Copy link
Contributor

No description provided.

@lsirac lsirac added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jul 13, 2022
@lsirac
Copy link
Contributor

lsirac commented Jul 14, 2022

Add an integration test where the requested lifetime < 3600s (so no exemption needed).

@lsirac lsirac removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jul 19, 2022
@lsirac lsirac requested a review from a team as a code owner July 27, 2022 00:14
@sai-sunder-s sai-sunder-s added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Jul 28, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 28, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 28, 2022
@sai-sunder-s sai-sunder-s added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 29, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 29, 2022
@clundin25 clundin25 added the kokoro:run Add this label to force Kokoro to re-run the tests. label Aug 1, 2022
@yoshi-kokoro yoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. labels Aug 1, 2022
@clundin25
Copy link
Contributor

__ ERROR collecting system_tests/system_tests_sync/test_external_accounts.py ___
.nox/external_accounts-2-7/lib/python2.7/site-packages/_pytest/python.py:507: in _importtestmodule
    mod = self.fspath.pyimport(ensuresyspath=importmode)
.nox/external_accounts-2-7/lib/python2.7/site-packages/py/_path/local.py:704: in pyimport
    __import__(modname)
E     File "/tmpfs/src/github/google-auth-library-python/system_tests/system_tests_sync/test_external_accounts.py", line 176
E       def test-file_based_external_account_with_configure_token_lifetime
E               ^
E   SyntaxError: invalid syntax

@clundin25 clundin25 added the kokoro:run Add this label to force Kokoro to re-run the tests. label Aug 1, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Aug 1, 2022
@clundin25 clundin25 added the kokoro:run Add this label to force Kokoro to re-run the tests. label Aug 1, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Aug 1, 2022
@clundin25 clundin25 added the owlbot:run Add this label to trigger the Owlbot post processor. label Aug 1, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Aug 1, 2022
token_url,
credential_source=None,
service_account_impersonation_url=None,
service_account_impersonation_options={},
Copy link
Contributor

@clundin25 clundin25 Aug 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I missed this earlier, it seems you have hit a weird edge case. This will create a shared dictionary in all calls, this is not your intent correct?

https://docs.python-guide.org/writing/gotchas/#mutable-default-arguments

Copy link
Contributor

@clundin25 clundin25 Aug 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is an example in a Python3 shell:

❯ python
Python 3.10.4 (main, Jul 19 2022, 20:41:22) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> def foo(x, y, d={}):
...     d[x] = y
...     return d
...
>>> foo('x', 'y')
{'x': 'y'}
>>> foo('z', 'g')
{'x': 'y', 'z': 'g'}
>>>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed to follow up with a fix for this

@clundin25 clundin25 merged commit 0dc6a9a into googleapis:main Aug 1, 2022
@ScruffyProdigy ScruffyProdigy deleted the lifetime branch August 1, 2022 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants