Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QuboleHook unable to build command with list tags #9347

Closed
egibbm opened this issue Jun 17, 2020 · 7 comments
Closed

QuboleHook unable to build command with list tags #9347

egibbm opened this issue Jun 17, 2020 · 7 comments
Labels
kind:bug This is a clearly a bug

Comments

@egibbm
Copy link
Contributor

egibbm commented Jun 17, 2020

Apache Airflow version: 1.10.10

Kubernetes version (if you are using kubernetes) (use kubectl version):

Environment:

What happened:

Recently, we upgraded airflow version from v1.10.5 to v1.10.10 due to airflow instance that upgraded to ubuntu bionic. Existing dag configuration having tags as list causes an issue at some jobs that use Qubole.
Error log:

Traceback (most recent call last):
  File "/home/jenkins/virtualenv/airflow/lib/python3.6/site-packages/airflow/models/taskinstance.py", line 983, in _run_raw_task
    result = task_copy.execute(context=context)
  File "/home/jenkins/virtualenv/airflow/lib/python3.6/site-packages/airflow/contrib/operators/qubole_operator.py", line 207, in execute
    return self.get_hook().execute(context)
  File "/home/jenkins/virtualenv/airflow/lib/python3.6/site-packages/airflow/contrib/hooks/qubole_hook.py", line 131, in execute
    args = self.cls.parse(self.create_cmd_args(context))
  File "/home/jenkins/virtualenv/airflow/lib/python3.6/site-packages/airflow/contrib/hooks/qubole_hook.py", line 248, in create_cmd_args
    self._add_tags(tags, value)
  File "/home/jenkins/virtualenv/airflow/lib/python3.6/site-packages/airflow/contrib/hooks/qubole_hook.py", line 267, in _add_tags
    tags.extend(value)
AttributeError: 'set' object has no attribute 'extend'

What you expected to happen:

the tags should be included as a comma separated arguments to the build command.

How to reproduce it:
using sample dag having list tags

    t2 = QuboleOperator(
        task_id='hive_gcs_location',
        command_type="hivecmd",
        script_location="s3n://public-qubole/qbol-library/scripts/show_table.hql",
        notify=True,
        tags=['tag1', 'tag2'],
        trigger_rule="all_done"
    )

and do an airflow run.

@egibbm egibbm added the kind:bug This is a clearly a bug label Jun 17, 2020
@boring-cyborg
Copy link

boring-cyborg bot commented Jun 17, 2020

Thanks for opening your first issue here! Be sure to follow the issue template!

@mik-laj
Copy link
Member

mik-laj commented Sep 14, 2020

@chattarajoy @anmol-dhingra @randuhmm Can you take a look at this ticket? Would you like to help solve it?

@chattarajoy
Copy link
Contributor

@mik-laj this was fixed with #9349

@mik-laj
Copy link
Member

mik-laj commented Sep 14, 2020

@chattarajoy Awesome!

This is one more topic. We are trying to improve our documentation, and I see a guides that explains how to use these operators is missing. Here are guides for other operators: https://airflow.readthedocs.io/en/latest/howto/operator/index.html
Wouldn't you like to write a guide for this operator? In practice, the guide is an example DAG file + description.

@mik-laj
Copy link
Member

mik-laj commented Sep 14, 2020

This provider also has poor typing coverage.
#9708 (comment)

@chattarajoy
Copy link
Contributor

chattarajoy commented Sep 14, 2020

sure @mik-laj, created issues for both the points mentioned will look into it. Could you pls change the assignee for the to me?

@mik-laj
Copy link
Member

mik-laj commented Sep 14, 2020

@chattarajoy I assigned you to these tickets.

@mik-laj mik-laj closed this as completed Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug This is a clearly a bug
Projects
None yet
Development

No branches or pull requests

3 participants