Skip to content

Hooks don't finish successfully in a GitHub codespace #62408

Closed

Description

@TopCoder2K

Apache Airflow version

main (development)

If "Other Airflow 3 version" selected, which one?

No response

What happened?

I've fixed a bug but I'm unable to commit the changes. Here are the problem hooks:

Update dependencies for providers................................................Failed
- hook id: update-providers-dependencies
- exit code: 1

  Traceback (most recent call last):
    File "/opt/airflow/providers/../scripts/ci/prek/update_providers_dependencies.py", line 35, in <module>
      import yaml
  ModuleNotFoundError: No module named 'yaml'
Check AIRFLOW_V imports in tests.................................................Failed
- hook id: check-airflow-v-imports-in-tests
- exit code: 1

  Traceback (most recent call last):
    File "/opt/airflow/providers/../scripts/ci/prek/check_airflow_v_imports_in_tests.py", line 90, in <module>
      main()
    File "/opt/airflow/providers/../scripts/ci/prek/check_airflow_v_imports_in_tests.py", line 78, in main
      all_errors.extend(check_airflow_v_imports_and_fix(test_file))
    File "/opt/airflow/providers/../scripts/ci/prek/check_airflow_v_imports_in_tests.py", line 50, in check_airflow_v_imports_and_fix
      console.print("Found AIRFLOW_V_*_PLUS import in test file:", test_file)
  AttributeError: 'NoneType' object has no attribute 'print'
Check dependency of SQL providers................................................Failed
- hook id: check-sql-dependency-common-data-structure
- exit code: 1

  Traceback (most recent call last):
    File "/opt/airflow/providers/../scripts/ci/prek/check_common_sql_dependency.py", line 34, in <module>
      import yaml
  ModuleNotFoundError: No module named 'yaml'
Check providers import hook lineage code from compat.............................Failed
- hook id: check-get-lineage-collector-providers
- exit code: 1

  Traceback (most recent call last):
    File "/opt/airflow/providers/../scripts/ci/prek/check_airflow_imports.py", line 94, in <module>
      sys.exit(main())
    File "/opt/airflow/providers/../scripts/ci/prek/check_airflow_imports.py", line 79, in main
      console.print(f"[blue]{path}:[/] Import count: {import_count}, error_count {local_error_count}")
  AttributeError: 'NoneType' object has no attribute 'print'
Provider subpackage init files are there.........................................Failed
- hook id: check-providers-subpackages-init-file-exist
- exit code: 1
[skipped many rows]
  Traceback (most recent call last):
    File "/opt/airflow/providers/../scripts/ci/prek/check_providers_subpackages_all_have_init.py", line 184, in <module>
      console.print("[green]All __init__.py files are present and have necessary extensions.[/]")
  AttributeError: 'NoneType' object has no attribute 'print'
error: Failed to run hook `insert-license`
  caused by: Run command `python hook` failed
  caused by: No such file or directory (os error 2)

I've changed only 2 files that are not connected with the errors.

What you think should happen instead?

Changes are committed successfully.

How to reproduce

Just try to commit something.

Operating System

Linux

Versions of Apache Airflow Providers

No response

Deployment

Official Apache Airflow Helm Chart

Deployment details

GitHub Codespaces

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. added
    kind:bug
    needs-triage
    on Feb 24, 2026
  2. added
    area:CI
    on Feb 24, 2026
  3. TopCoder2K commented on Feb 25, 2026

    @TopCoder2K
    ContributorAuthor

    (I want to note that this might relate to #62405.)

  4. josh-fell commented on Feb 27, 2026

    @josh-fell
    Contributor

    This more of a discussion than an issue since it relates to CI.

    @TopCoder2K You may get some help in the Airflow Slack community either the #contributors or #user-troubleshooting channels.

  5. locked and limited conversation to collaborators on Feb 27, 2026
  6. converted this issue into a discussion #62574 on Feb 27, 2026
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

    area:CIarea:corekind:bugneeds-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions