Skip to content

Commit

Permalink
feat: more stable run by fixing little bugs + typegraph upgrade (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
zifeo authored Aug 3, 2023
1 parent 970a286 commit beebd51
Show file tree
Hide file tree
Showing 47 changed files with 230 additions and 257 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ jobs:
shared-key: ${{ runner.os }}-rust-${{ hashFiles('**/rust-toolchain.toml') }}-${{ hashFiles('**/Cargo.lock') }}
- run: |
# test in native rust, not in wasm for a future rust SDK
# cargo test --locked --package typegraph_core
# without --tests, the --doc is causing a link error "syntax error in VERSION script"
cargo test --locked --package typegraph_core --tests
test-meta-cli:
needs: changes
Expand Down
14 changes: 7 additions & 7 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions dev/lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ dev:
(ARG DENO_BINDGEN_URL=).*(): DENO_BINDGEN_URL
(ARG RUST_VERSION=).*(): RUST_VERSION
(ARG WASMEDGE_VERSION=).*(): WASMEDGE_VERSION
typegate/src/typegraph.ts:
(export const typegraphVersion = ").*(";): TYPEGRAPH_VERSION
typegate/src/typegraph/versions.ts:
(const typegraphVersion = ").*(";): TYPEGRAPH_VERSION
typegraph/python/typegraph/graph/typegraph.py:
(typegraph_version = ").*("): TYPEGRAPH_VERSION
typegraph/core/src/typegraph.rs:
Expand Down Expand Up @@ -71,7 +71,7 @@ dev:
WASMTIME_VERSION: 10.0.1
WASMEDGE_VERSION: 0.12.1
TYPEGRAPH_VERSION: 0.0.2
METATYPE_VERSION: 0.1.12-0+dev
METATYPE_VERSION: 0.1.12
TAGLINE: >-
Declarative API development platform. Build serverless backends with
zero-trust and less code, no matter where and how your (legacy) systems
Expand Down
25 changes: 0 additions & 25 deletions examples/metatype.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion examples/templates/new/compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
typegate:
image: ghcr.io/metatypedev/typegate:v0.1.12-0+dev
image: ghcr.io/metatypedev/typegate:v0.1.12
platform: linux/amd64
restart: always
ports:
Expand Down
4 changes: 2 additions & 2 deletions examples/templates/new/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[tool.poetry]
name = "example"
version = "0.1.12-0+dev"
version = "0.1.12"
description = ""
authors = []
readme = "README.md"

[tool.poetry.dependencies]
python = ">=3.8,<4.0"
typegraph = "0.1.12-0+dev"
typegraph = "0.1.12"

[build-system]
requires = ["poetry-core"]
Expand Down
2 changes: 1 addition & 1 deletion libs/common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "common"
version = "0.1.12-0+dev"
version = "0.1.12"
edition = "2021"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion libs/macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "macros"
version = "0.1.12-0+dev"
version = "0.1.12"
edition = "2021"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion libs/typescript/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "typescript"
version = "0.1.12-0+dev"
version = "0.1.12"
edition = "2021"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion libs/xtask/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "xtask"
version = "0.1.12-0+dev"
version = "0.1.12"
edition = "2021"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion meta-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "meta-cli"
version = "0.1.12-0+dev"
version = "0.1.12"
edition = "2021"

description = "Declarative API development platform. Build serverless backends with zero-trust and less code, no matter where and how your (legacy) systems are."
Expand Down
11 changes: 7 additions & 4 deletions meta-cli/src/cli/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,8 @@ impl Deploy<DefaultModeData> {

trace!("Loading typegraphs...");
for path in paths.into_iter() {
info!(
"Loading typegraphs from {rel_path:?}.",
rel_path = diff_paths(&path, &self.base_dir).unwrap()
);
let rel_path = diff_paths(&path, &self.base_dir).unwrap();
info!("Loading typegraphs from {}.", rel_path.display());
let tgs =
Self::load_typegraphs(&path, &self.base_dir, &self.loader, OnRewrite::Reload).await;
let tgs = match tgs {
Expand All @@ -207,6 +205,11 @@ impl Deploy<DefaultModeData> {

let mut tgs: VecDeque<_> = tgs.into_iter().collect();

if tgs.is_empty() {
warn!("No typegraph found in {}.", rel_path.display());
continue;
}

while let Some(tg) = tgs.pop_front() {
let tg_name = tg.full_name().unwrap().cyan();
info!("Pushing typegraph {tg_name}...");
Expand Down
3 changes: 1 addition & 2 deletions meta-cli/src/cli/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ impl Action for Serialize {
};

if paths.is_empty() {
warn!("No typegraph definition module found.");
bail!("No typegraph definition module found.");
}

Expand All @@ -90,7 +89,7 @@ impl Action for Serialize {
match loader.load_file(&path).await {
LoaderResult::Loaded(tgs) => {
if tgs.is_empty() {
log::warn!("no typegraph");
log::warn!("no typegraph in {path:?}");
}
for tg in tgs.into_iter() {
loaded.push(tg);
Expand Down
22 changes: 11 additions & 11 deletions poetry.lock

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

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "metatype"
version = "0.1.12-0+dev"
version = "0.1.12"
description = ""
authors = []

Expand Down
2 changes: 1 addition & 1 deletion typegate/native/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "native"
version = "0.1.12-0+dev"
version = "0.1.12"
edition = "2021"

[lib]
Expand Down
Loading

0 comments on commit beebd51

Please sign in to comment.