You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/01/31 15:40:00 UTC

[jira] [Commented] (AIRFLOW-3737) Kubernetes executor cannot handle long dag/task names

    [ https://issues.apache.org/jira/browse/AIRFLOW-3737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16757372#comment-16757372 ] 

ASF GitHub Bot commented on AIRFLOW-3737:
-----------------------------------------

PaulW commented on pull request #4636: [AIRFLOW-3737] Kubernetes executor cannot handle long dag/task names
URL: https://github.com/apache/airflow/pull/4636
 
 
   Make sure you have checked _all_ steps below.
   
   ### Jira
   
   - [X] My PR addresses the following [Airflow Jira] https://issues.apache.org/jira/browse/AIRFLOW-3737
   
   ### Description
   
   - [X] Here are some details about my PR, including screenshots of any UI changes:
   Kubernetes has a 63char limit on label values, so when running either a
   subdag or a dag with a name with a length longer than 63 chars, the pod
   creation process will fail with the following error:
   
     [2019-01-21 08:07:05,337] {rest.py:219} DEBUG - response body:
     {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"unable
     to parse requirement: invalid label value:
     \"very_long_dag_name.very_long_task_name\": must be no more than 63
     characters","reason":"BadRequest","code":400}
   
   Annotations however, allow for a relatively unrestricted length when
   storing them against pods, and as such would be better suited in this
   situation.
   
   ### Tests
   
   - [X] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
   This pull request fixes a bug in `KubernetesJobWatcher`, which doesn't yet have any tests (it is patched
   out in tests of the `KubernetesExecutor`).  It isn't straightforward to add meaningful tests to the
   `KubernetesJobWatcher` due to its integration with `kube_client`. We could pass in a mock, but we don't
   think this would actually achieve anything and could actually create difficulties in the future as we
   would be making assumptions on how to code works, instead on what the code does. This is really crying
   out for an integration test, but we believe that is outside the scope of this pull request. We're happy
   to take advice from the community on this 
   
   ### Commits
   
   - [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/)":
     1. Subject is separated from body by a blank line
     1. Subject is limited to 50 characters (not including Jira issue reference)
     1. Subject does not end with a period
     1. Subject uses the imperative mood ("add", not "adding")
     1. Body wraps at 72 characters
     1. 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
   
   ### Code Quality
   
   - [X] Passes `flake8`
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


> Kubernetes executor cannot handle long dag/task names
> -----------------------------------------------------
>
>                 Key: AIRFLOW-3737
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3737
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: scheduler
>    Affects Versions: 1.10.2
>            Reporter: afusr
>            Priority: Minor
>
> When using the Kubernetes Executor, if the combined DAG and Task name is longer than 63 characters the scheduler is unable to create a pod and stops processing further dags. For example the logs show the following:
> (edit: our issue appears to be related to using the subdag operator, the string which is 67 chars is the full subdag title)
> {noformat}
> [2019-01-21 08:07:05,337] {rest.py:219} DEBUG - response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"unable to parse requirement: invalid label value: \"very_long_dag_name.very_long_task_name\": must be no more than 63 characters","reason":"BadRequest","code":400}
> [2019-01-21 08:07:05,389] {dag_processing.py:579} WARNING - Ending without manager process.
> [2019-01-21 08:07:05,390] {jobs.py:1510} INFO - Exited execute loop
> {noformat}
> The error appears to be returned by the k8s api. 
> Perhaps related to the code here? 
> https://github.com/apache/airflow/blob/a7e369f082025fb089d909a6978106bb7cd24798/airflow/contrib/executors/kubernetes_executor.py#L499-L517
> This was tested using 1.10.2RC2



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)