{"action":"created","issue":{"url":"https://api.github.com/repos/datawire/ambassador/issues/1570","repository_url":"https://api.github.com/repos/datawire/ambassador","labels_url":"https://api.github.com/repos/datawire/ambassador/issues/1570/labels{/name}","comments_url":"https://api.github.com/repos/datawire/ambassador/issues/1570/comments","events_url":"https://api.github.com/repos/datawire/ambassador/issues/1570/events","html_url":"https://github.com/datawire/ambassador/issues/1570","id":448778614,"node_id":"MDU6SXNzdWU0NDg3Nzg2MTQ=","number":1570,"title":"\"retry_policy\" supports only one \"retry_on\" condition","user":{"login":"pjeziorowski","id":44570539,"node_id":"MDQ6VXNlcjQ0NTcwNTM5","avatar_url":"https://avatars0.githubusercontent.com/u/44570539?v=4","gravatar_id":"","url":"https://api.github.com/users/pjeziorowski","html_url":"https://github.com/pjeziorowski","followers_url":"https://api.github.com/users/pjeziorowski/followers","following_url":"https://api.github.com/users/pjeziorowski/following{/other_user}","gists_url":"https://api.github.com/users/pjeziorowski/gists{/gist_id}","starred_url":"https://api.github.com/users/pjeziorowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjeziorowski/subscriptions","organizations_url":"https://api.github.com/users/pjeziorowski/orgs","repos_url":"https://api.github.com/users/pjeziorowski/repos","events_url":"https://api.github.com/users/pjeziorowski/events{/privacy}","received_events_url":"https://api.github.com/users/pjeziorowski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-05-27T10:18:30Z","updated_at":"2019-06-12T16:01:49Z","closed_at":null,"author_association":"NONE","body":"**Description**\r\nEnvoy allows to provide more than one \"retry_on\" condition in \"retry_policy\" i.e.\r\n```\r\n\"retry_policy\": {\r\n\"retry_on\": \"connect-failure,retriable-status-codes,refused-stream\",\r\n\"num_retries\": 2\r\n}\r\n```\r\nHowever, using \r\n```\r\n\"retry_on\": \"connect-failure,retriable-status-codes,refused-stream\"\r\n```\r\nin Ambassador's mapping config results in error in Ambassador retry policy configuration.\r\n\r\nSteps to reproduce the behavior:\r\n1. Create mapping with specified \"retry_policy\" with more than one \"retry_on\" condition i.e.\r\n```\r\n      apiVersion: ambassador/v1\r\n      kind:  Mapping\r\n      name: {{ include \"xxx.yyy.zzz .}}_mapping\r\n      prefix: /{{ include \"ccc.vvv.bbb\" .}}\r\n      service: https://{{ include \"ccc.vvv.bbb\" .}}.{{ .Release.Namespace }}.svc.cluster.local.:80\r\n      tls: upstream\r\n      retry_policy:\r\n        retry_on: \"connect-failure,5xx,retriable-4xx,\"\r\n        num_retries: 2\r\n```\r\n2. Apply mapping from above.\r\n\r\n3. See error in Ambassador Diagnostic Overview ->\r\nir.retrypolicy: Invalid retry policy specified: <IRRetryPolicy ir.retrypolicy>\r\n\r\n**Expected behavior**\r\nAmbassador's retry policy should be able to handle multiple values in \"retry_on\" to reflect Envoy retry capabilities.\r\n\r\n**Affected version**\r\nAffected version -> Ambassador: 0.61.1\r\n\r\n**Additional context**\r\nMethod that validates \"retry_on\" value:\r\n\r\nambassador/ambassador/ir/irretrypolicy.py \r\n```\r\n def validate_retry_policy(self) -> bool:\r\n        retry_on = self.get('retry_on', None)\r\n\r\n        is_valid = False\r\n        if retry_on in [ '5xx', 'gateway-error', 'connect-failure', 'retriable-4xx', 'refused-stream', 'retriable-status-codes' ]:\r\n            return True\r\n\r\n        return is_valid\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/datawire/ambassador/issues/comments/501340860","html_url":"https://github.com/datawire/ambassador/issues/1570#issuecomment-501340860","issue_url":"https://api.github.com/repos/datawire/ambassador/issues/1570","id":501340860,"node_id":"MDEyOklzc3VlQ29tbWVudDUwMTM0MDg2MA==","user":{"login":"danielbryantuk","id":2379163,"node_id":"MDQ6VXNlcjIzNzkxNjM=","avatar_url":"https://avatars2.githubusercontent.com/u/2379163?v=4","gravatar_id":"","url":"https://api.github.com/users/danielbryantuk","html_url":"https://github.com/danielbryantuk","followers_url":"https://api.github.com/users/danielbryantuk/followers","following_url":"https://api.github.com/users/danielbryantuk/following{/other_user}","gists_url":"https://api.github.com/users/danielbryantuk/gists{/gist_id}","starred_url":"https://api.github.com/users/danielbryantuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielbryantuk/subscriptions","organizations_url":"https://api.github.com/users/danielbryantuk/orgs","repos_url":"https://api.github.com/users/danielbryantuk/repos","events_url":"https://api.github.com/users/danielbryantuk/events{/privacy}","received_events_url":"https://api.github.com/users/danielbryantuk/received_events","type":"User","site_admin":false},"created_at":"2019-06-12T16:01:49Z","updated_at":"2019-06-12T16:01:49Z","author_association":"CONTRIBUTOR","body":"Someone else has reported the same error in the Datawire OSS Slack, too. @kflynn -- this may be a candidate fix for an upcoming release?"}}
{"actor":{"display_login":"danielbryantuk"}}