99
1010import pytest
1111from infrahub_sdk .protocols import CoreGeneratorDefinition , CoreProposedChange
12- from prefect import flow , task
12+ from prefect import flow
1313from pydantic import BaseModel
1414
1515from infrahub import config , lock
@@ -718,7 +718,6 @@ class Repository(BaseModel):
718718 internal_status : str
719719
720720
721- @task
722721def _parse_proposed_change_repositories (
723722 message : messages .RequestProposedChangePipeline , source : list [dict ], destination : list [dict ]
724723) -> list [ProposedChangeRepository ]:
@@ -764,7 +763,6 @@ def _parse_proposed_change_repositories(
764763 return list (pc_repos .values ())
765764
766765
767- @task
768766def _parse_repositories (repositories : list [dict ]) -> list [Repository ]:
769767 """This function assumes that the repos is a list of the edges
770768
@@ -787,7 +785,6 @@ def _parse_repositories(repositories: list[dict]) -> list[Repository]:
787785 return parsed
788786
789787
790- @task
791788def _parse_artifact_definitions (definitions : list [dict ]) -> list [ProposedChangeArtifactDefinition ]:
792789 """This function assumes that definitions is a list of the edges
793790
@@ -818,7 +815,6 @@ def _parse_artifact_definitions(definitions: list[dict]) -> list[ProposedChangeA
818815 return parsed
819816
820817
821- @task
822818async def _get_proposed_change_repositories (
823819 message : messages .RequestProposedChangePipeline , service : InfrahubServices
824820) -> list [ProposedChangeRepository ]:
@@ -838,7 +834,6 @@ async def _get_proposed_change_repositories(
838834 return _parse_proposed_change_repositories (message = message , source = source_all , destination = destination_all )
839835
840836
841- @task
842837async def _validate_repository_merge_conflicts (repositories : list [ProposedChangeRepository ]) -> bool :
843838 conflicts = False
844839 for repo in repositories :
@@ -854,7 +849,6 @@ async def _validate_repository_merge_conflicts(repositories: list[ProposedChange
854849 return conflicts
855850
856851
857- @task
858852async def _gather_repository_repository_diffs (repositories : list [ProposedChangeRepository ]) -> None :
859853 for repo in repositories :
860854 if repo .has_diff and repo .source_commit and repo .destination_commit :
@@ -877,7 +871,6 @@ async def _gather_repository_repository_diffs(repositories: list[ProposedChangeR
877871 repo .files_changed = files_changed
878872
879873
880- @task
881874async def _populate_subscribers (branch_diff : ProposedChangeBranchDiff , service : InfrahubServices , branch : str ) -> None :
882875 result = await service .client .execute_graphql (
883876 query = GATHER_GRAPHQL_QUERY_SUBSCRIBERS ,
@@ -892,7 +885,6 @@ async def _populate_subscribers(branch_diff: ProposedChangeBranchDiff, service:
892885 )
893886
894887
895- @task
896888async def _get_proposed_change_schema_integrity_constraints (
897889 message : messages .RequestProposedChangeSchemaIntegrity , schema : SchemaBranch
898890) -> list [SchemaUpdateConstraintInfo ]:
0 commit comments