Skip to content

Commit 6cb2aa1

Browse files
committed
remove references to named_build_context
1 parent c1572fb commit 6cb2aa1

4 files changed

Lines changed: 5 additions & 25 deletions

File tree

README-SDK.md

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -434,15 +434,6 @@ build_ctx_obj = runloop.storage_object.upload_from_bytes(
434434
content_type="tgz",
435435
)
436436

437-
shared_root = Path("./shared-lib")
438-
shared_tar = build_docker_context_tar(shared_root)
439-
440-
shared_ctx_obj = runloop.storage_object.upload_from_bytes(
441-
data=shared_tar,
442-
name="shared-lib-context.tar.gz",
443-
content_type="tgz",
444-
)
445-
446437
blueprint_with_context = runloop.blueprint.create(
447438
name="my-blueprint-with-context",
448439
dockerfile="""\
@@ -453,18 +444,11 @@ WORKDIR /usr/src/app
453444
COPY package.json package.json
454445
COPY src src
455446
456-
# copy from named context
457-
COPY --from=shared / ./libs
458-
459447
RUN npm install --only=production
460448
CMD ["node", "src/app.js"]
461449
""",
462-
# Primary build context
450+
# Build context
463451
build_context=build_ctx_obj.as_build_context(),
464-
# Additional named build contexts (for Docker buildx-style usage)
465-
named_build_contexts={
466-
"shared": shared_ctx_obj.as_build_context(),
467-
},
468452
)
469453

470454
# Or get an existing one

src/runloop_api_client/resources/blueprints.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,6 @@ def create_and_await_build_complete(
325325
file_mounts: Optional[Dict[str, str]] | Omit = omit,
326326
launch_parameters: Optional[LaunchParameters] | Omit = omit,
327327
metadata: Optional[Dict[str, str]] | Omit = omit,
328-
named_build_contexts: Optional[Dict[str, blueprint_create_params.NamedBuildContexts]] | Omit = omit,
329328
secrets: Optional[Dict[str, str]] | Omit = omit,
330329
services: Optional[Iterable[blueprint_create_params.Service]] | Omit = omit,
331330
system_setup_commands: Optional[SequenceNotStr[str]] | Omit = omit,
@@ -365,7 +364,6 @@ def create_and_await_build_complete(
365364
file_mounts=file_mounts,
366365
launch_parameters=launch_parameters,
367366
metadata=metadata,
368-
named_build_contexts=named_build_contexts,
369367
secrets=secrets,
370368
services=services,
371369
system_setup_commands=system_setup_commands,
@@ -966,7 +964,6 @@ async def create_and_await_build_complete(
966964
file_mounts: Optional[Dict[str, str]] | Omit = omit,
967965
launch_parameters: Optional[LaunchParameters] | Omit = omit,
968966
metadata: Optional[Dict[str, str]] | Omit = omit,
969-
named_build_contexts: Optional[Dict[str, blueprint_create_params.NamedBuildContexts]] | Omit = omit,
970967
secrets: Optional[Dict[str, str]] | Omit = omit,
971968
services: Optional[Iterable[blueprint_create_params.Service]] | Omit = omit,
972969
system_setup_commands: Optional[SequenceNotStr[str]] | Omit = omit,
@@ -1006,7 +1003,6 @@ async def create_and_await_build_complete(
10061003
file_mounts=file_mounts,
10071004
launch_parameters=launch_parameters,
10081005
metadata=metadata,
1009-
named_build_contexts=named_build_contexts,
10101006
secrets=secrets,
10111007
services=services,
10121008
system_setup_commands=system_setup_commands,

src/runloop_api_client/sdk/async_storage_object.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ async def upload_content(self, content: str | bytes | Iterable[bytes]) -> None:
165165
def as_build_context(self) -> BuildContext:
166166
"""Return this object in the shape expected for a Blueprint build context.
167167
168-
The returned mapping can be passed directly to ``build_context`` or
169-
``named_build_contexts`` when creating a blueprint.
168+
The returned mapping can be passed directly to ``build_context``
169+
when creating a blueprint.
170170
171171
:return: Mapping suitable for use as a blueprint build context
172172
:rtype: BuildContext

src/runloop_api_client/sdk/storage_object.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ def upload_content(self, content: str | bytes | Iterable[bytes]) -> None:
165165
def as_build_context(self) -> BuildContext:
166166
"""Return this object in the shape expected for a Blueprint build context.
167167
168-
The returned mapping can be passed directly to ``build_context`` or
169-
``named_build_contexts`` when creating a blueprint.
168+
The returned mapping can be passed directly to ``build_context``
169+
when creating a blueprint.
170170
171171
:return: Mapping suitable for use as a blueprint build context
172172
:rtype: BuildContext

0 commit comments

Comments
 (0)