Boostport / setup-cloudflare-warp

Access Cloudflare Zero-Trust applications in GitHub Actions Workflows
Apache License 2.0
35 stars 20 forks source link

Post Action runs for too long #53

Open RealDyllon opened 7 months ago

RealDyllon commented 7 months ago

The Post Run Boostport/setup-cloudflare-warp step runs for approximately 2 minutes on end.

The post-action step appears to be running /usr/bin/warp-cli --accept-tos settings repeatedly for approximately 2 minutes

Sample Step output ``` Post job cleanup. /usr/bin/sudo rm /var/lib/cloudflare-warp/mdm.xml /usr/bin/warp-cli --accept-tos settings Merged configuration: (derived) Always On: true (network policy) Switch Locked: false (network policy) Mode: WarpWithDnsOverHttps (local policy) Disabled for Wifi: false (local policy) Disabled for Ethernet: false (network policy) Resolve via: *** (default) Onboarding: true (network policy) Exclude mode, with hosts/ips: ... (network policy) Fallback domains: ... (local policy) Daemon Teams Auth: true (network policy) Disable Auto Fallback: false (network policy) Captive Portal: 180 (network policy) Support URL: smth@example.com (local policy) Organization: org-name (local policy) Auth Client ID: *** (network policy) Allow Mode Switch: false (network policy) Allow Updates: true (local policy) Allowed to Leave Org: false (network policy) LAN Access Settings: Allowed until reconnect on a /24 subnet (network policy) Profile ID: default /usr/bin/warp-cli --accept-tos settings Merged configuration: (derived) Always On: true (network policy) Switch Locked: false (network policy) Mode: WarpWithDnsOverHttps (local policy) Disabled for Wifi: false (local policy) Disabled for Ethernet: false (network policy) Resolve via: *** (default) Onboarding: true (network policy) Exclude mode, with hosts/ips: ... (network policy) Fallback domains: ... (local policy) Daemon Teams Auth: true (network policy) Disable Auto Fallback: false (network policy) Captive Portal: 180 (network policy) Support URL: smth@example.com (local policy) Organization: org-name (local policy) Auth Client ID: *** (network policy) Allow Mode Switch: false (network policy) Allow Updates: true (local policy) Allowed to Leave Org: false (network policy) LAN Access Settings: Allowed until reconnect on a /24 subnet (network policy) Profile ID: default ... this continues for ~2 minutes ... ```
F21 commented 7 months ago

Does it eventually finish? The reason it's takes time is because it needs to check if the runner is disconnected from WARP: https://github.com/Boostport/setup-cloudflare-warp/blob/main/lib/setup-cloudflare-warp.js#L179

giriparus commented 5 months ago

Not sure if this is the right approach but it makes sense to me to run the disconnect command explicitly before removing the config file just to be sure. Here's a PR for it.