You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/01/31 18:56:08 UTC

[GitHub] [airflow] dacohen opened a new pull request #7312: [AIRFLOW-6695] Add DAG run configuration to UI

dacohen opened a new pull request #7312: [AIRFLOW-6695] Add DAG run configuration to UI
URL: https://github.com/apache/airflow/pull/7312
 
 
   ---
   Issue link: WILL BE INSERTED BY [boring-cyborg](https://github.com/kaxil/boring-cyborg)
   
   Make sure to mark the boxes below before creating PR: [x]
   
   - [x] Description above provides context of the change
   - [x] Commit message/PR title starts with `[AIRFLOW-NNNN]`. AIRFLOW-NNNN = JIRA ID<sup>*</sup>
   - [x] Unit tests coverage for changes (not needed for documentation changes)
   - [x] Commits follow "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)"
   - [x] Relevant documentation is updated including usage instructions.
   - [x] I will engage committers as explained in [Contribution Workflow Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
   
   <sup>*</sup> For document-only changes commit message can start with `[AIRFLOW-XXXX]`.
   
   ---
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   Read the [Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines) for more information.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] dacohen commented on issue #7312: [AIRFLOW-6695] Add DAG run configuration to UI

Posted by GitBox <gi...@apache.org>.
dacohen commented on issue #7312: [AIRFLOW-6695] Add DAG run configuration to UI
URL: https://github.com/apache/airflow/pull/7312#issuecomment-582451593
 
 
   @potiuk Rebase is done. Let me know if you need anything else.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] ashb commented on a change in pull request #7312: [AIRFLOW-6695] Add DAG run configuration to UI

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #7312: [AIRFLOW-6695] Add DAG run configuration to UI
URL: https://github.com/apache/airflow/pull/7312#discussion_r375922969
 
 

 ##########
 File path: airflow/www/templates/airflow/trigger.html
 ##########
 @@ -0,0 +1,36 @@
+{#
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+#}
+
+{% extends base_template %}
+
+{% block content %}
+    {{ super() }}
+    <h2>Trigger DAG: {{ dag_id }}</h2>
+    <form method="POST">
+      <input name="csrf_token" type="hidden" value="{{ csrf_token() }}"/>
+      <input name="dag_id" type="hidden" value="{{ dag_id }}"/>
+      <input name="origin" type="hidden" value="{{ origin }}"/>
+      <div class="form-group">
+        <label for="conf">Configuration JSON (Optional)</label>
+        <input class="form-control" name="conf" type="text" value="{{ conf }}"/>
 
 Review comment:
   Let's make this a textarea instead of an input

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] ashb commented on a change in pull request #7312: [AIRFLOW-6695] Add DAG run configuration to UI

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #7312: [AIRFLOW-6695] Add DAG run configuration to UI
URL: https://github.com/apache/airflow/pull/7312#discussion_r375923329
 
 

 ##########
 File path: airflow/www/views.py
 ##########
 @@ -994,6 +1004,18 @@ def trigger(self, session=None):
             return redirect(origin)
 
         run_conf = {}
+        conf = request.values.get('conf')
+        if conf:
+            try:
+                run_conf = json.loads(conf)
+            except json.decoder.JSONDecodeError:
+                flash("Invalid JSON configuration")
 
 Review comment:
   ```suggestion
                   flash("Invalid JSON configuration", "error")
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] codecov-io edited a comment on issue #7312: [AIRFLOW-6695] Add DAG run configuration to UI

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #7312: [AIRFLOW-6695] Add DAG run configuration to UI
URL: https://github.com/apache/airflow/pull/7312#issuecomment-582590185
 
 
   # [Codecov](https://codecov.io/gh/apache/airflow/pull/7312?src=pr&el=h1) Report
   > Merging [#7312](https://codecov.io/gh/apache/airflow/pull/7312?src=pr&el=desc) into [master](https://codecov.io/gh/apache/airflow/commit/92c72f40df24aa9bec8a5bf5159bcd29c85698cf?src=pr&el=desc) will **increase** coverage by `0.13%`.
   > The diff coverage is `100%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/airflow/pull/7312/graphs/tree.svg?width=650&token=WdLKlKHOAU&height=150&src=pr)](https://codecov.io/gh/apache/airflow/pull/7312?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #7312      +/-   ##
   ==========================================
   + Coverage   86.21%   86.35%   +0.13%     
   ==========================================
     Files         871      871              
     Lines       40570    40636      +66     
   ==========================================
   + Hits        34979    35091     +112     
   + Misses       5591     5545      -46
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/airflow/pull/7312?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [airflow/www/views.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy93d3cvdmlld3MucHk=) | `76.22% <100%> (+0.14%)` | :arrow_up: |
   | [...viders/cncf/kubernetes/operators/kubernetes\_pod.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvY25jZi9rdWJlcm5ldGVzL29wZXJhdG9ycy9rdWJlcm5ldGVzX3BvZC5weQ==) | `93.61% <0%> (-4.04%)` | :arrow_down: |
   | [...providers/google/cloud/example\_dags/example\_gcs.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvZ29vZ2xlL2Nsb3VkL2V4YW1wbGVfZGFncy9leGFtcGxlX2djcy5weQ==) | `96.29% <0%> (-3.71%)` | :arrow_down: |
   | [airflow/www/app.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy93d3cvYXBwLnB5) | `94.24% <0%> (ø)` | :arrow_up: |
   | [...rflow/providers/mysql/operators/presto\_to\_mysql.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvbXlzcWwvb3BlcmF0b3JzL3ByZXN0b190b19teXNxbC5weQ==) | `100% <0%> (ø)` | :arrow_up: |
   | [...flow/providers/amazon/aws/hooks/cloud\_formation.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvYW1hem9uL2F3cy9ob29rcy9jbG91ZF9mb3JtYXRpb24ucHk=) | `96.77% <0%> (ø)` | :arrow_up: |
   | [.../providers/amazon/aws/operators/cloud\_formation.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvYW1hem9uL2F3cy9vcGVyYXRvcnMvY2xvdWRfZm9ybWF0aW9uLnB5) | `100% <0%> (ø)` | :arrow_up: |
   | [...ow/providers/amazon/aws/sensors/cloud\_formation.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvYW1hem9uL2F3cy9zZW5zb3JzL2Nsb3VkX2Zvcm1hdGlvbi5weQ==) | `100% <0%> (ø)` | :arrow_up: |
   | [airflow/utils/dag\_processing.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy91dGlscy9kYWdfcHJvY2Vzc2luZy5weQ==) | `87.93% <0%> (ø)` | :arrow_up: |
   | [airflow/api/common/experimental/trigger\_dag.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy9hcGkvY29tbW9uL2V4cGVyaW1lbnRhbC90cmlnZ2VyX2RhZy5weQ==) | `98.07% <0%> (+0.11%)` | :arrow_up: |
   | ... and [10 more](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/airflow/pull/7312?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/airflow/pull/7312?src=pr&el=footer). Last update [92c72f4...ec3174d](https://codecov.io/gh/apache/airflow/pull/7312?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] codecov-io commented on issue #7312: [AIRFLOW-6695] Add DAG run configuration to UI

Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #7312: [AIRFLOW-6695] Add DAG run configuration to UI
URL: https://github.com/apache/airflow/pull/7312#issuecomment-582590185
 
 
   # [Codecov](https://codecov.io/gh/apache/airflow/pull/7312?src=pr&el=h1) Report
   > Merging [#7312](https://codecov.io/gh/apache/airflow/pull/7312?src=pr&el=desc) into [master](https://codecov.io/gh/apache/airflow/commit/92c72f40df24aa9bec8a5bf5159bcd29c85698cf?src=pr&el=desc) will **decrease** coverage by `0.23%`.
   > The diff coverage is `100%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/airflow/pull/7312/graphs/tree.svg?width=650&token=WdLKlKHOAU&height=150&src=pr)](https://codecov.io/gh/apache/airflow/pull/7312?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #7312      +/-   ##
   ==========================================
   - Coverage   86.21%   85.98%   -0.24%     
   ==========================================
     Files         871      871              
     Lines       40570    40636      +66     
   ==========================================
   - Hits        34979    34942      -37     
   - Misses       5591     5694     +103
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/airflow/pull/7312?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [airflow/www/views.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy93d3cvdmlld3MucHk=) | `76.22% <100%> (+0.14%)` | :arrow_up: |
   | [...w/providers/apache/hive/operators/mysql\_to\_hive.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvYXBhY2hlL2hpdmUvb3BlcmF0b3JzL215c3FsX3RvX2hpdmUucHk=) | `35.84% <0%> (-64.16%)` | :arrow_down: |
   | [airflow/operators/generic\_transfer.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy9vcGVyYXRvcnMvZ2VuZXJpY190cmFuc2Zlci5weQ==) | `39.28% <0%> (-60.72%)` | :arrow_down: |
   | [airflow/security/kerberos.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy9zZWN1cml0eS9rZXJiZXJvcy5weQ==) | `30.43% <0%> (-45.66%)` | :arrow_down: |
   | [airflow/providers/mysql/operators/mysql.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvbXlzcWwvb3BlcmF0b3JzL215c3FsLnB5) | `55% <0%> (-45%)` | :arrow_down: |
   | [airflow/utils/sqlalchemy.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy91dGlscy9zcWxhbGNoZW15LnB5) | `91.66% <0%> (-5%)` | :arrow_down: |
   | [...viders/cncf/kubernetes/operators/kubernetes\_pod.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvY25jZi9rdWJlcm5ldGVzL29wZXJhdG9ycy9rdWJlcm5ldGVzX3BvZC5weQ==) | `93.61% <0%> (-4.04%)` | :arrow_down: |
   | [...providers/google/cloud/example\_dags/example\_gcs.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvZ29vZ2xlL2Nsb3VkL2V4YW1wbGVfZGFncy9leGFtcGxlX2djcy5weQ==) | `96.29% <0%> (-3.71%)` | :arrow_down: |
   | [airflow/utils/dag\_processing.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy91dGlscy9kYWdfcHJvY2Vzc2luZy5weQ==) | `85.63% <0%> (-2.3%)` | :arrow_down: |
   | [airflow/hooks/dbapi\_hook.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy9ob29rcy9kYmFwaV9ob29rLnB5) | `88.42% <0%> (-1.66%)` | :arrow_down: |
   | ... and [13 more](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/airflow/pull/7312?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/airflow/pull/7312?src=pr&el=footer). Last update [92c72f4...3da126e](https://codecov.io/gh/apache/airflow/pull/7312?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] dacohen commented on issue #7312: [AIRFLOW-6695] Add DAG run configuration to UI

Posted by GitBox <gi...@apache.org>.
dacohen commented on issue #7312: [AIRFLOW-6695] Add DAG run configuration to UI
URL: https://github.com/apache/airflow/pull/7312#issuecomment-582954463
 
 
   @ashb Made those changes. Here are screenshots of the page on first load, and after entering an invalid payload.
   
    
   <img width="1440" alt="Screen Shot 2020-02-06 at 10 13 31 AM" src="https://user-images.githubusercontent.com/4705646/73950552-1b7d1f80-48ca-11ea-9d45-2f992122ac98.png">
   <img width="1439" alt="Screen Shot 2020-02-06 at 10 14 06 AM" src="https://user-images.githubusercontent.com/4705646/73950559-1e781000-48ca-11ea-8bd7-cfd53964067f.png">
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] dacohen edited a comment on issue #7312: [AIRFLOW-6695] Add DAG run configuration to UI

Posted by GitBox <gi...@apache.org>.
dacohen edited a comment on issue #7312: [AIRFLOW-6695] Add DAG run configuration to UI
URL: https://github.com/apache/airflow/pull/7312#issuecomment-582954463
 
 
   @ashb Made those changes. Here are screenshots of the page on first load, and after entering an invalid payload. Thanks again for your help on this!
   
    
   <img width="1440" alt="Screen Shot 2020-02-06 at 10 13 31 AM" src="https://user-images.githubusercontent.com/4705646/73950552-1b7d1f80-48ca-11ea-9d45-2f992122ac98.png">
   <img width="1439" alt="Screen Shot 2020-02-06 at 10 14 06 AM" src="https://user-images.githubusercontent.com/4705646/73950559-1e781000-48ca-11ea-8bd7-cfd53964067f.png">
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] ashb merged pull request #7312: [AIRFLOW-6695] Add DAG run configuration to UI

Posted by GitBox <gi...@apache.org>.
ashb merged pull request #7312: [AIRFLOW-6695] Add DAG run configuration to UI
URL: https://github.com/apache/airflow/pull/7312
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] potiuk commented on issue #7312: [AIRFLOW-6695] Add DAG run configuration to UI

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #7312: [AIRFLOW-6695] Add DAG run configuration to UI
URL: https://github.com/apache/airflow/pull/7312#issuecomment-581136257
 
 
   Please rebase to latest master @dacohen  - we had a failing master drama and there is much higher chance the build will succeed. We have still some intermittent errors, but there should be less often.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] ashb commented on a change in pull request #7312: [AIRFLOW-6695] Add DAG run configuration to UI

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #7312: [AIRFLOW-6695] Add DAG run configuration to UI
URL: https://github.com/apache/airflow/pull/7312#discussion_r375754969
 
 

 ##########
 File path: airflow/www/views.py
 ##########
 @@ -994,6 +1003,13 @@ def trigger(self, session=None):
             return redirect(origin)
 
         run_conf = {}
+        conf = request.values.get('conf')
+        if conf:
+            try:
+                run_conf = json.loads(conf)
+            except json.decoder.JSONDecodeError:
+                flash("Invalid JSON configuration")
+                return redirect(url_for('Airflow.trigger', dag_id=dag_id))
 
 Review comment:
   Rather than redirecting it would be better to just display the form again -- that input will be re-shown, and origin param preserved etc.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] ashb commented on a change in pull request #7312: [AIRFLOW-6695] Add DAG run configuration to UI

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #7312: [AIRFLOW-6695] Add DAG run configuration to UI
URL: https://github.com/apache/airflow/pull/7312#discussion_r375381604
 
 

 ##########
 File path: airflow/www/views.py
 ##########
 @@ -972,42 +972,58 @@ def delete(self):
         # Upon success return to origin.
         return redirect(origin)
 
-    @expose('/trigger', methods=['POST'])
+    @expose('/trigger', methods=['POST', 'GET'])
     @has_dag_access(can_dag_edit=True)
     @has_access
     @action_logging
     @provide_session
     def trigger(self, session=None):
+
         dag_id = request.values.get('dag_id')
         origin = request.values.get('origin') or url_for('Airflow.index')
-        dag = session.query(models.DagModel).filter(models.DagModel.dag_id == dag_id).first()
-        if not dag:
-            flash("Cannot find dag {}".format(dag_id))
-            return redirect(origin)
 
-        execution_date = timezone.utcnow()
-        run_id = "manual__{0}".format(execution_date.isoformat())
+        if request.method == 'GET':
+            return self.render_template(
+                'airflow/trigger.html',
+                dag_id=dag_id,
+                origin=origin
+            )
+        else:
 
 Review comment:
   Since the GET path returns, you can drop the `else:` (and not have to touch the rest of this method (making the diff easier to review.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] ashb commented on a change in pull request #7312: [AIRFLOW-6695] Add DAG run configuration to UI

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #7312: [AIRFLOW-6695] Add DAG run configuration to UI
URL: https://github.com/apache/airflow/pull/7312#discussion_r375380927
 
 

 ##########
 File path: airflow/www/templates/airflow/trigger.html
 ##########
 @@ -0,0 +1,36 @@
+{#
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+#}
+
+{% extends "airflow/master.html" %}
 
 Review comment:
   ```suggestion
   {% extends base_template %}
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] codecov-io edited a comment on issue #7312: [AIRFLOW-6695] Add DAG run configuration to UI

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #7312: [AIRFLOW-6695] Add DAG run configuration to UI
URL: https://github.com/apache/airflow/pull/7312#issuecomment-582590185
 
 
   # [Codecov](https://codecov.io/gh/apache/airflow/pull/7312?src=pr&el=h1) Report
   > Merging [#7312](https://codecov.io/gh/apache/airflow/pull/7312?src=pr&el=desc) into [master](https://codecov.io/gh/apache/airflow/commit/92c72f40df24aa9bec8a5bf5159bcd29c85698cf?src=pr&el=desc) will **increase** coverage by `0.13%`.
   > The diff coverage is `100%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/airflow/pull/7312/graphs/tree.svg?width=650&token=WdLKlKHOAU&height=150&src=pr)](https://codecov.io/gh/apache/airflow/pull/7312?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #7312      +/-   ##
   ==========================================
   + Coverage   86.21%   86.35%   +0.13%     
   ==========================================
     Files         871      871              
     Lines       40570    40636      +66     
   ==========================================
   + Hits        34979    35092     +113     
   + Misses       5591     5544      -47
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/airflow/pull/7312?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [airflow/www/views.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy93d3cvdmlld3MucHk=) | `76.22% <100%> (+0.14%)` | :arrow_up: |
   | [...w/providers/apache/hive/operators/mysql\_to\_hive.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvYXBhY2hlL2hpdmUvb3BlcmF0b3JzL215c3FsX3RvX2hpdmUucHk=) | `100% <0%> (ø)` | :arrow_up: |
   | [airflow/operators/generic\_transfer.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy9vcGVyYXRvcnMvZ2VuZXJpY190cmFuc2Zlci5weQ==) | `100% <0%> (ø)` | :arrow_up: |
   | [airflow/security/kerberos.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy9zZWN1cml0eS9rZXJiZXJvcy5weQ==) | `76.08% <0%> (ø)` | :arrow_up: |
   | [airflow/providers/mysql/operators/mysql.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvbXlzcWwvb3BlcmF0b3JzL215c3FsLnB5) | `100% <0%> (ø)` | :arrow_up: |
   | [airflow/utils/sqlalchemy.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy91dGlscy9zcWxhbGNoZW15LnB5) | `96.66% <0%> (ø)` | :arrow_up: |
   | [...viders/cncf/kubernetes/operators/kubernetes\_pod.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvY25jZi9rdWJlcm5ldGVzL29wZXJhdG9ycy9rdWJlcm5ldGVzX3BvZC5weQ==) | `93.61% <0%> (-4.04%)` | :arrow_down: |
   | [...providers/google/cloud/example\_dags/example\_gcs.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvZ29vZ2xlL2Nsb3VkL2V4YW1wbGVfZGFncy9leGFtcGxlX2djcy5weQ==) | `96.29% <0%> (-3.71%)` | :arrow_down: |
   | [airflow/utils/dag\_processing.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy91dGlscy9kYWdfcHJvY2Vzc2luZy5weQ==) | `88.12% <0%> (+0.19%)` | :arrow_up: |
   | [airflow/hooks/dbapi\_hook.py](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree#diff-YWlyZmxvdy9ob29rcy9kYmFwaV9ob29rLnB5) | `91.73% <0%> (+1.65%)` | :arrow_up: |
   | ... and [13 more](https://codecov.io/gh/apache/airflow/pull/7312/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/airflow/pull/7312?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/airflow/pull/7312?src=pr&el=footer). Last update [92c72f4...3da126e](https://codecov.io/gh/apache/airflow/pull/7312?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] ashb commented on a change in pull request #7312: [AIRFLOW-6695] Add DAG run configuration to UI

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #7312: [AIRFLOW-6695] Add DAG run configuration to UI
URL: https://github.com/apache/airflow/pull/7312#discussion_r375382623
 
 

 ##########
 File path: airflow/www/templates/airflow/trigger.html
 ##########
 @@ -0,0 +1,36 @@
+{#
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+#}
+
+{% extends "airflow/master.html" %}
+
+{% block content %}
+    {{ super() }}
+    <h2>Trigger DAG</h2>
+    <form method="POST">
+      <input name="csrf_token" type="hidden" value="{{ csrf_token() }}"/>
+      <input name="dag_id" type="hidden" value="{{ dag_id }}"/>
+      <input name="origin" type="hidden" value="{{ origin }}"/>
+      <div class="form-group">
+        <label for="conf">Configuration JSON (Optional)</label>
+        <input class="form-control" name="conf" type="text"/>
+      </div>
+      <input class="btn btn-primary" type="submit" value="Trigger"/>
+      <button class="btn" onclick="window.history.back(); return false">bail.</button>
 
 Review comment:
   If we are passing `origin` to the template we should use that rather than `history.back` --(that or drop the origin param alltogther.)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] dacohen commented on issue #7312: [AIRFLOW-6695] Add DAG run configuration to UI

Posted by GitBox <gi...@apache.org>.
dacohen commented on issue #7312: [AIRFLOW-6695] Add DAG run configuration to UI
URL: https://github.com/apache/airflow/pull/7312#issuecomment-582981222
 
 
   @ashb Updated again. New error screenshot attached.
   
   <img width="1436" alt="Screen Shot 2020-02-06 at 11 11 25 AM" src="https://user-images.githubusercontent.com/4705646/73955684-bc230d80-48d1-11ea-8636-29d8742d7c24.png">
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] ashb commented on a change in pull request #7312: [AIRFLOW-6695] Add DAG run configuration to UI

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #7312: [AIRFLOW-6695] Add DAG run configuration to UI
URL: https://github.com/apache/airflow/pull/7312#discussion_r375382143
 
 

 ##########
 File path: airflow/www/templates/airflow/trigger.html
 ##########
 @@ -0,0 +1,36 @@
+{#
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+#}
+
+{% extends "airflow/master.html" %}
+
+{% block content %}
+    {{ super() }}
+    <h2>Trigger DAG</h2>
 
 Review comment:
   Which dag? We should show that on the page.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] potiuk commented on issue #7312: [AIRFLOW-6695] Add DAG run configuration to UI

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #7312: [AIRFLOW-6695] Add DAG run configuration to UI
URL: https://github.com/apache/airflow/pull/7312#issuecomment-582467857
 
 
   I am not really experienced in that part of the code (UI)? I will let others take a look (@ashb /@kaxil @mik-laj ). ?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services