builder: require durable workspace execution
Some checks failed
build / build (push) Failing after 2s

This commit is contained in:
robert
2026-05-19 11:28:37 -03:00
parent 960c3558c9
commit d0fa3f3f5f
11 changed files with 126 additions and 34 deletions

View File

@@ -15,6 +15,7 @@ import tarfile
import time
from dataclasses import dataclass
from importlib import resources
from pathlib import Path
from typing import TYPE_CHECKING, Any
import boto3
@@ -927,11 +928,21 @@ def _render_a2a_init_template(
def _render_sdk_template(template: str, /, **vars: str) -> str:
text = (
resources.files("a2a_pack.cli.templates")
.joinpath(template)
.read_text(encoding="utf-8")
local_templates = (
Path(__file__).resolve().parents[2]
/ "a2a"
/ "a2a_pack"
/ "cli"
/ "templates"
)
if local_templates.exists():
text = local_templates.joinpath(template).read_text(encoding="utf-8")
else:
text = (
resources.files("a2a_pack.cli.templates")
.joinpath(template)
.read_text(encoding="utf-8")
)
for key, value in vars.items():
text = text.replace("{{ " + key + " }}", value)
return text