Skip to content

Apply auto import #17355

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

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Apply auto import #17355

wants to merge 6 commits into from

Conversation

Lee-W
Copy link
Contributor

@Lee-W Lee-W commented Apr 11, 2025

Summary

Test Plan

Lee-W added 6 commits April 11, 2025 22:24
* arguments
    * `airflow..DAG
dag`
        * `sla_miss_callback`
    * operators
        * `sla`
* name
    * `airflow.Dataset]
[airflow.datasets.Dataset` → `airflow.sdk.Asset`
    * `airflow.datasets, rest @ ..`
        * `DatasetAlias` → `airflow.sdk.AssetAlias`
        * `DatasetAll` → `airflow.sdk.AssetAll`
        * `DatasetAny` → `airflow.sdk.AssetAny`
        * `expand_alias_to_datasets` → `airflow.sdk.expand_alias_to_assets`
        * `metadata.Metadata` → `airflow.sdk.Metadata`
    <!--airflow.models.baseoperator-->
    * `airflow.models.baseoperator.chain` → `airflow.sdk.chain`
    * `airflow.models.baseoperator.chain_linear` → `airflow.sdk.chain_linear`
    * `airflow.models.baseoperator.cross_downstream` → `airflow.sdk.cross_downstream`
    * `airflow.models.baseoperatorlink.BaseOperatorLink` → `airflow.sdk.definitions.baseoperatorlink.BaseOperatorLink`
    * `airflow.timetables, rest @ ..`
        * `datasets.DatasetOrTimeSchedule` → * `airflow.timetables.assets.AssetOrTimeSchedule`
    * `airflow.utils, rest @ ..`
        <!--airflow.utils.dag_parsing_context-->
        * `dag_parsing_context.get_parsing_context` → `airflow.sdk.get_parsing_context`
@Lee-W
Copy link
Contributor Author

Lee-W commented Apr 11, 2025

Hey @ntBre , I found out a Failed to converge after 10 iterations. This likely indicates a bug in the implementation of the fix. Last diagnostics: error during testing. but the traceback does not provide much information. Do you know what the cause might be? thanks!

@ntBre
Copy link
Contributor

ntBre commented Apr 11, 2025

Hey @ntBre , I found out a Failed to converge after 10 iterations. This likely indicates a bug in the implementation of the fix. Last diagnostics: error during testing. but the traceback does not provide much information. Do you know what the cause might be? thanks!

That usually points to a loop between two rules, for example one rule might add an import and the other deletes it. Based on the test that's failing, it probably only has one rule (AIR301) enabled, so it would probably have to be a loop within that rule. Do any of the replacements overlap? Something like

import a  # error, import b instead

Fixed to

import b  # error, import a instead

Fixed to

import a

and so on. There could even be more parts in the chain like a -> b -> c -> a, which could make it harder to identify, but something like this should be the cause.

@Lee-W
Copy link
Contributor Author

Lee-W commented Apr 12, 2025

Hey @ntBre , I found out a Failed to converge after 10 iterations. This likely indicates a bug in the implementation of the fix. Last diagnostics: error during testing. but the traceback does not provide much information. Do you know what the cause might be? thanks!

That usually points to a loop between two rules, for example one rule might add an import and the other deletes it. Based on the test that's failing, it probably only has one rule (AIR301) enabled, so it would probably have to be a loop within that rule. Do any of the replacements overlap? Something like

import a  # error, import b instead

Fixed to

import b  # error, import a instead

Fixed to

import a

and so on. There could even be more parts in the chain like a -> b -> c -> a, which could make it harder to identify, but something like this should be the cause.

Hmm... don't think we have such case. but will take a deeper look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants