5
5
import json
6
6
import shutil
7
7
from pathlib import Path
8
- from typing import Any , Dict , List , Mapping , Union
8
+ from typing import Any
9
9
10
10
import git # type: ignore
11
11
from anyio import Semaphore # type: ignore
12
12
from connector_ops .utils import ConnectorLanguage # type: ignore
13
13
from pipelines .airbyte_ci .connectors .consts import CONNECTOR_TEST_STEP_ID
14
- from pipelines .airbyte_ci .connectors .context import ConnectorContext , PipelineContext
14
+ from pipelines .airbyte_ci .connectors .context import ConnectorContext
15
15
from pipelines .airbyte_ci .connectors .migrate_to_manifest_only .manifest_component_transformer import ManifestComponentTransformer
16
16
from pipelines .airbyte_ci .connectors .migrate_to_manifest_only .manifest_resolver import ManifestReferenceResolver
17
17
from pipelines .airbyte_ci .connectors .migrate_to_manifest_only .utils import (
18
18
get_latest_base_image ,
19
19
readme_for_connector ,
20
20
remove_parameters_from_manifest ,
21
- revert_connector_directory ,
22
21
)
23
22
from pipelines .airbyte_ci .connectors .reports import Report
24
23
from pipelines .helpers .connectors .command import run_connector_steps
25
24
from pipelines .helpers .connectors .yaml import read_yaml , write_yaml
26
- from pipelines .helpers .execution .run_steps import STEP_TREE , StepToRun , run_steps
25
+ from pipelines .helpers .execution .run_steps import STEP_TREE , StepToRun
27
26
from pipelines .models .steps import Step , StepResult , StepStatus
28
27
29
28
## GLOBAL VARIABLES ##
@@ -54,7 +53,7 @@ async def _run(self) -> StepResult:
54
53
return StepResult (
55
54
step = self ,
56
55
status = StepStatus .SKIPPED ,
57
- stderr = f "The connector is not a low-code connector." ,
56
+ stderr = "The connector is not a low-code connector." ,
58
57
)
59
58
60
59
if connector .language == ConnectorLanguage .MANIFEST_ONLY :
@@ -153,7 +152,7 @@ async def _run(self) -> StepResult:
153
152
connector = self .context .connector
154
153
155
154
## 1. Move manifest.yaml to the root level of the directory
156
- self .logger .info (f "Moving manifest to the root level of the directory" )
155
+ self .logger .info ("Moving manifest to the root level of the directory" )
157
156
root_manifest_path = connector .code_directory / "manifest.yaml"
158
157
connector .manifest_path .rename (root_manifest_path )
159
158
@@ -173,7 +172,7 @@ async def _run(self) -> StepResult:
173
172
## 3. Check for non-inline spec files and add the data to manifest.yaml
174
173
spec_file = self ._check_if_non_inline_spec (connector .python_source_dir_path )
175
174
if spec_file :
176
- self .logger .info (f "Non-inline spec file found. Migrating spec to manifest" )
175
+ self .logger .info ("Non-inline spec file found. Migrating spec to manifest" )
177
176
try :
178
177
spec_data = self ._read_spec_from_file (spec_file )
179
178
manifest = read_yaml (root_manifest_path )
@@ -228,7 +227,7 @@ async def _run(self) -> StepResult:
228
227
return StepResult (step = self , status = StepStatus .FAILURE , stdout = f"Failed to update acceptance-test-config.yml: { e } " )
229
228
230
229
## 2. Update the connector's metadata
231
- self .logger .info (f "Updating metadata file" )
230
+ self .logger .info ("Updating metadata file" )
232
231
try :
233
232
metadata = read_yaml (connector .metadata_file_path )
234
233
@@ -254,7 +253,7 @@ async def _run(self) -> StepResult:
254
253
return StepResult (step = self , status = StepStatus .FAILURE , stdout = f"Failed to update metadata.yaml: { e } " )
255
254
256
255
## 3. Update the connector's README
257
- self .logger .info (f "Updating README file" )
256
+ self .logger .info ("Updating README file" )
258
257
readme = readme_for_connector (connector .technical_name )
259
258
260
259
with open (connector .code_directory / "README.md" , "w" ) as file :
0 commit comments