From 10c21fbd6838c2d957a3e3bb6b5305c24d0c714a Mon Sep 17 00:00:00 2001 From: DatTT127 Date: Sun, 19 Jul 2026 00:09:52 +0700 Subject: [PATCH] update --- .../backend_deploy/gitea_modal_build.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/workspace/sprint_1_2/CODEBASE/deps/implementation/backend_deploy/gitea_modal_build.py b/workspace/sprint_1_2/CODEBASE/deps/implementation/backend_deploy/gitea_modal_build.py index a077f2c..c013588 100644 --- a/workspace/sprint_1_2/CODEBASE/deps/implementation/backend_deploy/gitea_modal_build.py +++ b/workspace/sprint_1_2/CODEBASE/deps/implementation/backend_deploy/gitea_modal_build.py @@ -111,9 +111,26 @@ def build_and_push( (docker_config_dir / "config.json").write_text(json.dumps(config)) print(f"ECR auth configured for {registry}") + # --- INSPECT MODAL WORKSPACE DIRECTORIES HERE --- + print("\n=== DEBUG: Inspecting Modal Container Filesystem ===") + try: + # 1. Print the contents of the /workspace root directory + print(f"Contents of {workspace_root}:") + workspace_files = subprocess.run(["ls", "-la", str(workspace_root)], capture_output=True, text=True) + print(workspace_files.stdout) + + # 2. Verify exactly where the copied Kaniko binary lives + print("Checking for Kaniko binary location:") + kaniko_check = subprocess.run(["ls", "-la", "/usr/local/bin/kaniko"], capture_output=True, text=True) + print(kaniko_check.stdout if kaniko_check.returncode == 0 else "❌ Kaniko not found in /usr/local/bin/kaniko\n") + + except Exception as e: + print(f"Failed to run inspection: {e}") + print("==================================================\n") + # Build with Kaniko kaniko_cmd = [ - "/kaniko/executor", # Correct path inside the official debug image + "/usr/local/bin/kaniko", # Update this line to match where it was copied "--context", str(workspace_root), "--dockerfile", str(dockerfile_path), "--destination", full_image,