Skip to content

Commit

Permalink
[orion-decision/builder] Keep only necessary args for combine.py task
Browse files Browse the repository at this point in the history
  • Loading branch information
asuleimanov committed Oct 10, 2024
1 parent 16616a7 commit 04a86a2
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
13 changes: 1 addition & 12 deletions services/orion-builder/src/orion_builder/combine.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,6 @@ def sanity_check(self, args: argparse.Namespace) -> None:
super().sanity_check(args)
args.tag = [args.git_revision, "latest"]

if not args.load_deps:
load_deps_env = getenv("LOAD_DEPS")
if load_deps_env is None or load_deps_env not in {"0", "1"}:
self.parser.error("LOAD_DEPS must be 0/1")
if load_deps_env == "1":
args.load_deps = True

if args.write is None:
self.parser.error("--output (or ARCHIVE_PATH) is required!")

Expand All @@ -89,11 +82,6 @@ def sanity_check(self, args: argparse.Namespace) -> None:
if args.image is None:
self.parser.error("--image (or IMAGE_NAME) is required!")

if args.load_deps and args.task_id is None:
self.parser.error(
"--task-id (or TASK_ID) is required to load dependency artifacts!"
)


def main(argv: Optional[List[str]] = None) -> None:
"""Combine entrypoint. Does not return."""
Expand All @@ -103,6 +91,7 @@ def main(argv: Optional[List[str]] = None) -> None:
archs = args.archs
config = Configuration(argparse.Namespace(secret=None, config=None))
queue = taskcluster.Queue(config.get_taskcluster_options())
print(f"Starting the task to combine {service_name} images for archs: {archs}")

# 1. Load all archs images into podman
tool = Podman()
Expand Down
1 change: 0 additions & 1 deletion services/orion-decision/src/orion_decision/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ def _create_combine_task(self, service, archs, service_build_tasks):
provisioner=PROVISIONER_ID,
scheduler=self.scheduler_id,
service_name=service.name,
skip_docker=f"{isinstance(service, (ServiceHomebrew, ServiceMsys)):d}",
source_url=SOURCE_URL,
task_group=self.task_group,
task_index=self._build_index(service.name),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@ payload:
env:
ARCHIVE_PATH: /image.tar
BUILD_TOOL: podman
DOCKERFILE: "${dockerfile}"
GIT_REPOSITORY: "${clone_url}"
GIT_REVISION: "${commit}"
IMAGE_NAME: "mozillasecurity/${service_name}"
SERVICE_NAME: "${service_name}"
ARCH: "${archs}" #TODO: check if all archs were passed from scheduler.py
LOAD_DEPS: "${load_deps}"
capabilities:
privileged: true
# TODO: change back to mozillasecurity once approved
Expand Down

0 comments on commit 04a86a2

Please sign in to comment.