You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by cr...@apache.org on 2017/03/29 21:15:15 UTC
[1/3] incubator-airflow git commit: [AIRFLOW-1017] get_task_instance
shouldn't throw exception when no TI
Repository: incubator-airflow
Updated Branches:
refs/heads/v1-8-test 15600e42c -> eb12f0164
[AIRFLOW-1017] get_task_instance shouldn't throw exception when no TI
get_task_instance should return None instead of
throwing exception in the case where dagrun does not have the task
instance.
Closes #2178 from aoen/ddavydov--
one_instead_of_first_for_dagrun
(cherry picked from commit b2b9587cca9195229ab107394ad94b7702c70e37)
Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/2106ff57
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/2106ff57
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/2106ff57
Branch: refs/heads/v1-8-test
Commit: 2106ff57056d08436d8aab87ac5601d9f554935a
Parents: 15600e4
Author: Chris Riccomini <cr...@apache.org>
Authored: Wed Mar 29 14:09:56 2017 -0700
Committer: Chris Riccomini <cr...@apache.org>
Committed: Wed Mar 29 14:09:56 2017 -0700
----------------------------------------------------------------------
airflow/models.py | 2 +-
tests/models.py | 26 ++++++++++++++++++++++++++
2 files changed, 27 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/2106ff57/airflow/models.py
----------------------------------------------------------------------
diff --git a/airflow/models.py b/airflow/models.py
index 42b8a7f..bdda701 100755
--- a/airflow/models.py
+++ b/airflow/models.py
@@ -3971,7 +3971,7 @@ class DagRun(Base):
TI.dag_id == self.dag_id,
TI.execution_date == self.execution_date,
TI.task_id == task_id
- ).one()
+ ).first()
return ti
http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/2106ff57/tests/models.py
----------------------------------------------------------------------
diff --git a/tests/models.py b/tests/models.py
index 1fbb3e6..c63c67e 100644
--- a/tests/models.py
+++ b/tests/models.py
@@ -310,6 +310,32 @@ class DagRunTest(unittest.TestCase):
state = dr.update_state()
self.assertEqual(State.FAILED, state)
+ def test_get_task_instance_on_empty_dagrun(self):
+ """
+ Make sure that a proper value is returned when a dagrun has no task instances
+ """
+ session = settings.Session()
+
+ # Any dag will work for this
+ dag = self.dagbag.get_dag('test_dagrun_short_circuit_false')
+ now = datetime.datetime.now()
+
+ # Don't use create_dagrun since it will create the task instances too which we
+ # don't want
+ dag_run = models.DagRun(
+ dag_id=dag.dag_id,
+ run_id='manual__' + now.isoformat(),
+ execution_date=now,
+ start_date=now,
+ state=State.RUNNING,
+ external_trigger=False,
+ )
+ session.add(dag_run)
+ session.commit()
+
+ ti = dag_run.get_task_instance('test_short_circuit_false')
+ self.assertEqual(None, ti)
+
class DagBagTest(unittest.TestCase):
[3/3] incubator-airflow git commit: [AIRFLOW-832] Let debug server
run without SSL
Posted by cr...@apache.org.
[AIRFLOW-832] Let debug server run without SSL
Closes #2051 from gsakkis/fix-debug-server
(cherry picked from commit b0ae70d3a8e935dc9266b6853683ae5375a7390b)
Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/eb12f016
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/eb12f016
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/eb12f016
Branch: refs/heads/v1-8-test
Commit: eb12f0164fbeedbe2701744c213cc90e6fc805f5
Parents: 46ca569
Author: George Sakkis <ge...@gmail.com>
Authored: Sun Feb 12 16:09:26 2017 -0500
Committer: Chris Riccomini <cr...@apache.org>
Committed: Wed Mar 29 14:12:06 2017 -0700
----------------------------------------------------------------------
airflow/bin/cli.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/eb12f016/airflow/bin/cli.py
----------------------------------------------------------------------
diff --git a/airflow/bin/cli.py b/airflow/bin/cli.py
index 61d8707..e9c54e6 100755
--- a/airflow/bin/cli.py
+++ b/airflow/bin/cli.py
@@ -751,7 +751,7 @@ def webserver(args):
"Starting the web server on port {0} and host {1}.".format(
args.port, args.hostname))
app.run(debug=True, port=args.port, host=args.hostname,
- ssl_context=(ssl_cert, ssl_key))
+ ssl_context=(ssl_cert, ssl_key) if ssl_cert and ssl_key else None)
else:
pid, stdout, stderr, log_file = setup_locations("webserver", pid=args.pid)
print(
[2/3] incubator-airflow git commit: [AIRFLOW-906] Update Code icon
from lightning bolt to file
Posted by cr...@apache.org.
[AIRFLOW-906] Update Code icon from lightning bolt to file
Lightning bolts are not a visual metaphor for code
or files. Since Glyphicon doesn't have a code icon
(<>, for instance), we should use its file icon.
Dear Airflow Maintainers,
Please accept this PR that addresses the following
issues:
AIRFLOW-906
Testing Done:
None.
Before/After screenshots in AIRFLOW-906 (https://i
ssues.apache.org/jira/browse/AIRFLOW-906)
Update Code icon from lightning bolt to file
Lightning bolts are not a visual metaphor for code
or files. Since Glyphicon doesn't have a code icon
(<>, for instance), we should use its file icon.
Merge pull request #1 from djarratt/djarratt-
patch-1
Update Code icon from lightning bolt to file
AIRFLOW-906 change glyphicon flash to file
Merge pull request #2 from djarratt/djarratt-
patch-2
AIRFLOW-906 change glyphicon flash to file
Closes #2104 from djarratt/master
(cherry picked from commit bc47200711be4d2c0b36b772651dae4f5e01a204)
Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/46ca569a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/46ca569a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/46ca569a
Branch: refs/heads/v1-8-test
Commit: 46ca569a37513f3d13c529786f65c7e443c9837e
Parents: 2106ff5
Author: Dan Jarratt <dj...@users.noreply.github.com>
Authored: Fri Feb 24 15:00:51 2017 -0800
Committer: Chris Riccomini <cr...@apache.org>
Committed: Wed Mar 29 14:10:33 2017 -0700
----------------------------------------------------------------------
airflow/www/static/bootstrap-theme.css | 2 +-
airflow/www/templates/airflow/dag.html | 2 +-
airflow/www/templates/airflow/dags.html | 2 +-
airflow/www/templates/airflow/list_dags.html | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/46ca569a/airflow/www/static/bootstrap-theme.css
----------------------------------------------------------------------
diff --git a/airflow/www/static/bootstrap-theme.css b/airflow/www/static/bootstrap-theme.css
index 5b126ae..734f940 100644
--- a/airflow/www/static/bootstrap-theme.css
+++ b/airflow/www/static/bootstrap-theme.css
@@ -3068,7 +3068,7 @@ tbody.collapse.in {
.glyphicon-log-in:before {
content: "\e161";
}
-.glyphicon-flash:before {
+.glyphicon-file:before {
content: "\e162";
}
.glyphicon-log-out:before {
http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/46ca569a/airflow/www/templates/airflow/dag.html
----------------------------------------------------------------------
diff --git a/airflow/www/templates/airflow/dag.html b/airflow/www/templates/airflow/dag.html
index 8a4793d..c695f04 100644
--- a/airflow/www/templates/airflow/dag.html
+++ b/airflow/www/templates/airflow/dag.html
@@ -90,7 +90,7 @@
</li>
<li>
<a href="{{ url_for("airflow.code", dag_id=dag.dag_id, root=root) }}">
- <span class="glyphicon glyphicon-flash" aria-hidden="true"></span>
+ <span class="glyphicon glyphicon-file" aria-hidden="true"></span>
Code
</a>
</li>
http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/46ca569a/airflow/www/templates/airflow/dags.html
----------------------------------------------------------------------
diff --git a/airflow/www/templates/airflow/dags.html b/airflow/www/templates/airflow/dags.html
index 5792c6a..7c59dea 100644
--- a/airflow/www/templates/airflow/dags.html
+++ b/airflow/www/templates/airflow/dags.html
@@ -167,7 +167,7 @@
<!-- Code -->
<a href="{{ url_for("airflow.code", dag_id=dag.dag_id) }}" title="Code View">
- <span class="glyphicon glyphicon-flash" aria-hidden="true"></span>
+ <span class="glyphicon glyphicon-file" aria-hidden="true"></span>
</a>
<!-- Logs -->
http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/46ca569a/airflow/www/templates/airflow/list_dags.html
----------------------------------------------------------------------
diff --git a/airflow/www/templates/airflow/list_dags.html b/airflow/www/templates/airflow/list_dags.html
index 2ad9416..9ace2fd 100644
--- a/airflow/www/templates/airflow/list_dags.html
+++ b/airflow/www/templates/airflow/list_dags.html
@@ -167,7 +167,7 @@
<i class="icon-align-left"></i>
</a>
<a href="{{ url_for("airflow.code", dag_id=row.dag_id) }}" title="Code View">
- <span class="glyphicon glyphicon-flash" aria-hidden="true"></span>
+ <span class="glyphicon glyphicon-file" aria-hidden="true"></span>
</a>
<a href="{{ url_for("airflow.refresh", dag_id=row.dag_id) }}" title="Refresh">
<span class="glyphicon glyphicon-refresh" aria-hidden="true"></span>