{"push_id":2360483373,"size":1,"distinct_size":1,"ref":"refs/heads/6.x","head":"b91e2d5cec58d2506472b2519b32c236a16bb5da","before":"a1d022038da7d11c33befa7cd8bc6ab741b86bfa","commits":[{"sha":"b91e2d5cec58d2506472b2519b32c236a16bb5da","author":{"name":"David Pilato","email":"d8099b0f90e53c29d29eb12a7a3caa5af4f12681@pilato.fr"},"message":"Fix NPE when using deprecated Azure settings (#28769)\n\n* Fix NPE when using deprecated Azure settings\r\n\r\nWhen someone migrates from 5.6 to 6.x with deprecated settings like:\r\n\r\n```\r\ncloud:\r\n    azure:\r\n        storage:\r\n            foo:\r\n                account: <my_account>\r\n                key: <my_key>\r\n```\r\n\r\nIt produces a NPE anytime someone wants to use a repository which name is not `default`.\r\n\r\nThis has been introduced by #23518 when I backported it to 6.x branch.\r\nIn this case, when we generate an OperationContext, we only try to get azure settings from \"normal\" `storageSettings` with:\r\n\r\n```java\r\nthis.storageSettings.get(clientName)\r\n```\r\n\r\nBut in the context of deprecated settings, this returns `null` which causes the NPE just after.\r\n\r\nThis commit adds a check and if no settings are found in the \"normal\" `storageSettings`, we look at settings from `deprecatedStorageSettings`.\r\nThe reason I missed it in the 7.0 version (master branch) is because actually `deprecatedStorageSettings` has been removed there already.\r\n\r\nAlso I renamed the `testGetSelectedClientDefault` method to `testGenerateOperationContext`\r\nas it was only doing exactly the same thing as `testGetDefaultClientWithPrimaryAndSecondaries`.\r\n\r\nCloses #28299.","distinct":true,"url":"https://api.github.com/repos/elastic/elasticsearch/commits/b91e2d5cec58d2506472b2519b32c236a16bb5da"}]}
{"actor":{"display_login":"dadoonet"}}