elastic / elastic/ai-github-actions

[product-manager-impersonator] Quick setup retry/backoff for workflow downloads

Open
#1,849 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
11
Forks
16
Avg merge
22h 9m
Merged PRs (30d)
31

Description

## Feature Idea

**Summary:** Add built-in retry/backoff and timeout handling to `scripts/quick-setup.sh` download steps so transient network failures don’t abort setup.

## Why a Customer Would Want This
Teams commonly run the one-line quick setup command in CI-like or corporate network environments where transient DNS/TLS/429 errors happen. Right now a single failed `curl` during workflow fetch aborts the whole run, even after branch checkout has started. That creates avoidable reruns and slows first-time adoption.

## Rough Implementation Sketch
- Add a small `download_with_retry()` helper in `scripts/quick-setup.sh` that wraps `curl` with retry/backoff and sensible connect/overall timeouts.
- Replace direct download calls for workflow triggers and `agentics-maintenance.yml` with the helper.
- Print clear per-file retry/failure diagnostics and exit with a concise failure summary when retries are exhausted.
- Optionally expose retry/timeout knobs via flags or env vars, and document defaults in quick-setup docs.

## Why It Won't Be That Hard
The change is tightly scoped to one script plus docs. Existing download calls are centralized and easy to swap to a helper, and no workflow compiler changes are required.

## Evidence
- `scripts/quick-setup.sh#L9` uses `set -euo pipefail`, so a transient download failure exits immediately.
- `scripts/quick-setup.sh#L188-L197` downloads each workflow using plain `curl -fsSL` with no retry/backoff.
- `scripts/quick-setup.sh#L200-L207` downloads `agentics-maintenance.yml` the same way.
- `README.md#L32-L35` and `gh-agent-workflows/README.md#L48-L51` promote the one-line quick setup path, so improving its reliability has high customer impact.

## Suggested Actions
- [ ] Add `download_with_retry()` to `scripts/quick-setup.sh` and route all setup downloads through it.
- [ ] Add focused tests or script-level validation for retry behavior and failure messaging.
- [ ] Document retry/timeouts and defaults in setup docs.

---
[What is this?](https://ela.st/github-ai-tools) | [From workflow: Trigger Product Manager Impersonator](https://github.com/elastic/ai-github-actions/actions/runs/32125034816)

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Contributor guide

Open the contributing guide

Research direction

Start with scripts/quick-setup.sh, especially lines 188-207, and inspect the existing curl download calls and set -euo pipefail behavior. Check README.md and gh-agent-workflows/README.md for the setup documentation. Done means setup downloads use retry/backoff and timeout handling, report clear failures, and focused validation covers retry behavior and exhausted retries.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, shell
Domain
devops, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.