Skip to content

Presto hook is broken in the latest provider release (2.2.0) #23059

Description

@pingzh

Apache Airflow version

2.2.5 (latest released)

What happened

The latest presto provider release https://pypi.org/project/apache-airflow-providers-presto/ is broken due to:

  File "/usr/local/lib/python3.8/site-packages/airflow/providers/presto/hooks/presto.py", line 117, in get_conn
    http_headers = {"X-Presto-Client-Info": generate_presto_client_info()}
  File "/usr/local/lib/python3.8/site-packages/airflow/providers/presto/hooks/presto.py", line 56, in generate_presto_client_info
    'try_number': context_var['try_number'],
KeyError: 'try_number'

What you think should happen instead

This is due to the latest airflow release 2.2.5 does not include this PR:

#22297

the presto hook changes were introduced in this pr #22416

How to reproduce

No response

Operating System

Mac

Versions of Apache Airflow Providers

https://pypi.org/project/apache-airflow-providers-presto/

version: 2.2.0

Deployment

Other

Deployment details

local

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

cc @levyitay

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions