Skip to content

Optimize Tailscale workflows: caching, parallelization, fix broken dispatch chain - #2

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1780210694-optimize-tailscale-workflows
Open

Optimize Tailscale workflows: caching, parallelization, fix broken dispatch chain#2
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1780210694-optimize-tailscale-workflows

Conversation

@devin-ai-integration

Copy link
Copy Markdown

Summary

The three Tailscale workflow files had broken cross-workflow dispatch (filenames didn't match the dispatch URLs) and several speed bottlenecks. This PR fixes the chaining and cuts setup time by ~30-60s per run.

Bug fix

Workflow dispatch URLs referenced workflow-1.yml / workflow-2.yml / workflow-stop.yml, but actual filenames were RDP + Tailscale (Workflow 1).yml, etc. Renamed files to match, fixing the chain: WF1 → WF2 → STOP → WF1.

Speed optimizations

Change Est. savings
actions/cache@v4 for Tailscale MSI (~50MB) ~10-30s on cache hit
actions/cache@v4 for pip packages ~10-20s on cache hit
Removed --force-reinstall + pip install --upgrade pip ~15-30s
Parallel pip install via Start-Process background while Tailscale installs in foreground ~15-20s (overlapped)
Merged "Decide runtime" into the main install step ~2-5s step overhead
STOP cooldown heartbeat interval: 60s → 300s (4 beats instead of 20) cleaner logs

Parallelization pattern (WF1 & WF2)

$pipProc = Start-Process python -ArgumentList "-m","pip","install",... -PassThru
# ... install Tailscale in foreground ...
$pipProc | Wait-Process   # collect background result

Link to Devin session: https://app.devin.ai/sessions/2a948bbba61047bf9fff01738d133631
Requested by: @mohammad1390555

…URLs

- Rename workflow files to match dispatch URLs (fixes broken cross-workflow chain)
- Cache Tailscale MSI with actions/cache@v4 (skip ~50MB download on cache hit)
- Cache pip packages (skip re-download of pyautogui, pynput, pillow)
- Run pip install in parallel with Tailscale install via background process
- Remove redundant --force-reinstall and pip upgrade (saves ~15-30s)
- Merge 'Decide runtime' into the main install step (reduce step overhead)
- Reduce STOP cooldown heartbeat frequency (5 min intervals vs 1 min)

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant