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

[Test Failure] Airflow AttributeError: 'CronDataIntervalTimetable' object has no attribute 'can_run' #243

Closed
pankajkoti opened this issue Oct 14, 2024 · 1 comment · Fixed by #237
Assignees

Comments

@pankajkoti
Copy link
Contributor

GitHub action link /~https://github.com/astronomer/dag-factory/actions/runs/11322571556/job/31483518924?pr=237

Observed in PR: #237

_____________________________ test_make_timetable ______________________________

    def test_make_timetable():
        if version.parse(AIRFLOW_VERSION) >= version.parse("2.0.0"):
            td = dagbuilder.DagBuilder("test_dag", DAG_CONFIG, DEFAULT_CONFIG)
            timetable = "airflow.timetables.interval.CronDataIntervalTimetable"
            timetable_params = {"cron": "0 8,16 * * 1-5", "timezone": "UTC"}
            actual = td.make_timetable(timetable, timetable_params)
            assert actual.periodic
>           assert actual.can_run
E           AttributeError: 'CronDataIntervalTimetable' object has no attribute 'can_run'

tests/test_dagbuilder.py:603: AttributeError
@pankajkoti
Copy link
Contributor Author

pankajkoti commented Oct 14, 2024

Resolved in #237 by asserting on attribute can_be_scheduled instead of the unaccessible attribute can_run in newer Airflow versions

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 a pull request may close this issue.

1 participant