zhongjiajie created AIRFLOW-4076:
------------------------------------
Summary: Correct beeline_default port type in initdb function
Key: AIRFLOW-4076
URL: https://issues.apache.org/jira/browse/AIRFLOW-4076
Project: Apache Airflow
Issue Type: Improvement
Components: db
Affects Versions: 1.10.2
Reporter: zhongjiajie
Assignee: zhongjiajie
Fix For: 1.10.3
`beeline_default` conn_id create with command `airflow initdb` use String as
port type
{code:java}
merge_conn(
Connection(
conn_id='beeline_default', conn_type='beeline', port="10000", <== HERE
host='localhost', extra="{\"use_beeline\": true, \"auth\": \"\"}",
schema='default'))
{code}
but `airflow.models.connection` use int type to store port
{code:java}
class Connection(Base, LoggingMixin):
__tablename__ = "connection"
id = Column(Integer(), primary_key=True)
conn_id = Column(String(ID_LEN))
conn_type = Column(String(500))
host = Column(String(500))
schema = Column(String(500))
login = Column(String(500))
_password = Column('password', String(5000))
port = Column(Integer()) <== HERE
is_encrypted = Column(Boolean, unique=False, default=False)
is_extra_encrypted = Column(Boolean, unique=False, default=False)
_extra = Column('extra', String(5000))
{code}
It's could be transfer str to int, but I think is better to pass int values
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)