{"action":"created","issue":{"url":"https://api.github.com/repos/apache/airflow/issues/6644","repository_url":"https://api.github.com/repos/apache/airflow","labels_url":"https://api.github.com/repos/apache/airflow/issues/6644/labels{/name}","comments_url":"https://api.github.com/repos/apache/airflow/issues/6644/comments","events_url":"https://api.github.com/repos/apache/airflow/issues/6644/events","html_url":"https://github.com/apache/airflow/pull/6644","id":527450087,"node_id":"MDExOlB1bGxSZXF1ZXN0MzQ0NzI4NDA2","number":6644,"title":"[AIRFLOW-6047] Simplify the logging configuration template","user":{"login":"mik-laj","id":12058428,"node_id":"MDQ6VXNlcjEyMDU4NDI4","avatar_url":"https://avatars1.githubusercontent.com/u/12058428?v=4","gravatar_id":"","url":"https://api.github.com/users/mik-laj","html_url":"https://github.com/mik-laj","followers_url":"https://api.github.com/users/mik-laj/followers","following_url":"https://api.github.com/users/mik-laj/following{/other_user}","gists_url":"https://api.github.com/users/mik-laj/gists{/gist_id}","starred_url":"https://api.github.com/users/mik-laj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mik-laj/subscriptions","organizations_url":"https://api.github.com/users/mik-laj/orgs","repos_url":"https://api.github.com/users/mik-laj/repos","events_url":"https://api.github.com/users/mik-laj/events{/privacy}","received_events_url":"https://api.github.com/users/mik-laj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2019-11-22T22:45:40Z","updated_at":"2019-11-24T08:50:37Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/apache/airflow/pulls/6644","html_url":"https://github.com/apache/airflow/pull/6644","diff_url":"https://github.com/apache/airflow/pull/6644.diff","patch_url":"https://github.com/apache/airflow/pull/6644.patch"},"body":"There are several problems in this file:\r\n\r\n* The configuration - REMOTE_HANDLERS is stored in a dictionary. In the next step the item are got based on the key. There is no reason why this cannot be done using variables. This will increase the complexity of the file\r\n* Variables are always created as global if a smaller scope can be used\r\n\r\nI also created a section only regarding the remote logging configuration. \r\n\r\nMake sure you have checked _all_ steps below.\r\n\r\n### Jira\r\n\r\n- [ ] My PR addresses the following [Airflow Jira](https://issues.apache.org/jira/browse/AIRFLOW/) issues and references them in the PR title. For example, \"\\[AIRFLOW-XXX\\] My Airflow PR\"\r\n  - https://issues.apache.org/jira/browse/AIRFLOW-XXX\r\n  - In case you are fixing a typo in the documentation you can prepend your commit with \\[AIRFLOW-XXX\\], code changes always need a Jira issue.\r\n  - In case you are proposing a fundamental code change, you need to create an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)).\r\n  - In case you are adding a dependency, check if the license complies with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).\r\n\r\n### Description\r\n\r\n- [ ] Here are some details about my PR, including screenshots of any UI changes:\r\n\r\n### Tests\r\n\r\n- [ ] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:\r\n\r\n### Commits\r\n\r\n- [ ] My commits all reference Jira issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from \"[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)\":\r\n  1. Subject is separated from body by a blank line\r\n  1. Subject is limited to 50 characters (not including Jira issue reference)\r\n  1. Subject does not end with a period\r\n  1. Subject uses the imperative mood (\"add\", not \"adding\")\r\n  1. Body wraps at 72 characters\r\n  1. Body explains \"what\" and \"why\", not \"how\"\r\n\r\n### Documentation\r\n\r\n- [ ] In case of new functionality, my PR adds documentation that describes how to use it.\r\n  - All the public functions and the classes in the PR contain docstrings that explain what it does\r\n  - If you implement backwards incompatible changes, please leave a note in the [Updating.md](https://github.com/apache/airflow/blob/master/UPDATING.md) so we can assign it to a appropriate release\r\n"},"comment":{"url":"https://api.github.com/repos/apache/airflow/issues/comments/557869288","html_url":"https://github.com/apache/airflow/pull/6644#issuecomment-557869288","issue_url":"https://api.github.com/repos/apache/airflow/issues/6644","id":557869288,"node_id":"MDEyOklzc3VlQ29tbWVudDU1Nzg2OTI4OA==","user":{"login":"mik-laj","id":12058428,"node_id":"MDQ6VXNlcjEyMDU4NDI4","avatar_url":"https://avatars1.githubusercontent.com/u/12058428?v=4","gravatar_id":"","url":"https://api.github.com/users/mik-laj","html_url":"https://github.com/mik-laj","followers_url":"https://api.github.com/users/mik-laj/followers","following_url":"https://api.github.com/users/mik-laj/following{/other_user}","gists_url":"https://api.github.com/users/mik-laj/gists{/gist_id}","starred_url":"https://api.github.com/users/mik-laj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mik-laj/subscriptions","organizations_url":"https://api.github.com/users/mik-laj/orgs","repos_url":"https://api.github.com/users/mik-laj/repos","events_url":"https://api.github.com/users/mik-laj/events{/privacy}","received_events_url":"https://api.github.com/users/mik-laj/received_events","type":"User","site_admin":false},"created_at":"2019-11-24T08:50:37Z","updated_at":"2019-11-24T08:50:37Z","author_association":"MEMBER","body":"I would dream that the whole configuration was expressed as Python code. \r\nThen in the HOME directory we would have settings.py with the following content:\r\n```\r\nfrom airflow.settings import *\r\n```\r\nAnd the airflow.settings file would contain default value definitions that could be overwritten in settings.py.\r\n```\r\nENABLE_AWESOME_FEATURE = True\r\n```\r\nThis would allow much greater freedom and create more complex objects, e.g. dictionaries. \r\n\r\nThis is how Django is configured.\r\nhttps://docs.djangoproject.com/en/2.2/topics/settings/\r\nhttps://github.com/joke2k/django-environ"}}
{"actor":{"display_login":"mik-laj"}}