Skip to content

Prepare workflow APIs for compose advisory integration#82

Merged
rockythorn merged 1 commit into
resf:mainfrom
rockythorn:feature/compose-advisory-integration
May 29, 2026
Merged

Prepare workflow APIs for compose advisory integration#82
rockythorn merged 1 commit into
resf:mainfrom
rockythorn:feature/compose-advisory-integration

Conversation

@rockythorn

@rockythorn rockythorn commented May 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replace the asyncio.wait_for(handle.result(), timeout=1.0) status heuristic with Temporal's describe() API, which returns a definitive status enum (RUNNING, COMPLETED, FAILED, etc.) plus start/close times
  • Use deterministic workflow IDs (rh-matcher-compose-v{major}) for single-version triggers so Temporal deduplicates concurrent runs via id_reuse_policy=ALLOW_DUPLICATE
  • Return 409 Conflict when a trigger is attempted for a version that already has a running workflow
  • Add live workflow status panel to the admin UI with 15-second polling after triggering a workflow

These changes prepare the Apollo server for compose pipeline integration, where trigger-advisory-clone.sh (toolkit side) will call the trigger and status endpoints to ensure fresh advisory data before apollo_tree generates updateinfo.xml.

Test plan

  • Trigger endpoint returns deterministic ID rh-matcher-compose-v9 for {"major_versions": [9]}
  • Status endpoint returns running with start_time, run_id via describe() API
  • Duplicate trigger while workflow is running returns 409
  • Multi-version and no-version triggers still use UUID-based IDs (backward compat)
  • Admin UI status panel polls and updates after triggering a workflow
  • Admin UI shows "already running" error on duplicate trigger

The status endpoint used asyncio.wait_for with a 1-second timeout to
guess whether a workflow was running or completed. This created
abandoned coroutines and couldn't distinguish failed/cancelled/timed-out
states — unreliable for the compose pipeline polling unattended for
hours.

Switch to Temporal's describe() API which returns a definitive status
enum (RUNNING, COMPLETED, FAILED, etc.) plus start/close times.

Also adds compose-pipeline support:
- Deterministic workflow IDs (rh-matcher-compose-v{major}) for
  single-version triggers so Temporal deduplicates concurrent runs
- 409 Conflict response when a workflow is already running
- Admin UI status panel with live polling after triggering a workflow
@rockythorn rockythorn merged commit 1b80805 into resf:main May 29, 2026
1 check passed
@rockythorn rockythorn deleted the feature/compose-advisory-integration branch May 29, 2026 17:01
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.

2 participants