{"action":"created","issue":{"url":"https://api.github.com/repos/openebs/litmus/issues/260","repository_url":"https://api.github.com/repos/openebs/litmus","labels_url":"https://api.github.com/repos/openebs/litmus/issues/260/labels{/name}","comments_url":"https://api.github.com/repos/openebs/litmus/issues/260/comments","events_url":"https://api.github.com/repos/openebs/litmus/issues/260/events","html_url":"https://github.com/openebs/litmus/issues/260","id":367426347,"node_id":"MDU6SXNzdWUzNjc0MjYzNDc=","number":260,"title":"Update litmus test playbooks to use RUN_ID/instance metadata ","user":{"login":"ksatchit","id":21166217,"node_id":"MDQ6VXNlcjIxMTY2MjE3","avatar_url":"https://avatars0.githubusercontent.com/u/21166217?v=4","gravatar_id":"","url":"https://api.github.com/users/ksatchit","html_url":"https://github.com/ksatchit","followers_url":"https://api.github.com/users/ksatchit/followers","following_url":"https://api.github.com/users/ksatchit/following{/other_user}","gists_url":"https://api.github.com/users/ksatchit/gists{/gist_id}","starred_url":"https://api.github.com/users/ksatchit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksatchit/subscriptions","organizations_url":"https://api.github.com/users/ksatchit/orgs","repos_url":"https://api.github.com/users/ksatchit/repos","events_url":"https://api.github.com/users/ksatchit/events{/privacy}","received_events_url":"https://api.github.com/users/ksatchit/received_events","type":"User","site_admin":false},"labels":[{"id":1069562035,"node_id":"MDU6TGFiZWwxMDY5NTYyMDM1","url":"https://api.github.com/repos/openebs/litmus/labels/Hacktoberfest","name":"Hacktoberfest","color":"cc317c","default":false},{"id":1069563105,"node_id":"MDU6TGFiZWwxMDY5NTYzMTA1","url":"https://api.github.com/repos/openebs/litmus/labels/ansible","name":"ansible","color":"e6f984","default":false},{"id":561106981,"node_id":"MDU6TGFiZWw1NjExMDY5ODE=","url":"https://api.github.com/repos/openebs/litmus/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":915453714,"node_id":"MDU6TGFiZWw5MTU0NTM3MTQ=","url":"https://api.github.com/repos/openebs/litmus/labels/good%20first%20issue","name":"good first issue","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-06T05:43:09Z","updated_at":"2018-10-06T17:30:40Z","closed_at":null,"author_association":"MEMBER","body":"<!-- This form is for bug reports and feature requests ONLY! -->\r\n<!-- Thanks for filing an issue! Before hitting the button, please answer these questions.-->\r\n\r\n## Is this a BUG REPORT or FEATURE REQUEST?\r\nFEATURE REQUEST\r\n\r\n<!--\r\nIf this is a BUG REPORT, please:\r\n  - Fill in as much of the template below as you can.  If you leave out information, we can't help you as well.\r\n\r\nIf this is a FEATURE REQUEST, please:\r\n  - Describe *in detail* the feature/behavior/change you'd like to see.\r\n\r\nIn both cases, be ready for followup questions, and please respond in a timely\r\nmanner.  If we can't reproduce a bug or think a feature already exists, we\r\nmight close your issue.  If we're wrong, PLEASE feel free to reopen it and\r\nexplain why.\r\n-->\r\n\r\n**What happened**:\r\n\r\n- All litmus jobs update the result of the test in a result custom resource (CR), which derives it's name from the test_name. See below for reference: \r\n\r\ntest_name_var: https://github.com/openebs/litmus/blob/master/apps/percona/chaos/openebs_replica_network_delay/test_vars.yml#L1\r\n\r\nlitmus_cr_template_being_passed_the_test_name: https://github.com/openebs/litmus/blob/master/apps/percona/chaos/openebs_replica_network_delay/test.yml#L118\r\n\r\n- The test_name itself has been burned into the ansible playbook so as to reflect, meaningfully, what it intends to do.\r\n\r\n- Now, consider the case where the same test is repeated OR executed in parallel, say with different set of params (such as ns, app-labels etc.,) which are provided as ENV configurables . This will cause the re-use of the same custom resource (as the test_name is same) - causing user to consume incorrect result info. \r\n\r\n- This is avoided by providing the litmus jobs with an ability to define \"run-instance-metadata\" or, say some \"run-id\" - which can be added as an job/pod ENV - which will be appended to the test_name before creating the litmus result custom resource. Refer: \r\n\r\n```\r\n- block:\r\n      - name: Record test instance/run ID\r\n         set_fact:\r\n            run_id: \"{{ lookup('env','RUN_ID') }}\"\r\n\r\n      - name: Construct testname appended with runID\r\n         set_fact:\r\n            test_name: \"{{ test_name }}-{{ run_id }}\"\r\n\r\n   when: lookup('env','RUN_ID')\r\n```\r\n- Currently, the above logic is available for deployer & chaos litmusbooks, but is not available for other litmusbooks such as workload-generators. \r\n\r\n**What you expected to happen**:\r\n\r\n- All litmusbooks should contain the logic to append RUN_ID - if available to the test_name before deploying the result CR.\r\n\r\n**How to fix it (as minimally and precisely as possible)**:\r\n\r\n- Audit the litmus test playbooks (typically, `test.yml`) and add the above. \r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/openebs/litmus/issues/comments/427592195","html_url":"https://github.com/openebs/litmus/issues/260#issuecomment-427592195","issue_url":"https://api.github.com/repos/openebs/litmus/issues/260","id":427592195,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzU5MjE5NQ==","user":{"login":"Skchoudhary","id":15611967,"node_id":"MDQ6VXNlcjE1NjExOTY3","avatar_url":"https://avatars1.githubusercontent.com/u/15611967?v=4","gravatar_id":"","url":"https://api.github.com/users/Skchoudhary","html_url":"https://github.com/Skchoudhary","followers_url":"https://api.github.com/users/Skchoudhary/followers","following_url":"https://api.github.com/users/Skchoudhary/following{/other_user}","gists_url":"https://api.github.com/users/Skchoudhary/gists{/gist_id}","starred_url":"https://api.github.com/users/Skchoudhary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skchoudhary/subscriptions","organizations_url":"https://api.github.com/users/Skchoudhary/orgs","repos_url":"https://api.github.com/users/Skchoudhary/repos","events_url":"https://api.github.com/users/Skchoudhary/events{/privacy}","received_events_url":"https://api.github.com/users/Skchoudhary/received_events","type":"User","site_admin":false},"created_at":"2018-10-06T17:30:40Z","updated_at":"2018-10-06T17:30:40Z","author_association":"CONTRIBUTOR","body":"Hi @ksatchit , I would like to work on this issue."}}
{"actor":{"display_login":"Skchoudhary"}}