question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add conf not importable from airflow rule

See original GitHub issue

Description

A new rule should be added to Airflow upgrade check to verify that users import conf from proper place and their code will work with 2.0.

Use case / motivation

In 1.10 users can do:

In [1]: from airflow import conf

In [2]: conf
Out[2]: <airflow.configuration.AirflowConfigParser at 0x7f6f28650f28>

in 2.0 it’s not possible:

In [1]: from airflow import conf
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-2cf28b1802b4> in <module>
----> 1 from airflow import conf

ImportError: cannot import name 'conf'

Are you willing to submit a PR?

Possibly if time allows 🕐

Related Issues

N/A

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
griffincosgrovecommented, Jan 28, 2021

Hey @turbaszek, I am interested in making a PR for this.

I see you tagged this with good first issue. I am still a novice when it comes to airflow, so if you could help me with the review I think we can accomplish this together.

0reactions
digitalsimbojacommented, Mar 15, 2021

Yes,

That is correct.

Regards

On Mon, Mar 15, 2021, 4:42 PM eladkal @.***> wrote:

@turbaszek https://github.com/turbaszek @digitalsimboja https://github.com/digitalsimboja this is solved by #14400 https://github.com/apache/airflow/pull/14400 correct?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/apache/airflow/issues/13945#issuecomment-799522219, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHUTWR3HCUE25YWREWVMOJDTDYTF5ANCNFSM4WWUCMUQ .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Source code for airflow.configuration - Apache Airflow
The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file...
Read more >
Dag dependency Plug in : error : cannot import name 'conf ...
I would recommend upgrading to Airflow 2.1, the DAG Dependency view was added to core Airflow itself by the author of ...
Read more >
DAG writing best practices in Apache Airflow - Astronomer Docs
If this code is in a DAG file, these functions are executed on every Scheduler heartbeat, which may not be performant. Even more...
Read more >
Configuration — SQLFluff 1.4.5 documentation
If both exclude_rules and rules have non-empty value, then the excluded rules are removed from the rules list. This allows for example enabling...
Read more >
DAGs, Operators, Connections, and other issues in Apache ...
Adding apache-airflow-providers-amazon causes my environment to fail · Broken DAG ... I received 'Broken DAG: No module named psycopg2' error.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found