You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What kind of breaking changes they are @uranusjr ?
They are not immediately visible. Can we make it backwards-compatible instead?
I would not introduce backwards incompatibility unless we really have a good reason.
On the surface level, the AwsBaseHook.expand_role() now calls _get_credentials() with no arguments, which is not supported on older versions, and thus if someone subclasses the hook to reimplement _get_credentials(), the code would break after upgrade.
More deeply though, expand_role() used to depend on boto’s get_client_type() with a dynamic client type, which is deprecated in newer Boto versions. Tt now uses _get_credentials() instead to avoid the deprecation. But expand_role() does not tak a region argument and therefore cannot pass one to _get_credentials(). If we keep compatibility on _get_credentials(), we’d break compatibility on expand_role() instead.
More deeply though, expand_role() used to depend on boto’s get_client_type() with a dynamic client type, which is deprecated in newer Boto versions. Tt now uses _get_credentials() instead to avoid the deprecation. But expand_role() does not tak a region argument and therefore cannot pass one to _get_credentials(). If we keep compatibility on _get_credentials(), we’d break compatibility on expand_role() instead.
Can't we pass None explicitly as region from the expand_role() and leave the region argument Optional but without default ?
Hmm, I think so. And maybe expand_role() should gain an optional region_name argument as well (defaulting to None and never explicitly used in the provider until 3.0).
Activity
kaxil commentedon Dec 21, 2021
cc @potiuk
potiuk commentedon Dec 21, 2021
What kind of breaking changes they are @uranusjr ?
They are not immediately visible. Can we make it backwards-compatible instead?
I would not introduce backwards incompatibility unless we really have a good reason.
uranusjr commentedon Dec 22, 2021
On the surface level, the
AwsBaseHook.expand_role()now calls_get_credentials()with no arguments, which is not supported on older versions, and thus if someone subclasses the hook to reimplement_get_credentials(), the code would break after upgrade.More deeply though,
expand_role()used to depend on boto’sget_client_type()with a dynamic client type, which is deprecated in newer Boto versions. Tt now uses_get_credentials()instead to avoid the deprecation. Butexpand_role()does not tak a region argument and therefore cannot pass one to_get_credentials(). If we keep compatibility on_get_credentials(), we’d break compatibility onexpand_role()instead.potiuk commentedon Dec 22, 2021
Can't we pass
Noneexplicitly asregionfrom theexpand_role()and leave theregionargument Optional but without default ?uranusjr commentedon Dec 22, 2021
Hmm, I think so. And maybe
expand_role()should gain an optionalregion_nameargument as well (defaulting to None and never explicitly used in the provider until 3.0).potiuk commentedon Dec 22, 2021
Yeah. Seems to small af a thing to make whole provider backwards incompatible.
[-]Release 3.0.0 of Amazon Provider[/-][+]Release 2.5.1 of Amazon Provider[/+]Fix backwards compatibility issue in AWS provider's _get_credentials (#…