Skip to content

Commit 35d6241

Browse files
authored
Deployment and other DX improvements (#192)
* decrease max connections for sqlite * fix install release * WIP api manifest entities + various error message and help fixes * make fix * add 1.2.0-dev.1 schema with new component and dep types * add "local serve" task for app manifest json schema * progress with api definition and deployment models * show source errors in service error display * WIP: add deps with interactive yaml editing * component add-dep cleanups * fix app builtin commands format * WIP: auto start local server * auto server cleanups * progress with api def deployment * formatting cleanups * api def manifest diffing * naming * update * strip yaml nulls when diffing * refactor selected_project_or_default to selected_project_id_or_default * handle creating new api definition versions * make fix * cleanup * rework TaskResultMarker to have identity + tests for switching dep types * make fix * use pretty json for task result markers * fix as_i64_with_comments_workaround * add missing command doc * initial diffable deployment model for components * task result marker: rework for supporting "pre-calculated" hashes * server component hash caching * definition validation * more api def validation * pin golem deps * component version handling for API deployments, and API specific deploy commands with on-demand component deployments * validation + app unknown "entity" error improvement * component lookup cleanups * handler mut self cleanup (leftover from context refactor) * deploy diff naming cleanup * ifs diffing for component deployments * format * todo cleanups * make fix * use raw component names validation * lenient WAVE arg parsing for strings and chars * finish API deployment deploy, and deployment cleanups * merge non-deployed dev schemas * make fix * fix UP-TO-DATE check for common wit deps * interactive new component * interactive new component * fix hints test * highlight * api deployment and validation fixes * remove HTTP API definition draft field from manifest, as it is mostly managed by the backend (and we can default to true in manifest) * update required python version to 3.10, to match componentize-py expectations * use Stdout for errors, given help is also printed there by clap * fix and update "app new" and "component new" help handling (after interactive changes) * python min to 3.12 * make fix * generalize redeploy
1 parent bde0246 commit 35d6241

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+6521
-1427
lines changed

Cargo.lock

+109
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ log = "0.4.25"
7070
minijinja = "2.7.0"
7171
nanoid = "0.4.0"
7272
native-tls = "0.2.13"
73+
nondestructive = "0.0.26"
7374
opentelemetry = "0.28.0"
7475
opentelemetry-prometheus = "0.28.0"
7576
opentelemetry_sdk = "0.28.0"
@@ -90,6 +91,7 @@ serde_json_path = "0.7.1"
9091
serde_yaml = "0.9.34"
9192
shadow-rs = { version = "1.1.1", default-features = false, features = ["build"] }
9293
shlex = "1.3.0"
94+
similar = "2.7.0"
9395
sqlx = "=0.8.3"
9496
strip-ansi-escapes = "0.2.0"
9597
strum = "0.27.1"

Makefile.toml

+9-3
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,14 @@ dependencies = ["install-golem-cli-release", "install-golem-release"]
118118
description = "Install golem-cli (debug)"
119119
script_runner = "@duckscript"
120120
script = '''
121-
exec --fail-on-error cargo install --release --path golem-cli --bin golem-cli --target-dir target --locked --offline
121+
exec --fail-on-error cargo install --path golem-cli --bin golem-cli --target-dir target --locked --offline
122122
'''
123123

124124
[tasks.install-golem-release]
125125
description = "Install golem (debug)"
126126
script_runner = "@duckscript"
127127
script = '''
128-
exec --fail-on-error cargo install --release --path golem --bin golem --target-dir target --locked --offline
128+
exec --fail-on-error cargo install --path golem --bin golem --target-dir target --locked --offline
129129
'''
130130

131131
## ** TEST **
@@ -243,7 +243,7 @@ args = [
243243
"--no-verify",
244244
]
245245

246-
## ** APP MANIFEST SCHEMA PUBLISHING **
246+
## ** APP MANIFEST SCHEMA **
247247
[tasks.publish-app-manifest-json-schema]
248248
description = "Publish application manifest schemas to S3 (https://schema.golem.cloud)"
249249
command = "aws"
@@ -253,3 +253,9 @@ args = [
253253
"schema.golem.cloud",
254254
"s3://schema.golem.cloud",
255255
]
256+
257+
[tasks.serve-app-manifest-json-schema]
258+
description = "Serve the schema.golem.cloud directory locally to help testing the schemas in editors"
259+
install_crate = "miniserve"
260+
command = "miniserve"
261+
args = ["--interfaces", "127.0.0.1", "--port", "41357", "schema.golem.cloud"]

golem-cli/Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ lenient_bool = { workspace = true }
7474
log = { workspace = true }
7575
minijinja = { workspace = true }
7676
native-tls = { workspace = true }
77+
nondestructive = { workspace = true }
7778
phf = { workspace = true }
7879
pretty_env_logger = { workspace = true }
7980
prettyplease = { workspace = true }
@@ -87,6 +88,7 @@ serde_json = { workspace = true }
8788
serde_yaml = { workspace = true }
8889
shadow-rs = { workspace = true }
8990
shlex = { workspace = true }
91+
similar = { workspace = true }
9092
strum = { workspace = true }
9193
strum_macros = { workspace = true }
9294
syn = { workspace = true }

golem-cli/src/app/build/gen_rpc.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ fn create_generated_base_wit(
7676
let component_source_wit = ctx
7777
.application
7878
.component_source_wit(component_name, ctx.profile());
79+
let inputs = {
80+
let mut inputs = ctx.application.wit_deps();
81+
inputs.push(component_source_wit.clone());
82+
inputs
83+
};
7984
let component_generated_base_wit = ctx.application.component_generated_base_wit(component_name);
8085
let task_result_marker = TaskResultMarker::new(
8186
&ctx.application.task_result_marker_dir(),
@@ -89,7 +94,7 @@ fn create_generated_base_wit(
8994
ctx.config.skip_up_to_date_checks
9095
|| !task_result_marker.is_up_to_date()
9196
|| !ctx.wit.is_dep_graph_up_to_date(component_name)?,
92-
|| [component_source_wit.clone()],
97+
|| inputs,
9398
|| [component_generated_base_wit.clone()],
9499
) {
95100
log_skipping_up_to_date(format!(

0 commit comments

Comments
 (0)