Skip to content

Fixing CI in main due to failing generate sdk datamodels#48090

Closed
amoghrajesh wants to merge 1 commit intoapache:mainfrom
amoghrajesh:fixstaticchecks
Closed

Fixing CI in main due to failing generate sdk datamodels#48090
amoghrajesh wants to merge 1 commit intoapache:mainfrom
amoghrajesh:fixstaticchecks

Conversation

@amoghrajesh
Copy link
Contributor

@amoghrajesh amoghrajesh commented Mar 22, 2025

Example failure:

pre-commit hook(s) made changes.
If you are seeing this message in CI, reproduce locally with: `pre-commit run --all-files`.
To run `pre-commit` as part of git workflow, use `pre-commit install`.
All changes made by hooks:
diff --git a/task-sdk/src/airflow/sdk/api/datamodels/_generated.py b/task-sdk/src/airflow/sdk/api/datamodels/_generated.py
index 0ed6fc9..2fb9295 100644
--- a/task-sdk/src/airflow/sdk/api/datamodels/_generated.py
+++ b/task-sdk/src/airflow/sdk/api/datamodels/_generated.py
@@ -97,6 +97,14 @@ class DagRunAssetReference(BaseModel):
 
 
 class DagRunState(str, Enum):
+    """
+    All possible states that a DagRun can be in.
+
+    These are "shared" with TaskInstanceState in some parts of the code,
+    so please ensure that their values always match the ones with the
+    same name in TaskInstanceState.
+    """
+
     QUEUED = "queued"
     RUNNING = "running"
     SUCCESS = "success"
@@ -112,6 +120,10 @@ class DagRunStateResponse(BaseModel):
 
 
 class DagRunType(str, Enum):
+    """
+    Class with DagRun types.
+    """
+
     BACKFILL = "backfill"
     SCHEDULED = "scheduled"
     MANUAL = "manual"
@@ -119,6 +131,10 @@ class DagRunType(str, Enum):
 
 
 class IntermediateTIState(str, Enum):
+    """
+    States that a Task Instance can be in that indicate it is not yet in a terminal or running state.
+    """
+
     SCHEDULED = "scheduled"
     QUEUED = "queued"
     RESTARTING = "restarting"
@@ -[256](https://github.com/apache/airflow/actions/runs/14004064574/job/39216142215#step:6:257),6 +272,10 @@ class TITargetStatePayload(BaseModel):
 
 
 class TerminalStateNonSuccess(str, Enum):
+    """
+    TaskInstance states that can be reported without extra information.
+    """
+
     FAILED = "failed"
     SKIPPED = "skipped"
     REMOVED = "removed"

This error means that you have to fix the issues listed above:

http://github.com/apache/airflow/actions/runs/14004064574/job/39216142215

This was done so that cadwyn had 5.1.2 issues and 5.1.3 seems to have fixed it: https://github.com/zmievsa/cadwyn


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@amoghrajesh
Copy link
Contributor Author

Closing in favour of https://github.com/apache/airflow/pull/48091/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants