Swarming: Patches Auth default credentials at startup#5245
Swarming: Patches Auth default credentials at startup#5245
Conversation
|
|
||
| def patched_default_credentials( | ||
| *args, **kwargs) -> tuple[compute_engine.Credentials, str] | None: | ||
| # pylint: disable=unused-argument |
There was a problem hiding this comment.
Note: We have the args and kwargs in the method signature because otherwise if we call the default() method with any args an exception would be thrown because the patch didn't matched the expected signature.
There was a problem hiding this comment.
Changing the function signature to this should fix it without having this pylint directive.
def patched_default_credentials(*_args, **_kwargs) -> tuple[compute_engine.Credentials, str] | None:
| pass | ||
|
|
||
| if not project_id: | ||
| print('''[Swarming] [Error] Failed to patch google.auth.default. |
There was a problem hiding this comment.
This will be logged into swarming only, not GCP, since when this executes we still haven't setup GCP logging
|
I'm confused and need some more details. I was assuming that In general, do you have a bug link for this that we can discuss more on? |
Sure heres the bug im using: Regarding You can also think of it like its a kind of a proxy running in your swarming bot. |
Fuzzing tasks in swarming have an intermittent error in which startup of any gcp library or module fails with:
This happens because the timeout window for calling the default credentials is very short, and since we are using a
luci-authserver the requests tend to take a little bit more time than the server in GCE bots.To fix this, we are manually patching the
google.auth.defaultmodule to return some credentials that do come from the swarming bot.Tests performed
This changes have been present in the
devenv since April 15th, which allowed us to perform some fuzzing sessions in swarming like this one