Skip to content

Commit 03fd9b8

Browse files
committed
Cleanup TODOs
1 parent 747c4ba commit 03fd9b8

File tree

3 files changed

+5
-20
lines changed

3 files changed

+5
-20
lines changed

scripts/release/atomic_pipeline.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -594,14 +594,13 @@ def build_multi_arch_agent_in_sonar(
594594
build_image_generic(
595595
image_name="mongodb-agent-ubi",
596596
dockerfile_path="docker/mongodb-agent-non-matrix/Dockerfile",
597-
build_configuration=build_config_copy,
597+
build_configuration=build_config_copy, #TODO: why ?
598598
is_multi_arch=True,
599599
multi_arch_args_list=joined_args,
600600
)
601601

602602

603-
# TODO: why versions are wrong -> 13.35.0.9498-1_13.35.0.9498-1_6874c19d2aab5d0007820c51 ; duplicate
604-
# TODO: figure out why I hit toomanyrequests: Rate exceeded with the new pipeline
603+
# TODO: Observed rate limiting (429) sometimes for agent builds in patches
605604
def build_agent_default_case(build_configuration: BuildConfiguration):
606605
"""
607606
Build the agent only for the latest operator for patches and operator releases.
@@ -646,7 +645,6 @@ def build_agent_default_case(build_configuration: BuildConfiguration):
646645
queue_exception_handling(tasks_queue)
647646

648647

649-
# TODO: for now, release agents ECR release versions with image:version_version (duplicated)
650648
def build_agent_on_agent_bump(build_configuration: BuildConfiguration):
651649
"""
652650
Build the agent matrix (operator version x agent version), triggered by PCT.

scripts/release/build_context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ def infer_scenario_from_environment(cls) -> "BuildScenario":
2323
patch_id = os.getenv("version_id")
2424

2525
if git_tag:
26-
scenario = BuildScenario.RELEASE
26+
scenario = BuildScenario.RELEASE # TODO: git tag won't trigger the pipeline, only the promotion process
2727
logger.info(f"Build scenario: {scenario} (git_tag: {git_tag})")
2828
elif is_patch:
2929
scenario = BuildScenario.PATCH
3030
logger.info(f"Build scenario: {scenario} (patch_id: {patch_id})")
3131
elif is_evg:
3232
scenario = (
3333
BuildScenario.MASTER
34-
) # TODO: ultimately we won't have RELEASE variant and master will push to staging
34+
) # TODO: MASTER -> Staging
3535
logger.info(f"Build scenario: {scenario} (patch_id: {patch_id})")
3636
else:
3737
scenario = BuildScenario.DEVELOPMENT

scripts/release/build_images.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from scripts.evergreen.release.images_signing import sign_image, verify_signature
1616

1717

18-
# TODO: self review the PR
1918
def ecr_login_boto3(region: str, account_id: str):
2019
"""
2120
Fetches an auth token from ECR via boto3 and logs
@@ -43,7 +42,7 @@ def ecr_login_boto3(region: str, account_id: str):
4342
logger.debug(f"ECR login succeeded: {status}")
4443

4544

46-
# TODO: don't do it every time ? Check for existence without relying on Exception
45+
# TODO: use builders = docker.buildx.list() instead of an exception
4746
def ensure_buildx_builder(builder_name: str = "multiarch") -> str:
4847
"""
4948
Ensures a Docker Buildx builder exists for multi-platform builds.
@@ -144,18 +143,6 @@ def process_image(
144143
# Login to ECR using boto3
145144
ecr_login_boto3(region="us-east-1", account_id="268558157000") # TODO: use environment variables
146145

147-
# Helper to automatically create registry with correct name
148-
should_create_repo = False
149-
if should_create_repo:
150-
repo_to_create = "julienben/staging-temp/" + image_name
151-
logger.debug(f"repo_to_create: {repo_to_create}")
152-
create_ecr_repository(repo_to_create)
153-
logger.info(f"Created repository {repo_to_create}")
154-
155-
# Set default platforms if none provided TODO: remove from here and do it at higher level later
156-
if platforms is None:
157-
platforms = ["linux/amd64"]
158-
159146
docker_registry = f"{base_registry}/{image_name}"
160147
image_full_uri = f"{docker_registry}:{image_tag}"
161148

0 commit comments

Comments
 (0)