Skip to content

[airflow] extend AIR311 rules#17913

Merged
ntBre merged 2 commits intoastral-sh:mainfrom
astronomer:extend-AIR311
May 9, 2025
Merged

[airflow] extend AIR311 rules#17913
ntBre merged 2 commits intoastral-sh:mainfrom
astronomer:extend-AIR311

Conversation

@Lee-W
Copy link
Contributor

@Lee-W Lee-W commented May 7, 2025

Summary

  • airflow.models.Connectionairflow.sdk.Connection
  • airflow.models.Variableairflow.sdk.Variable

Test Plan

The test fixtures has been updated (see the first commit for easier review)

Lee-W added 2 commits May 7, 2025 19:06
@github-actions
Copy link
Contributor

github-actions bot commented May 7, 2025

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+952 -0 violations, +0 -0 fixes in 1 projects; 54 projects unchanged)

apache/airflow (+952 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --no-fix --output-format concise --preview --select ALL

+ airflow-core/src/airflow/api_fastapi/core_api/routes/public/connections.py:115:17: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/api_fastapi/core_api/routes/public/connections.py:125:26: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/api_fastapi/core_api/routes/public/connections.py:154:18: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/api_fastapi/core_api/routes/public/connections.py:193:17: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/api_fastapi/core_api/routes/public/connections.py:193:52: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/api_fastapi/core_api/routes/public/connections.py:232:16: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/api_fastapi/core_api/routes/public/connections.py:72:40: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/api_fastapi/core_api/routes/public/connections.py:92:40: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/connection_command.py:115:37: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/connection_command.py:122:27: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/connection_command.py:191:50: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/connection_command.py:191:71: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/connection_command.py:258:20: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/connection_command.py:262:20: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/connection_command.py:266:20: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/connection_command.py:280:38: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/connection_command.py:280:56: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/connection_command.py:309:48: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/connection_command.py:309:66: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/connection_command.py:344:54: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/connection_command.py:344:75: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/connection_command.py:47:30: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/connection_command.py:85:24: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/connection_command.py:87:33: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/connection_command.py:98:31: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/rotate_fernet_key_command.py:40:17: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/rotate_fernet_key_command.py:41:34: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/rotate_fernet_key_command.py:41:60: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/rotate_fernet_key_command.py:44:36: AIR311 `airflow.models.Variable` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/rotate_fernet_key_command.py:44:63: AIR311 `airflow.models.Variable` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/variable_command.py:106:13: AIR311 `airflow.models.Variable` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/variable_command.py:126:38: AIR311 `airflow.models.Variable` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/variable_command.py:42:44: AIR311 `airflow.models.Variable` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/variable_command.py:52:19: AIR311 `airflow.models.Variable` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/variable_command.py:55:19: AIR311 `airflow.models.Variable` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/variable_command.py:65:5: AIR311 `airflow.models.Variable` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/variable_command.py:73:5: AIR311 `airflow.models.Variable` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/variable_command.py:94:52: AIR311 `airflow.models.Variable` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/cli/commands/variable_command.py:94:72: AIR311 `airflow.models.Variable` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/secrets/metastore.py:39:79: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/secrets/metastore.py:49:38: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/secrets/metastore.py:49:56: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/secrets/metastore.py:64:43: AIR311 `airflow.models.Variable` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/src/airflow/secrets/metastore.py:64:59: AIR311 `airflow.models.Variable` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/tests/unit/always/test_connection.py:119:27: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/tests/unit/always/test_connection.py:128:27: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/tests/unit/always/test_connection.py:140:31: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/tests/unit/always/test_connection.py:351:22: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/tests/unit/always/test_connection.py:381:22: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
+ airflow-core/tests/unit/always/test_connection.py:383:20: AIR311 `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
... 902 additional changes omitted for project

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
AIR311 952 952 0 0 0

@Lee-W Lee-W mentioned this pull request May 7, 2025
2 tasks
@MichaReiser MichaReiser requested a review from ntBre May 9, 2025 06:29
Copy link
Contributor

@ntBre ntBre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ntBre ntBre added rule Implementing or modifying a lint rule preview Related to preview mode features labels May 9, 2025
@ntBre ntBre merged commit 25e13de into astral-sh:main May 9, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview Related to preview mode features rule Implementing or modifying a lint rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants