{"action":"created","issue":{"url":"https://api.github.com/repos/apache/incubator-airflow/issues/2880","repository_url":"https://api.github.com/repos/apache/incubator-airflow","labels_url":"https://api.github.com/repos/apache/incubator-airflow/issues/2880/labels{/name}","comments_url":"https://api.github.com/repos/apache/incubator-airflow/issues/2880/comments","events_url":"https://api.github.com/repos/apache/incubator-airflow/issues/2880/events","html_url":"https://github.com/apache/incubator-airflow/pull/2880","id":282094833,"number":2880,"title":"[AIRFLOW-1916] Don't upload logs to remote from `run --raw`","user":{"login":"ashb","id":34150,"avatar_url":"https://avatars2.githubusercontent.com/u/34150?v=4","gravatar_id":"","url":"https://api.github.com/users/ashb","html_url":"https://github.com/ashb","followers_url":"https://api.github.com/users/ashb/followers","following_url":"https://api.github.com/users/ashb/following{/other_user}","gists_url":"https://api.github.com/users/ashb/gists{/gist_id}","starred_url":"https://api.github.com/users/ashb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashb/subscriptions","organizations_url":"https://api.github.com/users/ashb/orgs","repos_url":"https://api.github.com/users/ashb/repos","events_url":"https://api.github.com/users/ashb/events{/privacy}","received_events_url":"https://api.github.com/users/ashb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-12-14T13:08:15Z","updated_at":"2017-12-14T16:47:51Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/apache/incubator-airflow/pulls/2880","html_url":"https://github.com/apache/incubator-airflow/pull/2880","diff_url":"https://github.com/apache/incubator-airflow/pull/2880.diff","patch_url":"https://github.com/apache/incubator-airflow/pull/2880.patch"},"body":"Make sure you have checked _all_ steps below.\r\n\r\n### JIRA\r\n- [x] 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-1916\r\n\r\n### Description\r\n- [x] In a previous change we removed special config for airflow.task.raw handler (which\r\nprinted to stdout directly) and replaced it with one that wrote to the\r\nlog file itself. The problem comes that python automatically calls\r\n`logging.shutdown()` itself on process clean exit. This ended up\r\nuploading the log file twice: once from the end of `airflow run --raw`,\r\nand then again from the explicit shutdown() call at the end of cli's\r\n`run()`\r\n\r\n  Since logging is automatically shutdown this change adds and explicit\r\nflag to control if the GC and S3 handlers should upload the file or not,\r\nand we tell them not to when running with `--raw`.\r\n\r\n### Tests\r\n- [x] My PR adds the following unit tests: expanded on tests to S3 and Base log handlers.\r\n\r\n\r\n### Commits\r\n- [x] 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    2. Subject is limited to 50 characters\r\n    3. Subject does not end with a period\r\n    4. Subject uses the imperative mood (\"add\", not \"adding\")\r\n    5. Body wraps at 72 characters\r\n    6. Body explains \"what\" and \"why\", not \"how\"\r\n\r\n- [x] Passes `git diff upstream/master -u -- \"*.py\" | flake8 --diff`\r\n"},"comment":{"url":"https://api.github.com/repos/apache/incubator-airflow/issues/comments/351767985","html_url":"https://github.com/apache/incubator-airflow/pull/2880#issuecomment-351767985","issue_url":"https://api.github.com/repos/apache/incubator-airflow/issues/2880","id":351767985,"user":{"login":"codecov-io","id":8655789,"avatar_url":"https://avatars0.githubusercontent.com/u/8655789?v=4","gravatar_id":"","url":"https://api.github.com/users/codecov-io","html_url":"https://github.com/codecov-io","followers_url":"https://api.github.com/users/codecov-io/followers","following_url":"https://api.github.com/users/codecov-io/following{/other_user}","gists_url":"https://api.github.com/users/codecov-io/gists{/gist_id}","starred_url":"https://api.github.com/users/codecov-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codecov-io/subscriptions","organizations_url":"https://api.github.com/users/codecov-io/orgs","repos_url":"https://api.github.com/users/codecov-io/repos","events_url":"https://api.github.com/users/codecov-io/events{/privacy}","received_events_url":"https://api.github.com/users/codecov-io/received_events","type":"User","site_admin":false},"created_at":"2017-12-14T16:47:51Z","updated_at":"2017-12-14T16:47:51Z","author_association":"NONE","body":"# [Codecov](https://codecov.io/gh/apache/incubator-airflow/pull/2880?src=pr&el=h1) Report\n> Merging [#2880](https://codecov.io/gh/apache/incubator-airflow/pull/2880?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-airflow/commit/3aa7ffa64e0ae0b40d058e781d9a7ca8427ecbb7?src=pr&el=desc) will **decrease** coverage by `<.01%`.\n> The diff coverage is `60%`.\n\n[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-airflow/pull/2880/graphs/tree.svg?token=WdLKlKHOAU&src=pr&height=150&width=650)](https://codecov.io/gh/apache/incubator-airflow/pull/2880?src=pr&el=tree)\n\n```diff\n@@            Coverage Diff             @@\n##           master    #2880      +/-   ##\n==========================================\n- Coverage   73.48%   73.47%   -0.01%     \n==========================================\n  Files         160      160              \n  Lines       12179    12187       +8     \n==========================================\n+ Hits         8950     8955       +5     \n- Misses       3229     3232       +3\n```\n\n\n| [Impacted Files](https://codecov.io/gh/apache/incubator-airflow/pull/2880?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [airflow/utils/log/gcs\\_task\\_handler.py](https://codecov.io/gh/apache/incubator-airflow/pull/2880/diff?src=pr&el=tree#diff-YWlyZmxvdy91dGlscy9sb2cvZ2NzX3Rhc2tfaGFuZGxlci5weQ==) | `0% <0%> (ø)` | :arrow_up: |\n| [airflow/models.py](https://codecov.io/gh/apache/incubator-airflow/pull/2880/diff?src=pr&el=tree#diff-YWlyZmxvdy9tb2RlbHMucHk=) | `86.98% <100%> (ø)` | :arrow_up: |\n| [airflow/utils/log/s3\\_task\\_handler.py](https://codecov.io/gh/apache/incubator-airflow/pull/2880/diff?src=pr&el=tree#diff-YWlyZmxvdy91dGlscy9sb2cvczNfdGFza19oYW5kbGVyLnB5) | `97.14% <100%> (+16.83%)` | :arrow_up: |\n| [airflow/bin/cli.py](https://codecov.io/gh/apache/incubator-airflow/pull/2880/diff?src=pr&el=tree#diff-YWlyZmxvdy9iaW4vY2xpLnB5) | `55% <100%> (+0.08%)` | :arrow_up: |\n| [airflow/task\\_runner/bash\\_task\\_runner.py](https://codecov.io/gh/apache/incubator-airflow/pull/2880/diff?src=pr&el=tree#diff-YWlyZmxvdy90YXNrX3J1bm5lci9iYXNoX3Rhc2tfcnVubmVyLnB5) | `93.33% <0%> (-6.67%)` | :arrow_down: |\n| [airflow/utils/helpers.py](https://codecov.io/gh/apache/incubator-airflow/pull/2880/diff?src=pr&el=tree#diff-YWlyZmxvdy91dGlscy9oZWxwZXJzLnB5) | `53.44% <0%> (-2.88%)` | :arrow_down: |\n| [airflow/jobs.py](https://codecov.io/gh/apache/incubator-airflow/pull/2880/diff?src=pr&el=tree#diff-YWlyZmxvdy9qb2JzLnB5) | `79.44% <0%> (-0.45%)` | :arrow_down: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-airflow/pull/2880?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/apache/incubator-airflow/pull/2880?src=pr&el=footer). Last update [3aa7ffa...7a47ba4](https://codecov.io/gh/apache/incubator-airflow/pull/2880?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n"}}
{"actor":{"display_login":"codecov-io"}}