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 2022/07/22 14:46:01 UTC

[GitHub] [airflow] potiuk commented on pull request #25196: Disallow any dag tags longer than 100 char

potiuk commented on PR #25196:
URL: https://github.com/apache/airflow/pull/25196#issuecomment-1192649208

   > I'd like to try to give an explanation :)
   > 
   > The [DagTag](https://github.com/apache/airflow/blob/be7cb1e837b875f44fcf7903329755245dd02dc3/airflow/models/dag.py#L2781) class requires the maximum length of the Tag to be 100 chars. Because of that, the error occurs during the loading of the Tag into the Db.
   > 
   > I believe SqlLite is not affected by this bug as, according to the [SqlLite documentation](https://www.sqlite.org/datatype3.html) (3.1.1),
   > 
   > > numeric arguments in parentheses that following the type name (ex: "VARCHAR(255)") are ignored by SQLite - SQLite does not impose any length restrictions [...] on the length of strings
   > 
   > It follows that the tag is uploaded into the db despite the restriction.
   
   Cool. Lets then extrat the 100 from there to a constant and use it in Both places.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org