v0.5.0-rc.1 - 2024-10-22
Bug Fixes
<details >
<summary>
(ci) Disable sccache when secrets not avail (<a href="https://github.com/metatypedev/metatype/pull/874">#874</a>)
</summary>
- Makes sccache optional so PRs from dependabot and forks can still run
the test suite.
- Increases sccache allotment to 50g.
</details>
<details >
<summary>
(cli) Change default installation directory (<a href="https://github.com/metatypedev/metatype/pull/873">#873</a>)
</summary>
<!--
Pull requests are squashed and merged using:
- their title as the commit message
- their description as the commit body
Having a good title and description is important for the users to get
readable changelog.
-->
<!-- 1. Explain WHAT the change is about -->
- Remplacement PR for #843.
<!-- 2. Explain WHY the change cannot be made simpler -->
<!-- 3. Explain HOW users should update their code -->
Migration notes
...
- [ ] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change
</details>
<details >
<summary>
(docs) Grpc docs (<a href="https://github.com/metatypedev/metatype/pull/852">#852</a>)
</summary>
<!--
Pull requests are squashed and merged using:
- their title as the commit message
- their description as the commit body
Having a good title and description is important for the users to get
readable changelog.
-->
<!-- 1. Explain WHAT the change is about -->
<!-- 2. Explain WHY the change cannot be made simpler -->
<!-- 3. Explain HOW users should update their code -->
Migration notes
...
- [ ] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change
</details>
<details >
<summary>
(gate) Make __typename returns the variant name on unions (<a href="https://github.com/metatypedev/metatype/pull/838">#838</a>)
</summary>
<!--
Pull requests are squashed and merged using:
- their title as the commit message
- their description as the commit body
Having a good title and description is important for the users to get
readable changelog.
-->
<!-- 1. Explain WHAT the change is about -->
- Add missing implementation for static injection for parameter
transformations on the typegate
- Solves
MET-642:
Fix the
__typename
result on union variants: return the variant name
instead of the parent type name
<!-- 2. Explain WHY the change cannot be made simpler -->
<!-- 3. Explain HOW users should update their code -->
Migration notes
N/A
Checklist
- [x] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change
</details>
<details >
<summary>
(subs) Key collision on redis (<a href="https://github.com/metatypedev/metatype/pull/865">#865</a>)
</summary>
Follow up of #863
When multiple start occurs for redis, some schedules can happen
exactly at the same time resulting into the same identifier (and
leading to an inconsistent state).
This solution simply combines the schedule
with the run_id making it
unique instead of using it as is.
mutation AllAtOnce {
a: start_retry(kwargs: { .. }) # => calls add_schedule( ... date ...)
b: start_retry(kwargs: { .. })
c: start_retry(kwargs: { .. })
d: start_retry(kwargs: { .. })
e: start_retry(kwargs: { .. })
f: start_retry(kwargs: { .. })
# ..
}
Migration notes
None
- [ ] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change
</details>
<details >
<summary>
Fix missing images (<a href="https://github.com/metatypedev/metatype/pull/847">#847</a>)
</summary>
<!--
Pull requests are squashed and merged using:
- their title as the commit message
- their description as the commit body
Having a good title and description is important for the users to get
readable changelog.
-->
<!-- 1. Explain WHAT the change is about -->
Fix missing images for durable execution
blog
<!-- 2. Explain WHY the change cannot be made simpler -->
<!-- 3. Explain HOW users should update their code -->
Migration notes
...
- [ ] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change
</details>
<details >
<summary>
Improve name generation for prisma types (<a href="https://github.com/metatypedev/metatype/pull/849">#849</a>)
</summary>
<!--
Pull requests are squashed and merged using:
- their title as the commit message
- their description as the commit body
Having a good title and description is important for the users to get
readable changelog.
-->
<!-- 1. Explain WHAT the change is about -->
Solve
MET-657
<!-- 2. Explain WHY the change cannot be made simpler -->
<!-- 3. Explain HOW users should update their code -->
Migration notes
...
- [ ] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change
</details>
Documentation
<details >
<summary>
(blog) Running python with WebAssembly part 1 (<a href="https://github.com/metatypedev/metatype/pull/823">#823</a>)
</summary>
Running python with webassembly (part 1)
Migration notes
None
- [ ] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [x] End-user documentation is updated to reflect the change
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
Summary by CodeRabbit
Summary by CodeRabbit
-
New Features
-
Introduced a comprehensive guide for integrating Python runtime with
WebAssembly (WASI) in the Metatype ecosystem.
-
Detailed the advantages of using WebAssembly over Docker for platform
independence and resource management.
-
Provided technical requirements and a refined solution for executing
Python scripts in a sandboxed environment.
-
Expanded vocabulary with new relevant terms for enhanced text
processing and validation.
-
Documentation
-
Updated YAML configuration structure in documentation for clarity on
type gate usage.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
</details>
<details >
<summary>
`/docs/reference/typegraph/client` (<a href="https://github.com/metatypedev/metatype/pull/777">#777</a>)
</summary>
Pre-documentation for the code-first queries feature.
Migration notes
...
- [ ] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change
</details>
Features
<details >
<summary>
(dev) Typegraph explorer (<a href="https://github.com/metatypedev/metatype/pull/859">#859</a>)
</summary>
- Add a web version of tree-view which is more interactive
- Enable typegraph serialization without
metatype.yml
config file
</details>
<details >
<summary>
(gate) Empty object as custom scalar (<a href="https://github.com/metatypedev/metatype/pull/876">#876</a>)
</summary>
- Allow empty object on the output without any change
- Just like
Int
, String
, and such, rightfully refer the constant
{}
as a scalar - Any empty object will now be refered as
EmptyObject
scalar
Migration notes
None
- [x] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change
</details>
<details >
<summary>
(mdk) Overridable templates (<a href="https://github.com/metatypedev/metatype/pull/842">#842</a>)
</summary>
<!--
Pull requests are squashed and merged using:
- their title as the commit message
- their description as the commit body
Having a good title and description is important for the users to get
readable changelog.
-->
<!-- 1. Explain WHAT the change is about -->
Solve
MET-630
- [x] Make templates in the static sections overridable
- [x]
mdk_rust
- [x]
mdk_python
- [x]
mdk_typescript
- [x] Add a CLI tool to generate extract the default template
<!-- 3. Explain HOW users should update their code -->
Migration notes
No changes needed.
- [x] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change
</details>
<details >
<summary>
(metagen) Union/either for clients (<a href="https://github.com/metatypedev/metatype/pull/857">#857</a>)
</summary>
- Add union support for the
client_xx
metagen implementations.
There are still some edge cases especially around variant identification
in the client languages. I tried many things but our hands are tied by
serde. Basically, users will have to be careful when designing their
union types to avoid ambiguity cases. Hopefully,
674
will help there.
Migration notes
...
- [x] The change comes with new or modified tests
- [x] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
Summary by CodeRabbit
-
New Features
-
Introduced new methods for rendering union types in both TypeScript
and Python.
-
Enhanced GraphQL query generation with support for multiple union
types.
-
Added a new variants
property to the NodeMeta
type for improved
selection handling.
-
Bug Fixes
- Improved error handling for node selections and argument processing.
-
Tests
-
Updated test cases to reflect schema changes and added new tests for
client functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
</details>
<details >
<summary>
(subs) Redis backend (<a href="https://github.com/metatypedev/metatype/pull/855">#855</a>)
</summary>
- Redis Backend base logic port + some improvements
- Moved
SUBSTANTIAL_POLL_INTERVAL_SEC
and
SUBSTANTIAL_LEASE_LIFESPAN_SEC
to config
Migration notes
- Renamed
Backend.fs()
and Backend.memory()
to Backend.dev_fs()
and Backend.dev_memory()
- Removed
SUBSTANTIAL_RELAUNCH_MS
as it was relevant only for purely
worker-based runs, which rendered the new
SUBSTANTIAL_POLL_INTERVAL_SEC
redundant when an interrupt hits.
- [x] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [x] End-user documentation is updated to reflect the change
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
Summary by CodeRabbit
Release Notes
-
New Features
-
Introduced Redis as a new backend option for enhanced data management.
- Added Docker Compose configuration for a Redis service.
-
Implemented comprehensive testing for Redis functionality and backend
integration.
-
Bug Fixes
- Improved error handling during backend initialization.
-
Documentation
-
Updated type definitions for backend configurations to streamline
Redis integration.
-
Chores
-
Refactored test cases for clarity and consistency across different
backend types.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
</details>
<details >
<summary>
(subs) Retry + timeout on save (<a href="https://github.com/metatypedev/metatype/pull/863">#863</a>)
</summary>
Port and improve retry/timeout.
Migration notes
N/A
- [ ] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change
</details>
<details >
<summary>
(subs) Child workflows + docs (<a href="https://github.com/metatypedev/metatype/pull/867">#867</a>)
</summary>
Support for child workflows.
Solves MET-689 and MET-668.
Migration notes
Previously
sub = SubstantialRuntime(backend)
hello = sub.deno(file="workflow.ts", name="sayHello", deps=[])
g.expose(
# each function start, stop, result, ... holds a copy of the workflow data
start_hello = hello.start(...),
stop_hello = hello.stop()
)
This approach relied on workflow files being referenced in each
materializer, but the constructs were too restrictive to support
something like mutation { results(name: "nameManuallyGiven") }
.
We now have instead
file = (
WorkflowFile
.deno(file="workflow.ts", deps=[])
.import_(["sayHello"])
.build()
)
# workflow data are refered only once
sub = SubstantialRuntime(backend, [file])
g.expose(
start_hello = sub.start(...).reduce({ "name": "sayHello" }),
stop = sub.stop()
)
- [x] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change
</details>
<details >
<summary>
(subs,gate) Substantial integration (<a href="https://github.com/metatypedev/metatype/pull/844">#844</a>)
</summary>
</details>
<details >
<summary>
(subs,gate) Port agent concept (<a href="https://github.com/metatypedev/metatype/pull/845">#845</a>)
</summary>
Continuation of #844
</details>
<details >
<summary>
Well-defined type comparison semantics (<a href="https://github.com/metatypedev/metatype/pull/846">#846</a>)
</summary>
<!--
Pull requests are squashed and merged using:
- their title as the commit message
- their description as the commit body
Having a good title and description is important for the users to get
readable changelog.
-->
<!-- 1. Explain WHAT the change is about -->
Solve
MET-655
- [x] Document the type comparison semantics
- [x] Improve the implementation (
EnsureSubtypeOf
trait) - [x] Add more test cases for type comparisons
<!-- 2. Explain WHY the change cannot be made simpler -->
<!-- 3. Explain HOW users should update their code -->
Migration notes
No change is needed.
...
- [x] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
Summary by CodeRabbit
Release Notes
-
New Features
-
Introduced comprehensive type comparison rules and semantics for
scalar types, optionals, lists, objects, and unions.
-
Added support for enumerated types in the type system, allowing for
more precise type definitions.
-
Enhanced parent injection mechanism documentation to clarify type
compatibility requirements.
-
Implemented a new suite of type comparison tests and validation
mechanisms.
-
Bug Fixes
-
Improved error reporting and handling in the type validation process.
-
Documentation
-
Updated and expanded documentation for type comparisons, enumerations,
and parent injections.
-
Tests
- Added new tests for type comparison and validation scenarios.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
</details>
<details >
<summary>
Grpc runtime (<a href="https://github.com/metatypedev/metatype/pull/819">#819</a>)
</summary>
Migration notes
...
- [x] The change comes with new or modified tests
- [X] End-user documentation is updated to reflect the change
- [ ] Hard-to-understand functions have explanatory comments
</details>
<details >
<summary>
Python hostcall (<a href="https://github.com/metatypedev/metatype/pull/860">#860</a>)
</summary>
Dead lock on python worker
<!--
Pull requests are squashed and merged using:
- their title as the commit message
- their description as the commit body
Having a good title and description is important for the users to get
readable changelog.
-->
<!-- 1. Explain WHAT the change is about -->
<!-- 2. Explain WHY the change cannot be made simpler -->
<!-- 3. Explain HOW users should update their code -->
Migration notes
...
- [ ] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change
</details>
Miscellaneous Tasks
<details open>
<summary>
Checks/validation on t.either (<a href="https://github.com/metatypedev/metatype/pull/868">#868</a>)
- BREAKING: Checks/validation on t.either (<a href="https://github.com/metatypedev/metatype/pull/868">#868</a>)
</summary>
Emit a warning or an error when a variant is a subtype of another one.
Migration notes
BREAKING CHANGE: Previously valid typegraph might fail validation.
You will need to fix your types to add some consistency in
t.either
/t.union
types.
- [x] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change
</details>
<details >
<summary>
Update prisma + deno + rust deps (<a href="https://github.com/metatypedev/metatype/pull/869">#869</a>)
</summary>
- Bump deno to 1.46.3
- Update prisma-engines to 5.20
- Update other rust deps.
Closes MET-669 and MET-622 and MET-680.
Migration notes
...
- [ ] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change
</details>
Refactor
<details >
<summary>
(gate) Add err msg for missing env vars (<a href="https://github.com/metatypedev/metatype/pull/827">#827</a>)
</summary>
<!--
Pull requests are squashed and merged using:
- their title as the commit message
- their description as the commit body
Having a good title and description is important for the users to get
readable changelog.
-->
<!-- 1. Explain WHAT the change is about -->
<!-- 2. Explain WHY the change cannot be made simpler -->
<!-- 3. Explain HOW users should update their code -->
Migration notes
...
- [ ] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change
</details>
<details >
<summary>
(gate) Use stream during artifact upload to s3 (<a href="https://github.com/metatypedev/metatype/pull/841">#841</a>)
</summary>
<!--
Pull requests are squashed and merged using:
- their title as the commit message
- their description as the commit body
Having a good title and description is important for the users to get
readable changelog.
-->
<!-- 1. Explain WHAT the change is about -->
<!-- 2. Explain WHY the change cannot be made simpler -->
<!-- 3. Explain HOW users should update their code -->
Migration notes
...
- [ ] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change
</details>
<details >
<summary>
(gen, doc) Rename mdk to fdk (<a href="https://github.com/metatypedev/metatype/pull/851">#851</a>)
</summary>
<!--
Pull requests are squashed and merged using:
- their title as the commit message
- their description as the commit body
Having a good title and description is important for the users to get
readable changelog.
-->
<!-- 1. Explain WHAT the change is about -->
<!-- 2. Explain WHY the change cannot be made simpler -->
<!-- 3. Explain HOW users should update their code -->
Migration notes
...
- [ ] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change
</details>
<details open>
<summary>
(sdk) Remove index based names (<a href="https://github.com/metatypedev/metatype/pull/848">#848</a>)
- BREAKING: remove index based names (<a href="https://github.com/metatypedev/metatype/pull/848">#848</a>)
</summary>
- Replace index based names for types by one that relies on type context
in graph
- Tests for type deduplication
Migration notes
TODO
- [x] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change
</details>
<details open>
<summary>
Move as_id out of `TypeNode` (<a href="https://github.com/metatypedev/metatype/pull/866">#866</a>)
- BREAKING: Move as_id out of `TypeNode` (<a href="https://github.com/metatypedev/metatype/pull/866">#866</a>)
</summary>
<!--
Pull requests are squashed and merged using:
- their title as the commit message
- their description as the commit body
Having a good title and description is important for the users to get
readable changelog.
-->
<!-- 1. Explain WHAT the change is about -->
Solve
MET-684
and
MET-471
- common/typegraph
- [x] Store the id field in
ObjectTypeData
instead of in the target
type (as_id
)
- [x] Add
id()
method on t.integer
and t.string
- typegraph/core
- [x] Store
as_id
, injection
and policy
in TypeRef::attribute
- [x] Add support for direct and link target in
TypeRef
- [x] Only allow name registration for
TypeDef
- Semantics
- [x] Use property name instead of type name in from_parent injection
source
Migration notes
BREAKING CHANGE
from_parent
injections source shall be changed to the key in the
parent t.struct
instead of the type name.
Checklist
- [x] The change comes with new or modified tests
- [x] Hard-to-understand functions have explanatory comments
- [x] End-user documentation is updated to reflect the change
</details>
<details >
<summary>
Move injection data to `t.func` (<a href="https://github.com/metatypedev/metatype/pull/871">#871</a>)
</summary>
MET-682
- [x] Move all injection data in
ObjectTypeData
(i.e. t.func
)
MET-656
- [x] Translate reduce to injection specification on
t.func
MET-94
- [x] Remove runtime field from
TypeNode
(<a href="https://github.com/metatypedev/metatype/pull/858">#858</a>)
MET-683
- [x] Move runtime-related configs to
MaterializerData
or
RuntimeData
- Misc.
- Enable random ports for the typegate (when
TG_PORT=0
); this will
work with meta dev
with embedded typegate if you set the --gate
option with port 0
.
<!-- 2. Explain WHY the change cannot be made simpler -->
<!-- 3. Explain HOW users should update their code -->
Migration notes
...
- [x] The change comes with new or modified tests
- [x] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change
</details>