Skip to content

[AIRFLOW-4034] Make string formatting explicit by removing **locals()#4861

Merged
Fokko merged 1 commit intoapache:masterfrom
BasPH:bash-remove-locals-globals
Apr 2, 2019
Merged

[AIRFLOW-4034] Make string formatting explicit by removing **locals()#4861
Fokko merged 1 commit intoapache:masterfrom
BasPH:bash-remove-locals-globals

Conversation

@BasPH
Copy link
Copy Markdown
Contributor

@BasPH BasPH commented Mar 7, 2019

Make sure you have checked all steps below.

Jira

Description

  • Here are some details about my PR, including screenshots of any UI changes:

I've replaced all "...{var}...".format(**locals()) by:

  • "...{var}...".format(var=var) if string
  • "...%s...", myvar if used in logging

because it is explicit what variables are used in the string formatting.

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:

Commits

  • 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":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Documentation

  • In case of new functionality, my PR adds documentation that describes how to use it.
    • When adding new operators/hooks/sensors, the autoclass documentation generation needs to be added.
    • All the public functions and the classes in the PR contain docstrings that explain what it does
    • If you implement backwards incompatible changes, please leave a note in the Updating.md so we can assign it to a appropriate release

Code Quality

  • Passes flake8

@BasPH BasPH changed the title [AIRFLOW-4034] Remove unnecessary string formatting with **locals() [AIRFLOW-4034] Make string formatting explicit by removing **locals() Mar 7, 2019
Comment thread airflow/configuration.py Outdated
Copy link
Copy Markdown
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @BasPH for picking this up!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol

@Fokko
Copy link
Copy Markdown
Contributor

Fokko commented Mar 17, 2019

Sad CI:

[31m======================================================================�[0m
�[31m45) FAIL: test_dag_run_link (tests.www.test_utils.UtilsTest)�[0m
�[31m----------------------------------------------------------------------�[0m
�[0m   Traceback (most recent call last):�[0m
    �[34mtests/www/test_utils.py�[0m line �[1m�[36m200�[0m�[0m in �[36mtest_dag_run_link�[0m
      self.assertNotIn('<b2>', html)
�[31m   �[31m�[1m�[31mAssertionError�[0m�[0m�[31m: �[0m�[31m'<b2>' unexpectedly found in '<a href="/graph?execution_date=2019-03-15+17%3A24%3A24.358817&dag_id=%3Ca%261%3E&run_id=%3Cb2%3E"><b2></a>'�[0m
�[31m======================================================================�[0m
�[31m46) FAIL: test_state_token (tests.www.test_utils.UtilsTest)�[0m
�[31m----------------------------------------------------------------------�[0m
�[0m   Traceback (most recent call last):�[0m
    �[34mtests/www/test_utils.py�[0m line �[1m�[36m155�[0m�[0m in �[36mtest_state_token�[0m
      html,
�[31m   �[31m�[1m�[31mAssertionError�[0m�[0m�[31m: �[0m�[31m'&lt;script&gt;alert(1)&lt;/script&gt;' not found in '<span class="label" style="background-color:white;"><script>alert(1)</script></span>'�[0m
�[31m======================================================================�[0m
�[31m47) FAIL: test_task_instance_link (tests.www.test_utils.UtilsTest)�[0m
�[31m----------------------------------------------------------------------�[0m
�[0m   Traceback (most recent call last):�[0m
    �[34mtests/www/test_utils.py�[0m line �[1m�[36m175�[0m�[0m in �[36mtest_task_instance_link�[0m
      self.assertNotIn('<b2>', html)
�[31m   �[31m�[1m�[31mAssertionError�[0m�[0m�[31m: �[0m�[31m'<b2>' unexpectedly found in '\n        <span style="white-space: nowrap;">\n        <a href="/task?task_id=%3Cb2%3E&execution_date=2019-03-15T17%3A24%3A24.397494&dag_id=%3Ca%261%3E"><b2></a>\n        <a href="/graph?root=%3Cb2%3E&execution_date=2019-03-15T17%3A24%3A24.397494&dag_id=%3Ca%261%3E" title="Filter on this task and upstream">\n        <span class="glyphicon glyphicon-filter" style="margin-left: 0px;"\n            aria-hidden="true"></span>\n        </a>\n        </span>\n        '�[0m
�[31m======================================================================�[0m
�[31m48) FAIL: test_odd_name (tests.www.test_views.TestPoolModelView)�[0m
�[31m----------------------------------------------------------------------�[0m
�[0m   Traceback (most recent call last):�[0m
    �[34mtests/www/test_views.py�[0m line �[1m�[36m269�[0m�[0m in �[36mtest_odd_name�[0m
      self.check_content_in_response('test-pool&lt;script&gt;', resp)
    �[34mtests/www/test_views.py�[0m line �[1m�[36m101�[0m�[0m in �[36mcheck_content_in_response�[0m
      self.assertIn(text, resp_html)
�[31m   �[31m�[1m�[31mAssertionError�[0m�[0m�[31m: �[0m�[31m'test-pool&lt;script&gt;' not found in u'\n\n\n\n\n    \n\n\n<!DOCTYPE html>\n<html>\n  <head>\n    <title>Airflow</title>\n\n    \n        <meta name="viewport" content="width=device-width, initial-scale=1.0">\n        <meta name="description" content="">\n        <meta name="author" content="">\n    \n    \n  \n        <link href="/static/appbuilder/css/bootstrap.min.css" rel="stylesheet">\n        <link href="/static/appbuilder/css/font-awesome.min.css" rel="stylesheet">\n        \n\n         <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->\n         <!--[if lt IE 9]>\n            <script src="/static/appbuilder/js/html5shiv.js"></script>\n            <script src="/static/appbuilder/js/respond.min.js"></script>\n         <![endif]-->\n\n        <link href="/static/appbuilder/datepicker/bootstrap-datepicker.css" rel="stylesheet">\n        <link href="/static/appbuilder/select2/select2.css" rel="stylesheet">\n        <link href="/static/appbuilder/css/flags/flags16.css" rel="stylesheet">\n        <link href="/static/appbuilder/css/ab.css" rel="stylesheet">\n    \n\n  <link href="/static/" rel="stylesheet">\n\n  \n    \n    <link href="/static/" rel="stylesheet">\n  \n\n  <link rel="icon" type="image/png" href="/static/pin_30.png">\n\n    \n        <script src="/static/appbuilder/js/jquery-latest.js"></script>\n        <script src="/static/appbuilder/js/ab_filters.js"></script>\n        <script src="/static/appbuilder/js/ab_actions.js"></script>\n    \n\n</head>\n\n<body >\n\n\n    <div class="modal fade" id="modal-confirm" tabindex="-1" role="dialog">\n    <div class="modal-dialog modal-sm">\n        <div class="modal-content">\n            <div class="modal-header">\n                <h4 class="modal-title" id="myModalLabel">\n                User confirmation needed\n                </h4>\n            </div>\n            <div class="modal-body">\n                <div class="modal-text"></div>\n            </div>\n            <div class="modal-footer">\n                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\n                <a href="#" id=\'modal-confirm-ok\' class="btn btn-danger danger">OK</a>\n            </div>\n        </div>\n    </div>\n</div>\n    <div class="modal fade" id="modal-alert" tabindex="-1" role="dialog">\n    <div class="modal-dialog modal-sm">\n        <div class="modal-content">\n            <div class="modal-body">\n                <div><h4 class="modal-text"></h4></div>\n            </div>\n            <div class="modal-footer">\n                <button type="button" class="btn btn-default" data-dismiss="modal">OK</button>\n            </div>\n        </div>\n    </div>\n</div>\n    \n        <header class="top" role="header">\n        \n\n\n\n<div class="navbar navbar-inverse navbar-fixed-top navbar-inverse" role="navigation" style="background-color: #007A87;">\n   <div class="container">\n        <div class="navbar-header">\n            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">\n                <span class="icon-bar"></span>\n                <span class="icon-bar"></span>\n                <span class="icon-bar"></span>\n            </button>\n            <a class="navbar-brand" rel="home" href="/" style="cursor: pointer;">\n              <img style="float: left; width:35px; margin-top: -7px;"\n                   src="/static/pin_100.png"\n                   title="test">\n              <span>\n                Airflow\n              </span>\n          </a>\n        </div>\n        <div class="navbar-collapse collapse">\n            <ul class="nav navbar-nav">\n                \n\n\n<li class="dropdown"><a href="/home">DAGs</a></li>\n\n\n    \n        \n            <li class="dropdown">\n            <a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">\n            \n                <i class="fa fa-cogs"></i>&nbsp;\n            \n            Security<b class="caret"></b></a>\n            <ul class="dropdown-menu">\n            \n                \n                    \n                        <li>\n    <a tabindex="-1" href="/users/list/">\n       \n        <i class="fa fa-fw fa-user"></i>&nbsp;\n    \n    List Users</a>\n</li>\n                    \n                \n            \n                \n                    \n                        <li>\n    <a tabindex="-1" href="/roles/list/">\n       \n        <i class="fa fa-fw fa-group"></i>&nbsp;\n    \n    List Roles</a>\n</li>\n                    \n                \n            \n                \n                    \n                        <li>\n    <a tabindex="-1" href="/userstatschartview/chart/">\n       \n        <i class="fa fa-fw fa-bar-chart-o"></i>&nbsp;\n    \n    User\'s Statistics</a>\n</li>\n                    \n                \n            \n                \n                    \n                        \n                          <li class="divider"></li>\n                        \n                    \n                \n            \n                \n                    \n                        <li>\n    <a tabindex="-1" href="/permissions/list/">\n       \n        <i class="fa fa-fw fa-lock"></i>&nbsp;\n    \n    Base Permissions</a>\n</li>\n                    \n                \n            \n                \n                    \n                        <li>\n    <a tabindex="-1" href="/viewmenus/list/">\n       \n        <i class="fa fa-fw fa-list-alt"></i>&nbsp;\n    \n    Views/Menus</a>\n</li>\n                    \n                \n            \n                \n                    \n                        <li>\n    <a tabindex="-1" href="/permissionviews/list/">\n       \n        <i class="fa fa-fw fa-link"></i>&nbsp;\n    \n    Permission on Views/Menus</a>\n</li>\n                    \n                \n            \n            </ul></li>\n        \n    \n\n    \n        \n            <li class="dropdown">\n            <a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">\n            \n                <i class="fa fa-globe"></i>&nbsp;\n            \n            Browse<b class="caret"></b></a>\n            <ul class="dropdown-menu">\n            \n                \n                    \n                        <li>\n    <a tabindex="-1" href="/dagrun/list/">\n       \n    DAG Runs</a>\n</li>\n                    \n                \n            \n                \n                    \n                        <li>\n    <a tabindex="-1" href="/job/list/">\n       \n    Jobs</a>\n</li>\n                    \n                \n            \n                \n                    \n                        <li>\n    <a tabindex="-1" href="/log/list/">\n       \n    Logs</a>\n</li>\n                    \n                \n            \n                \n                    \n                        <li>\n    <a tabindex="-1" href="/slamiss/list/">\n       \n    SLA Misses</a>\n</li>\n                    \n                \n            \n                \n                    \n                        <li>\n    <a tabindex="-1" href="/taskinstance/list/">\n       \n    Task Instances</a>\n</li>\n                    \n                \n            \n            </ul></li>\n        \n    \n\n    \n        \n            <li class="dropdown">\n            <a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">\n            \n                <i class="fa fa-user"></i>&nbsp;\n            \n            Admin<b class="caret"></b></a>\n            <ul class="dropdown-menu">\n            \n                \n                    \n                        <li>\n    <a tabindex="-1" href="/configuration">\n       \n    Configurations</a>\n</li>\n                    \n                \n            \n                \n                    \n                        <li>\n    <a tabindex="-1" href="/connection/list/">\n       \n    Connections</a>\n</li>\n                    \n                \n            \n                \n                    \n                        <li>\n    <a tabindex="-1" href="/pool/list/">\n       \n    Pools</a>\n</li>\n                    \n                \n            \n                \n                    \n                        <li>\n    <a tabindex="-1" href="/variable/list/">\n       \n    Variables</a>\n</li>\n                    \n                \n            \n                \n                    \n                        <li>\n    <a tabindex="-1" href="/xcom/list/">\n       \n    XComs</a>\n</li>\n                    \n                \n            \n            </ul></li>\n        \n    \n\n    \n        \n            <li class="dropdown">\n            <a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">\n            \n                <i class="fa fa-cube"></i>&nbsp;\n            \n            Docs<b class="caret"></b></a>\n            <ul class="dropdown-menu">\n            \n                \n                    \n                        <li>\n    <a tabindex="-1" href="https://airflow.apache.org/">\n       \n    Documentation</a>\n</li>\n                    \n                \n            \n                \n                    \n                        <li>\n    <a tabindex="-1" href="https://github.com/apache/airflow">\n       \n    GitHub</a>\n</li>\n                    \n                \n            \n            </ul></li>\n        \n    \n\n    \n        \n            <li class="dropdown">\n            <a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">\n            \n                <i class="fa fa-th"></i>&nbsp;\n            \n            About<b class="caret"></b></a>\n            <ul class="dropdown-menu">\n            \n                \n                    \n                        <li>\n    <a tabindex="-1" href="/version">\n       \n    Version</a>\n</li>\n                    \n                \n            \n            </ul></li>\n        \n    \n\n    \n        \n            <li class="dropdown">\n            <a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">\n            \n            Test Plugin<b class="caret"></b></a>\n            <ul class="dropdown-menu">\n            \n                \n                    \n                        <li>\n    <a tabindex="-1" href="/plugintestappbuilderbaseview/">\n       \n    Test View</a>\n</li>\n                    \n                \n            \n            </ul></li>\n        \n    \n\n    \n        \n            <li class="dropdown">\n            <a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">\n            \n                <i class="fa fa-th"></i>&nbsp;\n            \n            Search<b class="caret"></b></a>\n            <ul class="dropdown-menu">\n            \n                \n                    \n                        <li>\n    <a tabindex="-1" href="https://www.google.com">\n       \n    Google</a>\n</li>\n                    \n                \n            \n            </ul></li>\n        \n    \n\n\n            </ul>\n            <ul class="nav navbar-nav navbar-right">\n                \n\n\n<!-- clock -->\n<li><a id="clock"></a></li>\n\n\n    <li class="dropdown">\n        <a class="dropdown-toggle" data-toggle="dropdown" href="#">\n           <span class="fa fa-user"></span> test test<b class="caret"></b>\n        </a>\n        <ul class="dropdown-menu">\n            <li><a href="/users/userinfo/"><span class="fa fa-fw fa-user"></span>Profile</a></li>\n            <li><a href="/logout/"><span class="fa fa-fw fa-sign-out"></span>Logout</a></li>\n        </ul>\n    </li>\n\n\n            </ul>\n        </div>\n   </div>\n</div>\n        </header>\n    \n\n\n    <div class="container">\n      <div class="row">\n          \n            \n    \n\n          \n          \n\n<div class="panel panel-primary">\n\t<div class="panel-heading">\n\t<h4 class="panel-title">List Pool</h4>\n\t</div>\n\n\n    \n        \n<div class="panel-group" id="accordion1">\n    <div class="panel panel-default">\n        <div class="panel-heading">\n            <h4 class="panel-title">\n                <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1"\n                   href="#accordion1_href">Search</a><span class="caret"></span>\n            </h4>\n        </div>\n        \n            <div id="accordion1_href" class="panel-collapse collapse">\n                \n                <div class="panel-body">\n                    \n            \n\n<form id="filter_form" class="form-search" method="get">\n\n    <div class="btn-group">\n        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">\n        Add Filter\n      <span class="caret"></span>\n        </button>\n        <ul class="dropdown-menu">\n            \n            <li><a href="javascript:void(0)" name=description class="filter btn" onclick="return false;">\n                Description</a>\n            </li>\n            \n            <li><a href="javascript:void(0)" name=slots class="filter btn" onclick="return false;">\n                Slots</a>\n            </li>\n            \n            <li><a href="javascript:void(0)" name=pool class="filter btn" onclick="return false;">\n                Pool</a>\n            </li>\n            \n        </ul>\n    </div>\n\n    <table class="table table-responsive table-hover filters">\n       \n    </table>\n\n\n    <button type="submit" class="btn  btn-sm btn-primary">Search\n        <i class="fa fa-search"></i>\n    </button>\n\n</form>\n\n<script>\n\t(function($) {\n\tvar filter = new AdminFilters(\n                    \'#filter_form\',\n                    {"description": "Description", "pool": "Pool", "slots": "Slots"},\n                    {"description": "\\u003ctextarea class=\\"form-control\\" id=\\"description\\" name=\\"description\\" placeholder=\\"Description\\" rows=\\"3\\"\\u003e\\u003c/textarea\\u003e", "pool": "\\u003cinput class=\\"form-control\\" id=\\"pool\\" name=\\"pool\\" placeholder=\\"Pool\\" type=\\"text\\" value=\\"\\"\\u003e", "slots": "\\u003cinput class=\\"form-control\\" id=\\"slots\\" name=\\"slots\\" placeholder=\\"Slots\\" type=\\"text\\" value=\\"0\\"\\u003e"},\n                    {"description": ["Starts with", "Ends with", "Contains", "Equal to", "Not Starts with", "Not Ends with", "Not Contains", "Not Equal to"], "pool": ["Starts with", "Ends with", "Contains", "Equal to", "Not Starts with", "Not Ends with", "Not Contains", "Not Equal to"], "slots": ["Equal to", "Greater than", "Smaller than", "Not Equal to"]},\n                    []\n                );\n\t})(jQuery);\n\t\n</script>\n        \n                </div>\n            </div>\n        </div>\n    </div>\n\n    \n\n    \n        <div>\n        \n\n\n\n\n\n\n\n\n\n\n<div class="well well-sm">\n    \n        \n        \n\n      \n    \n    \n\n        \n  \n\n\n\n    \t\n\t\t    \n\t\t\t\n\t\t\t&nbsp;\n    <a href="/pool/add" class="btn btn-sm btn-primary" data-toggle="tooltip" rel="tooltip"\n       title="Add a new record">\n        <i class="fa fa-plus"></i>\n    </a>\n\n        \n        &nbsp;\n\n<div class="btn-group">\n    <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">\n    Actions<span class="caret"></span>\n    </button>\n    <ul class="dropdown-menu" role="menu">\n    \t\n            \n                <li>\n                    <a href="javascript:void(0)"\n                        class="muldelete_menu_item">\n                        <i class="fa None"></i>\n                        Delete\n                    </a>\n                </li>\n        \n    </ul>\n\t\t<script type="text/javascript">\n\t\t$(document).ready(function() {\n\t\t\n        \n\t\t\t\t$(\'.muldelete_menu_item\').on(\'click\', function(){\n\t\t\t\t    return modelActions.execute_multiple(\'muldelete\',\'Are you sure you want to delete selected records?\');\n\t\t\t\t})\n\t\t\n\t\t});\n\t\t</script>\n</div>\n\n\n        &nbsp;\n    <a href="/back" class="btn btn-sm btn-default" data-toggle="tooltip" rel="tooltip"\n       title="Back">\n        <i class="fa fa-arrow-left"></i>\n    </a>\n\n\t\t<div class="pull-right">\n\t\t\t<strong>Record Count:</strong> 1\n\t\t</div>\n\n    \n</div>\n\n\n\n    \n        <div class="table-responsive">\n        <table class="table table-bordered table-hover">\n    \n\n    \n        <thead>\n        <tr>\n        \n        <th class="action_checkboxes">\n            <input id="check_all" class="action_check_all" name="check_all" type="checkbox">\n        </th>\n        \n\n        \n            <th class="col-md-1 col-lg-1 col-sm-1" ></th>\n        \n\n        \n            \n                \n                    \n                    <th><a href=/pool/list/?_oc_PoolModelView=pool&amp;_od_PoolModelView=asc>Pool\n                    <i class="fa fa-arrows-v pull-right"></i></a></th>\n                \n            \n        \n            \n                \n                    \n                    <th><a href=/pool/list/?_oc_PoolModelView=slots&amp;_od_PoolModelView=asc>Slots\n                    <i class="fa fa-arrows-v pull-right"></i></a></th>\n                \n            \n        \n            \n                <th>Used Slots</th>\n            \n        \n            \n                <th>Queued Slots</th>\n            \n        \n        </tr>\n        </thead>\n    \n\n    \n        \n            \n            <tr>\n                \n                <td>\n                    <input id="54" class="action_check" name="rowid" value="54" type="checkbox">\n                </td>\n                \n                \n                    <td><center>\n                    \n    <div class="btn-group btn-group-xs" style="display: flex;">\n        \n        \n            \n            \n            \n    <a href="/pool/edit/54" class="btn btn-sm btn-default" data-toggle="tooltip" rel="tooltip"\n       title="Edit record">\n        <i class="fa fa-edit"></i>\n    </a>\n\n        \n        \n            \n    <a data-text="You sure you want to delete this item?" data-href="/pool/delete/54" class="btn btn-sm btn-default confirm" rel="tooltip"\n        title="Delete record" data-toggle="modal" data-target="#modal-confirm" href="#">\n        <i class="fa fa-eraser"></i>\n    </a>\n\n        \n    </div>\n\n                    </center></td>\n                \n                \n                    \n                    \n                        <td><a href=\'/taskinstance/list/?_flt_3_pool=test-pool%3Cscript%3E%3C%2Fscript%3E\'>test-pool<script></script></a></td>\n                    \n                \n                    \n                    \n                        <td>777</td>\n                    \n                \n                    \n                    \n                        <td><a href=\'/taskinstance/list/?_flt_3_pool=test-pool%3Cscript%3E%3C%2Fscript%3E&_flt_3_state=running\'>0</a></td>\n                    \n                \n                    \n                    \n                        <td><a href=\'/taskinstance/list/?_flt_3_pool=test-pool%3Cscript%3E%3C%2Fscript%3E&_flt_3_state=queued\'>0</a></td>\n                    \n                \n            </tr>\n        \n    \n\n    \n        </table>\n        </div>\n    \n\n    \n    \n    \n    <form id="action_form" action="/pool/action_post" method="POST" style="display: none">\n        \n        <input type="hidden" name="csrf_token" value="IjA0Y2Y3N2QzN2FhN2E3Y2UwMGE3OWU5Zjc2N2JkNjdmYzIzZGEwNWMi.XIvgeQ.KoYD_TUx3xCWQWuNm_04jIQDIQE"/>\n        \n        <input type="hidden" id="action" name="action" />\n    </form>\n    \n\n\n    <script language="javascript">\n        $(document).ready(function() {\n            window.modelActions = new AdminActions();\n        });\n    </script>\n\n\n        </div>\n    \n\n</div>\n\n\n\n      </div>\n    </div>\n\n    \n        <footer>\n        <div class="img-rounded nav-fixed-bottom">\n            <div class="container">\n                <div class="row img-rounded">\n    <hr><small>\n<div class="col-md-4">\n</div>\n<div class="col-md-4">\n</div>\n<div class="col-md-4">\n</div>\n</div>\n            </div>\n        </div>\n        </footer>\n    \n\n\n\n\n\n    <script src="/static/appbuilder/js/bootstrap.min.js"></script>\n    <script src="/static/appbuilder/datepicker/bootstrap-datepicker.js"></script>\n    <script src="/static/appbuilder/select2/select2.js"></script>\n    <script src="/static/appbuilder/js/ab.js"></script>\n\n<script type="text/javascript">\n  // below variables are used in base.js\n  var hostName = \'90ef37eeab2f\';\n  var csrfToken = \'IjA0Y2Y3N2QzN2FhN2E3Y2UwMGE3OWU5Zjc2N2JkNjdmYzIzZGEwNWMi.XIvgeQ.KoYD_TUx3xCWQWuNm_04jIQDIQE\';\n</script>\n<script src="/static/" type="text/javascript"></script>\n\n\n\n\n\n\n\n\n  </body>\n</html>'�[0m

@BasPH
Copy link
Copy Markdown
Contributor Author

BasPH commented Mar 17, 2019

Those errors seem unrelated? Shall I trigger another build?

@BasPH
Copy link
Copy Markdown
Contributor Author

BasPH commented Mar 18, 2019

Done a re-run. No luck... Will try to find some time later this week.

@Fokko
Copy link
Copy Markdown
Contributor

Fokko commented Mar 23, 2019

Ok, let me know! 👍

**locals() is used a lot for string formatting. This is considered
bad programming practice.
@BasPH
Copy link
Copy Markdown
Contributor Author

BasPH commented Mar 30, 2019

@Fokko I found a bug and fixed it (the Markup must be initialized first, and thereafter you can apply string formatting, instead of first formatting then initialization). Only two jobs failed now but this seems the result of flaky CI. I'm confident the code is now okay, could you restart the two failed jobs?

@Fokko
Copy link
Copy Markdown
Contributor

Fokko commented Mar 31, 2019

Restarted the job! Let's see.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Mar 31, 2019

Codecov Report

Merging #4861 into master will increase coverage by <.01%.
The diff coverage is 82.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4861      +/-   ##
==========================================
+ Coverage   75.76%   75.76%   +<.01%     
==========================================
  Files         461      461              
  Lines       29955    29949       -6     
==========================================
- Hits        22694    22691       -3     
+ Misses       7261     7258       -3
Impacted Files Coverage Δ
airflow/configuration.py 92.12% <ø> (-0.06%) ⬇️
...low/contrib/operators/wasb_delete_blob_operator.py 100% <ø> (ø) ⬆️
airflow/www/utils.py 82.7% <ø> (ø) ⬆️
airflow/contrib/operators/file_to_wasb.py 100% <ø> (ø) ⬆️
airflow/operators/hive_to_druid.py 63.07% <ø> (ø) ⬆️
airflow/utils/helpers.py 82.51% <ø> (ø) ⬆️
airflow/hooks/mysql_hook.py 92.98% <ø> (ø) ⬆️
airflow/contrib/operators/qubole_check_operator.py 71.76% <ø> (ø) ⬆️
airflow/contrib/sensors/wasb_sensor.py 100% <ø> (ø) ⬆️
airflow/bin/cli.py 66.97% <0%> (ø) ⬆️
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 157f7bf...3cfe573. Read the comment docs.

Copy link
Copy Markdown
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. Thanks @BasPH for cleaning this up.

@Fokko Fokko merged commit 4a2c9c5 into apache:master Apr 2, 2019
ashb pushed a commit that referenced this pull request Apr 15, 2019
…4861)

**locals() is used a lot for string formatting. This is considered
bad programming practice.
cthenderson pushed a commit to cthenderson/apache-airflow that referenced this pull request Apr 16, 2019
…pache#4861)

**locals() is used a lot for string formatting. This is considered
bad programming practice.
andriisoldatenko pushed a commit to andriisoldatenko/airflow that referenced this pull request Jul 26, 2019
…pache#4861)

**locals() is used a lot for string formatting. This is considered
bad programming practice.
wmorris75 pushed a commit to modmed-external/incubator-airflow that referenced this pull request Jul 29, 2019
…pache#4861)

**locals() is used a lot for string formatting. This is considered
bad programming practice.
dharamsk pushed a commit to postmates/airflow that referenced this pull request Aug 8, 2019
…pache#4861)

**locals() is used a lot for string formatting. This is considered
bad programming practice.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants