@keepur/hive 0.2.3 → 0.2.4
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/package.json +1 -1
- package/pkg/cli.min.js +71 -71
- package/pkg/server.min.js +123 -123
- package/service/deploy.sh +8 -2
- package/service/instances.conf +6 -2
package/service/deploy.sh
CHANGED
|
@@ -293,7 +293,11 @@ if $ROLLBACK; then
|
|
|
293
293
|
echo "ERROR: no instance '$FILTER_INSTANCE' in $INSTANCES_CONF" >&2
|
|
294
294
|
exit 2
|
|
295
295
|
fi
|
|
296
|
-
IFS='|' read -r id _config
|
|
296
|
+
IFS='|' read -r id _config _conf_label logs_dir ports _tag <<< "$ROLLBACK_ROW"
|
|
297
|
+
# Label is derived from instance id, not read from the conf (the conf's label
|
|
298
|
+
# column is historical — the installer builds labels as com.hive.<id>.agent
|
|
299
|
+
# per service/install.sh). See KPR-63.
|
|
300
|
+
label="com.hive.${id}.agent"
|
|
297
301
|
instance_root=$(_instance_root "$id")
|
|
298
302
|
echo "--- Rolling back $id (root: $instance_root) ---"
|
|
299
303
|
# Stop LaunchAgent BEFORE rotating .hive/. Without -kp, launchd auto-respawns
|
|
@@ -391,7 +395,9 @@ fi
|
|
|
391
395
|
FAILED_INSTANCES=()
|
|
392
396
|
|
|
393
397
|
for inst in "${INSTANCES[@]}"; do
|
|
394
|
-
IFS='|' read -r id config
|
|
398
|
+
IFS='|' read -r id config _conf_label logs_dir ports engine_tag <<< "$inst"
|
|
399
|
+
# Derive label from instance id — conf's label column is ignored (see KPR-63).
|
|
400
|
+
label="com.hive.${id}.agent"
|
|
395
401
|
|
|
396
402
|
# --instance=<id> filter
|
|
397
403
|
if [[ -n "$FILTER_INSTANCE" && "$FILTER_INSTANCE" != "$id" ]]; then
|
package/service/instances.conf
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
# Hive instance definitions — one per line
|
|
2
|
-
# Fields: INSTANCE_ID | HIVE_CONFIG | (unused) |
|
|
2
|
+
# Fields: INSTANCE_ID | HIVE_CONFIG | (unused) | (unused label — advisory) | LOGS_DIR | PORTS (space-separated) | ENGINE_TAG
|
|
3
3
|
#
|
|
4
4
|
# HIVE_CONFIG is relative to DEPLOY_DIR
|
|
5
5
|
# Agents are stored in MongoDB (agent_definitions collection), not on disk
|
|
6
6
|
# PORTS are checked/killed on deploy restart
|
|
7
7
|
# ENGINE_TAG is the npm version tag to deploy for this instance. Accepts `v0.2.0` or `0.2.0`
|
|
8
8
|
# (leading `v` stripped before npm calls). Omit to default to the `latest` dist-tag.
|
|
9
|
+
#
|
|
10
|
+
# The fourth column was historically the LaunchAgent label but is now ignored by
|
|
11
|
+
# deploy.sh — the label is always derived as com.hive.<INSTANCE_ID>.agent to match
|
|
12
|
+
# what service/install.sh produces. The column is retained for format stability.
|
|
9
13
|
|
|
10
|
-
dodi|hive.yaml|-|com.hive.agent|logs|3100 3200|v0.2.0
|
|
14
|
+
dodi|hive.yaml|-|com.hive.dodi.agent|logs|3100 3200|v0.2.0
|
|
11
15
|
personal|hive-personal.yaml|-|com.hive.personal.agent|logs-personal|3400 3403|v0.2.0
|