refactor: rename computed-* helpers, expose computed vector and network keys

Addresses review feedback on #8640. fn-archive-max-size,
fn-archive-max-files, fn-git-deploy-branch, and fn-git-keep-git-dir are
renamed with `computed` in the function name so the names match the
resolved-with-default semantic they implement, and every caller is
updated in lockstep. logs:report renames the misordered
--logs-vector-global-image and --logs-vector-global-networks to
--logs-global-vector-image and --logs-global-vector-networks, makes the
global getters return the raw stored value, and adds
--logs-computed-vector-image, --logs-computed-vector-networks, and
--logs-computed-vector-sink. network:report --global gains the
computed-* keys for attach-post-create, attach-post-deploy,
initial-network, and tld so external tooling can read the resolved
value at global scope. The --quiet flag is dropped from every
:report --format json | jq invocation across the PR's bats files; the
report's --format json output is the only stdout and the flag is
redundant.
This commit is contained in:
Jose Diaz-Gonzalez
2026-05-23 04:47:03 -04:00
parent e70f7918a3
commit 357e12bd83
22 changed files with 200 additions and 174 deletions

View File

@@ -11,7 +11,7 @@ trigger-git-git-from-directory() {
declare APP="$1" SOURCECODE_WORK_DIR="$2" USER_NAME="${3:-Dokku}" USER_EMAIL="${4:-automated@dokku.sh}"
local APP_ROOT="$DOKKU_ROOT/$APP"
local DOKKU_DEPLOY_BRANCH="$(fn-git-deploy-branch "$APP")"
local DOKKU_DEPLOY_BRANCH="$(fn-git-computed-deploy-branch "$APP")"
local REV
local TMP_WORK_DIR=$(mktemp -d "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")
local TMP_WORK_DIR_2=$(mktemp -d "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")
@@ -25,7 +25,7 @@ trigger-git-git-from-directory() {
dokku_log_info1 "Updating git repository with specified build context"
if [[ "$has_code" == "false" ]]; then
# setup new repo
local DEPLOY_BRANCH="$(fn-git-deploy-branch "$APP")"
local DEPLOY_BRANCH="$(fn-git-computed-deploy-branch "$APP")"
cp -rT "$SOURCECODE_WORK_DIR" "$TMP_WORK_DIR"
suppress_output fn-git-cmd "$TMP_WORK_DIR" init
suppress_output fn-git-cmd "$TMP_WORK_DIR" checkout -b "$DEPLOY_BRANCH"
@@ -64,7 +64,7 @@ trigger-git-git-from-directory() {
return
else
local exit_code=$?
local DOKKU_DEPLOY_BRANCH="$(fn-git-deploy-branch "$APP")"
local DOKKU_DEPLOY_BRANCH="$(fn-git-computed-deploy-branch "$APP")"
if [[ "$has_code" == "false" ]]; then
fn-git-cmd "$APP_ROOT" update-ref -d HEAD
else