mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-09-14 11:06:15 +05:00
chore: remove temporary self-hosted remote fix workflow
This commit is contained in:
parent
1b179caf8e
commit
f2aa8c8fed
@ -1,103 +0,0 @@
|
||||
name: Issue 416 Self-hosted Remote Fix
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["feat/issue-416-backup-destinations"]
|
||||
paths:
|
||||
- ".github/workflows/issue-416-selfhosted-remote-fix.yml"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
patch-and-verify:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
ref: feat/issue-416-backup-destinations
|
||||
- uses: pnpm/action-setup@v5
|
||||
with:
|
||||
version: 10.22.0
|
||||
- uses: actions/setup-node@v5
|
||||
with:
|
||||
node-version: 24.4.0
|
||||
cache: pnpm
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- name: Apply root-cause fix
|
||||
run: |
|
||||
python - <<'PY'
|
||||
from pathlib import Path
|
||||
|
||||
def replace_once(text: str, old: str, new: str, label: str) -> str:
|
||||
count = text.count(old)
|
||||
if count != 1:
|
||||
raise SystemExit(f"{label}: expected exactly one match, found {count}")
|
||||
return text.replace(old, new, 1)
|
||||
|
||||
router = Path("apps/dokploy/server/api/routers/destination.ts")
|
||||
text = router.read_text()
|
||||
text = replace_once(
|
||||
text,
|
||||
'if (IS_CLOUD) {\n\t\t\t\t\tconst server = await findServerById(input.serverId || "");',
|
||||
'if (input.serverId) {\n\t\t\t\t\tconst server = await findServerById(input.serverId);',
|
||||
"router remote branch",
|
||||
)
|
||||
text = replace_once(
|
||||
text,
|
||||
'await execAsyncRemote(input.serverId || "", rcloneCommand);',
|
||||
'await execAsyncRemote(input.serverId, rcloneCommand);',
|
||||
"router remote execution",
|
||||
)
|
||||
router.write_text(text)
|
||||
|
||||
ui = Path("apps/dokploy/components/dashboard/settings/destination/handle-destinations.tsx")
|
||||
text = ui.read_text()
|
||||
anchor = '''\tconst isFileTransfer =\n\t\tcurrentProvider === RCLONE_DESTINATION_PROVIDERS.FTP ||\n\t\tcurrentProvider === RCLONE_DESTINATION_PROVIDERS.SFTP;\n'''
|
||||
text = replace_once(
|
||||
text,
|
||||
anchor,
|
||||
anchor + '\tconst hasRemoteServers = (servers?.length ?? 0) > 0;\n\tconst showServerSelector = Boolean(isCloud) || hasRemoteServers;\n',
|
||||
"form server selector state",
|
||||
)
|
||||
text = replace_once(
|
||||
text,
|
||||
'isCloud ? "flex-col!" : "flex-row",',
|
||||
'showServerSelector ? "flex-col!" : "flex-row",',
|
||||
"footer layout",
|
||||
)
|
||||
text = replace_once(
|
||||
text,
|
||||
'\t\t\t\t\t\t{isCloud ? (\n\t\t\t\t\t\t\t<div className="flex flex-col gap-4 border p-2 rounded-lg">',
|
||||
'\t\t\t\t\t\t{showServerSelector ? (\n\t\t\t\t\t\t\t<div className="flex flex-col gap-4 border p-2 rounded-lg">',
|
||||
"footer selector branch",
|
||||
)
|
||||
text = replace_once(
|
||||
text,
|
||||
'<SelectItem value="none">None</SelectItem>',
|
||||
'{!isCloud && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value="none">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDokploy Server (Local)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}',
|
||||
"local server option",
|
||||
)
|
||||
ui.write_text(text)
|
||||
PY
|
||||
- name: Format changed source
|
||||
run: pnpm exec biome check --write apps/dokploy/server/api/routers/destination.ts apps/dokploy/components/dashboard/settings/destination/handle-destinations.tsx
|
||||
- name: Verify source routing invariants
|
||||
run: |
|
||||
grep -F 'if (input.serverId) {' apps/dokploy/server/api/routers/destination.ts
|
||||
grep -F 'await execAsyncRemote(input.serverId, rcloneCommand);' apps/dokploy/server/api/routers/destination.ts
|
||||
grep -F 'showServerSelector = Boolean(isCloud) || hasRemoteServers' apps/dokploy/components/dashboard/settings/destination/handle-destinations.tsx
|
||||
grep -F 'Dokploy Server (Local)' apps/dokploy/components/dashboard/settings/destination/handle-destinations.tsx
|
||||
- name: Build server
|
||||
run: pnpm server:build
|
||||
- name: Typecheck workspaces
|
||||
run: pnpm typecheck
|
||||
- name: Focused backup/security tests
|
||||
run: pnpm --filter=dokploy exec vitest --config __test__/vitest.config.ts __test__/utils/backups.test.ts __test__/backups/redact-credentials.test.ts __test__/utils/issue-416-path-safety.test.ts --run
|
||||
- name: Commit verified fix
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add apps/dokploy/server/api/routers/destination.ts apps/dokploy/components/dashboard/settings/destination/handle-destinations.tsx
|
||||
git commit -m "fix: test backup destinations on selected server"
|
||||
git push origin HEAD:feat/issue-416-backup-destinations
|
||||
Loading…
Reference in New Issue
Block a user