Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ require (
buf.build/go/protovalidate v1.1.0
connectrpc.com/connect v1.19.1
github.com/bufbuild/protocompile v0.14.1
github.com/davecgh/go-spew v1.1.1
github.com/go-task/slim-sprig/v3 v3.0.0
github.com/golang-jwt/jwt/v5 v5.3.0
github.com/google/go-cmp v0.7.0
Expand All @@ -19,17 +18,18 @@ require (
require (
cel.dev/expr v0.25.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/google/cel-go v0.26.1 // indirect
github.com/klauspost/compress v1.18.2 // indirect
github.com/klauspost/compress v1.18.3 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/minio/minlz v1.0.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stoewer/go-strcase v1.3.1 // indirect
github.com/stretchr/objx v0.5.3 // indirect
golang.org/x/exp v0.0.0-20251209150349-8475f28825e9 // indirect
golang.org/x/text v0.32.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20251213004720-97cd9d5aeac2 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20251213004720-97cd9d5aeac2 // indirect
golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect
golang.org/x/text v0.33.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
20 changes: 10 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ=
github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/klauspost/compress v1.18.2 h1:iiPHWW0YrcFgpBYhsA6D1+fqHssJscY/Tm/y2Uqnapk=
github.com/klauspost/compress v1.18.2/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4=
github.com/klauspost/compress v1.18.3 h1:9PJRvfbmTabkOX8moIpXPbMMbYN60bWImDDU7L+/6zw=
github.com/klauspost/compress v1.18.3/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4=
github.com/klauspost/connect-compress/v2 v2.1.0 h1:8fM8QrVeHT69e5VVSh4yjDaQASYIvOp2uMZq7nVLj2U=
github.com/klauspost/connect-compress/v2 v2.1.0/go.mod h1:Ayurh2wscMMx3AwdGGVL+ylSR5316WfApREDgsqHyH8=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
Expand Down Expand Up @@ -56,14 +56,14 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
golang.org/x/exp v0.0.0-20251209150349-8475f28825e9 h1:MDfG8Cvcqlt9XXrmEiD4epKn7VJHZO84hejP9Jmp0MM=
golang.org/x/exp v0.0.0-20251209150349-8475f28825e9/go.mod h1:EPRbTFwzwjXj9NpYyyrvenVh9Y+GFeEvMNh7Xuz7xgU=
golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU=
golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY=
google.golang.org/genproto/googleapis/api v0.0.0-20251213004720-97cd9d5aeac2 h1:7LRqPCEdE4TP4/9psdaB7F2nhZFfBiGJomA5sojLWdU=
google.golang.org/genproto/googleapis/api v0.0.0-20251213004720-97cd9d5aeac2/go.mod h1:+rXWjjaukWZun3mLfjmVnQi18E1AsFbDN9QdJ5YXLto=
google.golang.org/genproto/googleapis/rpc v0.0.0-20251213004720-97cd9d5aeac2 h1:2I6GHUeJ/4shcDpoUlLs/2WPnhg7yJwvXtqcMJt9liA=
google.golang.org/genproto/googleapis/rpc v0.0.0-20251213004720-97cd9d5aeac2/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk=
golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU=
golang.org/x/exp v0.0.0-20260112195511-716be5621a96/go.mod h1:nzimsREAkjBCIEFtHiYkrJyT+2uy9YZJB7H1k68CXZU=
golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE=
golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8=
google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 h1:X9z6obt+cWRX8XjDVOn+SZWhWe5kZHm46TThU9j+jss=
google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3/go.mod h1:dd646eSK+Dk9kxVBl1nChEOhJPtMXriCcVb4x3o6J+E=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 h1:C4WAdL+FbjnGlpp2S+HMVhBeCq2Lcib4xZqfPNF6OoQ=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ=
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
2 changes: 1 addition & 1 deletion proto/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MAKEFLAGS += --no-print-directory
BUF_VERSION := 1.63.0
BUF_VERSION := 1.64.0

_buf:
docker run --rm \
Expand Down
6 changes: 3 additions & 3 deletions proto/buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ plugins:
out: ../go
opt: paths=source_relative,simple
# python
- remote: buf.build/protocolbuffers/python:v32.1
- remote: buf.build/protocolbuffers/python:v33.4
out: ../python
- remote: buf.build/protocolbuffers/pyi:v32.1
- remote: buf.build/protocolbuffers/pyi:v33.4
out: ../python
- remote: buf.build/connectrpc/python:v0.5.0
- remote: buf.build/connectrpc/python:v0.7.1
out: ../python
# docs
- remote: buf.build/community/pseudomuto-doc:v1.5.1
Expand Down
15 changes: 8 additions & 7 deletions python/metalstack/admin/v2/filesystem_connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT!
# source: metalstack/admin/v2/filesystem.proto

from collections.abc import AsyncIterator, Iterable, Iterator, Mapping
from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping
from typing import Protocol

from connectrpc.client import ConnectClient, ConnectClientSync
Expand All @@ -26,10 +26,11 @@ async def delete(self, request: metalstack_dot_admin_dot_v2_dot_filesystem__pb2.
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")


class FilesystemServiceASGIApplication(ConnectASGIApplication):
def __init__(self, service: FilesystemService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None:
class FilesystemServiceASGIApplication(ConnectASGIApplication[FilesystemService]):
def __init__(self, service: FilesystemService | AsyncGenerator[FilesystemService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None:
super().__init__(
endpoints={
service=service,
endpoints=lambda svc: {
"/metalstack.admin.v2.FilesystemService/Create": Endpoint.unary(
method=MethodInfo(
name="Create",
Expand All @@ -38,7 +39,7 @@ def __init__(self, service: FilesystemService, *, interceptors: Iterable[Interce
output=metalstack_dot_admin_dot_v2_dot_filesystem__pb2.FilesystemServiceCreateResponse,
idempotency_level=IdempotencyLevel.UNKNOWN,
),
function=service.create,
function=svc.create,
),
"/metalstack.admin.v2.FilesystemService/Update": Endpoint.unary(
method=MethodInfo(
Expand All @@ -48,7 +49,7 @@ def __init__(self, service: FilesystemService, *, interceptors: Iterable[Interce
output=metalstack_dot_admin_dot_v2_dot_filesystem__pb2.FilesystemServiceUpdateResponse,
idempotency_level=IdempotencyLevel.UNKNOWN,
),
function=service.update,
function=svc.update,
),
"/metalstack.admin.v2.FilesystemService/Delete": Endpoint.unary(
method=MethodInfo(
Expand All @@ -58,7 +59,7 @@ def __init__(self, service: FilesystemService, *, interceptors: Iterable[Interce
output=metalstack_dot_admin_dot_v2_dot_filesystem__pb2.FilesystemServiceDeleteResponse,
idempotency_level=IdempotencyLevel.UNKNOWN,
),
function=service.delete,
function=svc.delete,
),
},
interceptors=interceptors,
Expand Down
6 changes: 3 additions & 3 deletions python/metalstack/admin/v2/filesystem_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions python/metalstack/admin/v2/image_connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT!
# source: metalstack/admin/v2/image.proto

from collections.abc import AsyncIterator, Iterable, Iterator, Mapping
from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping
from typing import Protocol

from connectrpc.client import ConnectClient, ConnectClientSync
Expand All @@ -29,10 +29,11 @@ async def usage(self, request: metalstack_dot_admin_dot_v2_dot_image__pb2.ImageS
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")


class ImageServiceASGIApplication(ConnectASGIApplication):
def __init__(self, service: ImageService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None:
class ImageServiceASGIApplication(ConnectASGIApplication[ImageService]):
def __init__(self, service: ImageService | AsyncGenerator[ImageService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None:
super().__init__(
endpoints={
service=service,
endpoints=lambda svc: {
"/metalstack.admin.v2.ImageService/Create": Endpoint.unary(
method=MethodInfo(
name="Create",
Expand All @@ -41,7 +42,7 @@ def __init__(self, service: ImageService, *, interceptors: Iterable[Interceptor]
output=metalstack_dot_admin_dot_v2_dot_image__pb2.ImageServiceCreateResponse,
idempotency_level=IdempotencyLevel.UNKNOWN,
),
function=service.create,
function=svc.create,
),
"/metalstack.admin.v2.ImageService/Update": Endpoint.unary(
method=MethodInfo(
Expand All @@ -51,7 +52,7 @@ def __init__(self, service: ImageService, *, interceptors: Iterable[Interceptor]
output=metalstack_dot_admin_dot_v2_dot_image__pb2.ImageServiceUpdateResponse,
idempotency_level=IdempotencyLevel.UNKNOWN,
),
function=service.update,
function=svc.update,
),
"/metalstack.admin.v2.ImageService/Delete": Endpoint.unary(
method=MethodInfo(
Expand All @@ -61,7 +62,7 @@ def __init__(self, service: ImageService, *, interceptors: Iterable[Interceptor]
output=metalstack_dot_admin_dot_v2_dot_image__pb2.ImageServiceDeleteResponse,
idempotency_level=IdempotencyLevel.UNKNOWN,
),
function=service.delete,
function=svc.delete,
),
"/metalstack.admin.v2.ImageService/Usage": Endpoint.unary(
method=MethodInfo(
Expand All @@ -71,7 +72,7 @@ def __init__(self, service: ImageService, *, interceptors: Iterable[Interceptor]
output=metalstack_dot_admin_dot_v2_dot_image__pb2.ImageServiceUsageResponse,
idempotency_level=IdempotencyLevel.UNKNOWN,
),
function=service.usage,
function=svc.usage,
),
},
interceptors=interceptors,
Expand Down
6 changes: 3 additions & 3 deletions python/metalstack/admin/v2/image_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions python/metalstack/admin/v2/ip_connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT!
# source: metalstack/admin/v2/ip.proto

from collections.abc import AsyncIterator, Iterable, Iterator, Mapping
from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping
from typing import Protocol

from connectrpc.client import ConnectClient, ConnectClientSync
Expand All @@ -20,10 +20,11 @@ async def list(self, request: metalstack_dot_admin_dot_v2_dot_ip__pb2.IPServiceL
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")


class IPServiceASGIApplication(ConnectASGIApplication):
def __init__(self, service: IPService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None:
class IPServiceASGIApplication(ConnectASGIApplication[IPService]):
def __init__(self, service: IPService | AsyncGenerator[IPService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None:
super().__init__(
endpoints={
service=service,
endpoints=lambda svc: {
"/metalstack.admin.v2.IPService/List": Endpoint.unary(
method=MethodInfo(
name="List",
Expand All @@ -32,7 +33,7 @@ def __init__(self, service: IPService, *, interceptors: Iterable[Interceptor]=()
output=metalstack_dot_admin_dot_v2_dot_ip__pb2.IPServiceListResponse,
idempotency_level=IdempotencyLevel.UNKNOWN,
),
function=service.list,
function=svc.list,
),
},
interceptors=interceptors,
Expand Down
6 changes: 3 additions & 3 deletions python/metalstack/admin/v2/ip_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions python/metalstack/admin/v2/machine_connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT!
# source: metalstack/admin/v2/machine.proto

from collections.abc import AsyncIterator, Iterable, Iterator, Mapping
from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping
from typing import Protocol

from connectrpc.client import ConnectClient, ConnectClientSync
Expand All @@ -23,10 +23,11 @@ async def list(self, request: metalstack_dot_admin_dot_v2_dot_machine__pb2.Machi
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")


class MachineServiceASGIApplication(ConnectASGIApplication):
def __init__(self, service: MachineService, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None:
class MachineServiceASGIApplication(ConnectASGIApplication[MachineService]):
def __init__(self, service: MachineService | AsyncGenerator[MachineService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None:
super().__init__(
endpoints={
service=service,
endpoints=lambda svc: {
"/metalstack.admin.v2.MachineService/Get": Endpoint.unary(
method=MethodInfo(
name="Get",
Expand All @@ -35,7 +36,7 @@ def __init__(self, service: MachineService, *, interceptors: Iterable[Intercepto
output=metalstack_dot_admin_dot_v2_dot_machine__pb2.MachineServiceGetResponse,
idempotency_level=IdempotencyLevel.UNKNOWN,
),
function=service.get,
function=svc.get,
),
"/metalstack.admin.v2.MachineService/List": Endpoint.unary(
method=MethodInfo(
Expand All @@ -45,7 +46,7 @@ def __init__(self, service: MachineService, *, interceptors: Iterable[Intercepto
output=metalstack_dot_admin_dot_v2_dot_machine__pb2.MachineServiceListResponse,
idempotency_level=IdempotencyLevel.UNKNOWN,
),
function=service.list,
function=svc.list,
),
},
interceptors=interceptors,
Expand Down
6 changes: 3 additions & 3 deletions python/metalstack/admin/v2/machine_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading