-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Breaking change in MachineAuthProvider constructor #25532
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I propose we keep the original design, but update the sig to conform with how this is actually used, which assumes that the overrides are actually Optional arguments that default to None
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but hoping we can clean this up properly in the next major version to have the same number of overrides as auth methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but would be great if there was a test or two for this :D
@kgabryje would you mind adding your testing instructions? |
Thanks for reviews! |
SUMMARY
A change introduced in #25247 in MachineAuthProvider caused some custom auth providers to be broken, because of unexpected second argument passed to the constructor. This PR reverts that behaviour and .allows only passing either Selenium or Playwright override auth function, not both at the same time.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
MACHINE_AUTH_PROVIDER_CLASS
that inherits fromMachineAuthProvider
and uses an__init__
method that accepts only 1 argument - custom auth function (existing implementations follow this pattern)ADDITIONAL INFORMATION