Compare commits

..
Author SHA1 Message Date
Adw8 d6a8f8e080 Add logs 2024-09-13 12:59:42 +05:30
2 changed files with 11 additions and 13 deletions
+7 -13
View File
@@ -14,7 +14,6 @@
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
import click
import os
from dataclasses import dataclass
import json
import platform
@@ -85,18 +84,13 @@ def _filter_for_platform(container: str,
tag_list: List[str]) -> List[str] :
filtered_tags = []
this_machine = platform.machine()
if "DOCKER_DEFAULT_PLATFORM" in os.environ:
this_machine = os.environ["DOCKER_DEFAULT_PLATFORM"].split("/")[-1]
if opts.o.debug:
print(f"DOCKER_DEFAULT_PLATFORM says the architecture is: {this_machine}")
else:
# Translate between Python and docker platform names
if this_machine == "x86_64":
this_machine = "amd64"
if this_machine == "aarch64":
this_machine = "arm64"
if opts.o.debug:
print(f"Python says the architecture is: {this_machine}")
# Translate between Python and docker platform names
if this_machine == "x86_64":
this_machine = "amd64"
if this_machine == "aarch64":
this_machine = "arm64"
if opts.o.debug:
print(f"Python says the architecture is: {this_machine}")
docker = DockerClient()
for tag in tag_list:
remote_tag = f"{registry_info.registry}/{container}:{tag}"
@@ -623,12 +623,16 @@ def command( # noqa: C901
main_logger.log(
f"Directing deployment logs to: {run_log_file_path}"
)
main_logger.log(f"Attempting to open: {run_log_file_path}")
run_log_file = open(run_log_file_path, "wt")
main_logger.log("After opening log file")
run_reg_client = LaconicRegistryClient(
laconic_config, log_file=run_log_file
)
main_logger.log("After running registry client")
build_logger = TimedLogger(run_id, run_log_file)
main_logger.log("After running timed logger")
build_logger.log("Processing ...")
process_app_deployment_request(
ctx,