Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,14 @@ Worker, Temporal UI и Linux Compose используют внутренний
потому что Docker Desktop иногда не проводит этот gRPC по имени сервиса. Адрес можно переопределить
переменной `TEMPORAL_ADMIN_ADDRESS`.

Тот же bootstrap идемпотентно создаёт Keyword Search Attributes `ActionKind`, `ActionConnector`,
`ActionTenantId`, `ActionActorId`, `ActionStatus`. Поэтому Action Service может добавлять понятные
фильтры в Temporal UI как при первом запуске, так и поверх уже существующего локального volume.

Текущий Action Workflow заменил pre-production-каркас без слоя обратной совместимости. Если volume
Temporal уже содержит workflow старого формата, один раз выполни `task reset`, а затем снова запусти
окружение. Команда удаляет локальные данные и требует подтверждения.

Все быстрые проверки:

```powershell
Expand Down
25 changes: 25 additions & 0 deletions compose/temporal/scripts/create-namespace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,28 @@ done
temporal operator namespace describe --address "$TEMPORAL_ADDRESS" --namespace "$TEMPORAL_NAMESPACE" \
>/dev/null 2>&1 || temporal operator namespace create --address "$TEMPORAL_ADDRESS" \
--namespace "$TEMPORAL_NAMESPACE" --retention 24h

attempt=1
until search_attributes="$(temporal operator search-attribute list --address "$TEMPORAL_ADDRESS" \
--namespace "$TEMPORAL_NAMESPACE" 2>/dev/null)"; do
if [ "$attempt" -ge "$max_attempts" ]; then
echo "Temporal search attributes did not become ready after $max_attempts attempts" >&2
exit 1
fi
attempt=$((attempt + 1))
sleep 1
done

for attribute in ActionKind ActionConnector ActionTenantId ActionActorId ActionStatus; do
if printf '%s\n' "$search_attributes" \
| grep -Eq "^[[:space:]]*$attribute[[:space:]]+Keyword([[:space:]]|$)"; then
continue
fi
if printf '%s\n' "$search_attributes" \
| grep -Eq "^[[:space:]]*$attribute[[:space:]]+"; then
echo "Temporal search attribute $attribute exists with a non-Keyword type" >&2
exit 1
fi
temporal operator search-attribute create --address "$TEMPORAL_ADDRESS" \
--namespace "$TEMPORAL_NAMESPACE" --name "$attribute" --type Keyword
done
11 changes: 11 additions & 0 deletions scripts/check-compose.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,17 @@ if ($composeText -notmatch '(?ms)^ channel-gateway:.*?OIDC_AUDIENCE: channel-ga
if ($composeText -notmatch 'TEMPORAL_ADMIN_ADDRESS:-temporal:7233') {
throw "Portable Compose должен обращаться к Temporal по имени сервиса."
}
$temporalNamespaceScript = Get-Content -Raw -LiteralPath "compose/temporal/scripts/create-namespace.sh"
foreach ($attribute in @("ActionKind", "ActionConnector", "ActionTenantId", "ActionActorId", "ActionStatus")) {
if ($temporalNamespaceScript -notmatch [regex]::Escape($attribute)) {
throw "Temporal bootstrap не регистрирует Search Attribute $attribute."
}
}
if ($temporalNamespaceScript -notmatch 'operator search-attribute list' `
-or $temporalNamespaceScript -notmatch 'operator search-attribute create' `
-or $temporalNamespaceScript -notmatch '\-\-type Keyword') {
throw "Temporal bootstrap должен идемпотентно регистрировать Keyword Search Attributes."
}
$windowsOverride = Get-Content -Raw -LiteralPath "compose/windows.local.yaml"
if ($windowsOverride -notmatch 'host.docker.internal:\$\{TEMPORAL_PORT:-7233\}' `
-or $windowsOverride -notmatch 'host.docker.internal:host-gateway') {
Expand Down
Loading