unoverse 0.1.78 → 0.1.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/unoverse.mjs
CHANGED
|
@@ -114,7 +114,12 @@ switch (cmd) {
|
|
|
114
114
|
console.log(`\n ✓ unoverse is now ${v || "up to date"}`);
|
|
115
115
|
spawnSync("unoverse", ["_postupdate"], { stdio: "inherit" });
|
|
116
116
|
} else {
|
|
117
|
-
|
|
117
|
+
// DO NOT GUESS THE CAUSE. This used to say "(permissions?)" whatever happened, so a
|
|
118
|
+
// registry that had not finished propagating a release — npm resolves `latest` to a
|
|
119
|
+
// version whose tarball is not servable yet, ETARGET — was reported as a permissions
|
|
120
|
+
// problem, sending people to sudo for something sudo cannot fix. npm's own error is
|
|
121
|
+
// already on screen above; name the two real causes and let it speak for itself.
|
|
122
|
+
console.log(`\n ✗ Update failed. npm's reason is above.\n\n "No matching version" — a release is still propagating. Wait a minute and re-run.\n "EACCES" / permission denied — sudo npm install -g unoverse@latest\n\n Or skip the global install entirely: npx unoverse@latest\n`);
|
|
118
123
|
}
|
|
119
124
|
process.exit(r.status ?? 0);
|
|
120
125
|
}
|
|
@@ -30,9 +30,16 @@
|
|
|
30
30
|
# server's existing compose, so a new env var (e.g. MEMORY_SERVICE_URL) silently never
|
|
31
31
|
# reached prod even though the image had the code. `.env` (per-server values) is left
|
|
32
32
|
# untouched — only the canonical compose is refreshed from the repo.
|
|
33
|
+
#
|
|
34
|
+
# THE COMPOSE LIVES IN THE UNIVERSE, NOT NEXT TO THIS PLAYBOOK. `playbook_dir/../..`
|
|
35
|
+
# is the monorepo, where ansible/ and docker-compose.yml are siblings. Installed from
|
|
36
|
+
# npm they are not: the playbook sits in node_modules/unoverse/operator/ansible, and
|
|
37
|
+
# that path resolved to node_modules/unoverse/docker-compose.yml, which does not exist
|
|
38
|
+
# — so every deploy from an installed CLI died here on "Could not find or access". The
|
|
39
|
+
# deploy passes universe_root; the default keeps the monorepo working.
|
|
33
40
|
- name: "[1/4] Sync docker-compose.yml (config travels with the deploy)"
|
|
34
41
|
copy:
|
|
35
|
-
src: "{{ playbook_dir }}
|
|
42
|
+
src: "{{ universe_root | default(playbook_dir + '/../..') }}/docker-compose.yml"
|
|
36
43
|
dest: "{{ gravity_dir }}/docker-compose.yml"
|
|
37
44
|
|
|
38
45
|
- name: "[2/4] Pull latest platform images"
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
|
|
122
122
|
- name: "[7/12] Copy docker-compose.yml"
|
|
123
123
|
copy:
|
|
124
|
-
src: "{{ playbook_dir }}
|
|
124
|
+
src: "{{ universe_root | default(playbook_dir + '/../..') }}/docker-compose.yml"
|
|
125
125
|
dest: "{{ gravity_dir }}/docker-compose.yml"
|
|
126
126
|
owner: "{{ ansible_user }}"
|
|
127
127
|
mode: "0644"
|
|
@@ -246,6 +246,21 @@ resource "digitalocean_database_user" "universe" {
|
|
|
246
246
|
count = local.pg_managed ? 1 : 0
|
|
247
247
|
cluster_id = local.pg_cluster_id
|
|
248
248
|
name = "universe"
|
|
249
|
+
|
|
250
|
+
# NEVER UPDATE THIS USER IN PLACE. Provider 2.96 grew a `settings` block (Kafka and
|
|
251
|
+
# OpenSearch ACLs) and an update path that fires whenever it sees any diff on the
|
|
252
|
+
# resource — including one the provider invented itself on refresh. For a Postgres user,
|
|
253
|
+
# which has no settings, that path PUTs an empty body and DigitalOcean rejects it:
|
|
254
|
+
#
|
|
255
|
+
# 400 request is missing the following required fields: user_settings
|
|
256
|
+
#
|
|
257
|
+
# It killed a deploy mid-apply, after the firewall had already changed, on a resource
|
|
258
|
+
# declaring nothing but a name. We create this user once and never modify it — name and
|
|
259
|
+
# cluster_id both force replacement anyway — so there is no update we want, and the
|
|
260
|
+
# safest number of update paths to leave available is zero.
|
|
261
|
+
lifecycle {
|
|
262
|
+
ignore_changes = all
|
|
263
|
+
}
|
|
249
264
|
}
|
|
250
265
|
|
|
251
266
|
# Transaction-mode pool: ~hundreds of client connections over `pgbouncer` backend
|
package/operator/lib/deploy.sh
CHANGED
|
@@ -426,6 +426,7 @@ EOF
|
|
|
426
426
|
ansible-playbook \
|
|
427
427
|
-i "$tmp_inventory" \
|
|
428
428
|
"$ansible_dir/playbooks/deploy-images.yml" \
|
|
429
|
+
-e "universe_root=$ROOT" \
|
|
429
430
|
-e "env_file=$env_prod"
|
|
430
431
|
;;
|
|
431
432
|
init|full)
|
|
@@ -438,18 +439,21 @@ EOF
|
|
|
438
439
|
ansible-playbook \
|
|
439
440
|
-i "$tmp_inventory" \
|
|
440
441
|
"$ansible_dir/playbooks/install.yml" \
|
|
442
|
+
-e "universe_root=$ROOT" \
|
|
441
443
|
-e "env_file=$env_prod" || { rm -f "$tmp_inventory"; fail "install failed — fix and re-run: unoverse deploy init"; exit 1; }
|
|
442
444
|
echo ""
|
|
443
445
|
info "[2/3] Database setup..."
|
|
444
446
|
ansible-playbook \
|
|
445
447
|
-i "$tmp_inventory" \
|
|
446
448
|
"$ansible_dir/playbooks/db-setup.yml" \
|
|
449
|
+
-e "universe_root=$ROOT" \
|
|
447
450
|
-e "env_file=$env_prod" || { rm -f "$tmp_inventory"; fail "db setup failed — fix and re-run: unoverse deploy db"; exit 1; }
|
|
448
451
|
echo ""
|
|
449
452
|
info "[3/3] Verifying..."
|
|
450
453
|
ansible-playbook \
|
|
451
454
|
-i "$tmp_inventory" \
|
|
452
455
|
"$ansible_dir/playbooks/test-connectivity.yml" \
|
|
456
|
+
-e "universe_root=$ROOT" \
|
|
453
457
|
-e "env_file=$env_prod" || { rm -f "$tmp_inventory"; fail "verification failed — inspect and re-run: unoverse deploy test"; exit 1; }
|
|
454
458
|
echo ""
|
|
455
459
|
ok "Your universe is up. From now on, deploys are just: unoverse deploy"
|
|
@@ -461,6 +465,7 @@ EOF
|
|
|
461
465
|
ansible-playbook \
|
|
462
466
|
-i "$tmp_inventory" \
|
|
463
467
|
"$ansible_dir/playbooks/db-setup.yml" \
|
|
468
|
+
-e "universe_root=$ROOT" \
|
|
464
469
|
-e "env_file=$env_prod"
|
|
465
470
|
;;
|
|
466
471
|
test|check)
|
|
@@ -469,6 +474,7 @@ EOF
|
|
|
469
474
|
ansible-playbook \
|
|
470
475
|
-i "$tmp_inventory" \
|
|
471
476
|
"$ansible_dir/playbooks/test-connectivity.yml" \
|
|
477
|
+
-e "universe_root=$ROOT" \
|
|
472
478
|
-e "env_file=$env_prod"
|
|
473
479
|
;;
|
|
474
480
|
harden)
|
package/package.json
CHANGED