@@ -357,7 +357,7 @@ def migrate_to_cdk_v7(self) -> bool:
357357 1. If the connector uses source-declarative-manifest, updates the metadata.yaml
358358 to use baseImage: docker.io/airbyte/source-declarative-manifest:7.0.0@sha256:<TBD>
359359 2. If the connector is Python, sets the version in pyproject.toml to ^7
360-
360+
361361 For both cases, it also increments the dockerImageTag in metadata.yaml.
362362
363363 Returns:
@@ -412,9 +412,7 @@ def _migrate_declarative_manifest_to_v7(self) -> bool:
412412 metadata_content = f .read ()
413413
414414 # Update the baseImage to version 7
415- new_base_image = (
416- f"docker.io/airbyte/source-declarative-manifest:7.0.1@sha256:ff1e701c8f913cf24a0220f62c8e64cc1c3011ba0a636985f4db47fdab1391b6"
417- )
415+ new_base_image = f"docker.io/airbyte/source-declarative-manifest:7.0.1@sha256:ff1e701c8f913cf24a0220f62c8e64cc1c3011ba0a636985f4db47fdab1391b6"
418416
419417 # Replace the base image using regex to preserve formatting
420418 base_image_pattern = r"(baseImage:\s*)[^\n\r]+"
@@ -525,21 +523,17 @@ def _update_docker_image_tag(self) -> bool:
525523 # Update the dockerImageTag field by incrementing the version
526524 docker_tag_pattern = r"(dockerImageTag:\s*)([^\n\r]+)"
527525 docker_tag_match = re .search (docker_tag_pattern , metadata_content )
528-
526+
529527 if docker_tag_match :
530528 current_tag = docker_tag_match .group (2 ).strip ()
531529 new_tag = self ._increment_version (current_tag )
532-
533- updated_content = re .sub (
534- docker_tag_pattern ,
535- rf"\g<1>{ new_tag } " ,
536- metadata_content
537- )
538-
530+
531+ updated_content = re .sub (docker_tag_pattern , rf"\g<1>{ new_tag } " , metadata_content )
532+
539533 # Write back the updated metadata
540534 with open (metadata_file , "w" ) as f :
541535 f .write (updated_content )
542-
536+
543537 print (f"Updated dockerImageTag from { current_tag } to { new_tag } for { self .name } " )
544538 return True
545539 else :
0 commit comments