Update upgrade pipeline: bridge creates PR, agent only pushes#1066
Merged
Update upgrade pipeline: bridge creates PR, agent only pushes#1066
Conversation
- Add create-pr and await-ci bridge steps to the workflow pipeline - Update AGENT.md Phase 8: agent commits and pushes only, no PR creation - Update agent prompt to reference workflow context branch - PR is created as draft by the bridge create-pr action The agent focuses on the upgrade work (phases 1-7) and pushes to the branch. The pipeline orchestrates PR creation and CI monitoring.
Contributor
Reviewer's GuideRefactors the upgrade-deps workflow so the agent only commits and pushes to a workflow-provided branch while new bridge steps handle PR creation (as draft) and CI monitoring, and updates docs/prompts to align with this responsibility split. Sequence diagram for new upgrade-deps pipeline orchestrationsequenceDiagram
actor Dev
participant Workflow as upgrade-deps_workflow
participant Agent as upgrade-dependencies_agent
participant Repo as git_pulp_pulp-service
participant BridgePR as bridge_create-pr
participant BridgeCI as bridge_await-ci
participant GitHub as github_pr_api
participant CI as ci_system
Dev->>Workflow: Trigger upgrade-deps workflow
Workflow->>Agent: Run agent with input branch = upgrade/deps-issue_number
Agent->>Repo: git checkout -b BRANCH
Agent->>Repo: Apply upgrades, run tests, modify patches
Agent->>Repo: git commit
Agent->>Repo: git push -u origin BRANCH
Agent-->>Workflow: Return outputs packages_upgraded, patches_modified, patches_removed, tests_passed
Workflow->>BridgePR: Invoke create-pr bridge
BridgePR->>GitHub: Create draft PR
GitHub-->>BridgePR: pr_number
BridgePR-->>Workflow: Output pr_number
Workflow->>BridgeCI: Invoke await-ci bridge with pr_number
loop Up to max_iterations = 4
BridgeCI->>CI: Check PR status
CI-->>BridgeCI: CI status (pending/success/failure)
end
BridgeCI-->>Workflow: Final CI status
Workflow-->>Dev: Report PR link and CI result
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The agent docs reference a
$BRANCHenv var while the workflow passesbranchvia workflow context; consider clarifying how that value is exposed to the agent (e.g., naming the env var explicitly) to avoid confusion or misconfiguration. - Right now
create-pralways setsdraft: true; if the intent is only to draft when tests or migrations fail, consider wiringsteps.upgrade-dependencies.outputs.tests_passed(and other failure signals) into thedraftparameter so successful runs open a ready-for-review PR.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The agent docs reference a `$BRANCH` env var while the workflow passes `branch` via workflow context; consider clarifying how that value is exposed to the agent (e.g., naming the env var explicitly) to avoid confusion or misconfiguration.
- Right now `create-pr` always sets `draft: true`; if the intent is only to draft when tests or migrations fail, consider wiring `steps.upgrade-dependencies.outputs.tests_passed` (and other failure signals) into the `draft` parameter so successful runs open a ready-for-review PR.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
- Add ci-fix step: if CI fails, the agent fixes and re-pushes (up to 3x) - Add code-review step: PR Reviewer agent reviews after CI passes - Add PR Reviewer agent definition with pulp-service-contributor profile - Pipeline stops after review (no auto-merge) Full pipeline: upgrade → create-pr (draft) → await-ci ↔ ci-fix → review
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
create-pr(draft) andawait-cibridge steps to the upgrade-deps workflow pipelineChanges
.alcove/workflows/upgrade-deps-pipeline.yml— 3-step pipeline: upgrade-dependencies → create-pr (draft) → await-ci.alcove/tasks/upgrade-deps.yml— prompt updated to mention branch from context.alcove/agents/upgrade-deps/AGENT.md— Phase 8 rewritten: commit+push only, no gh pr createSummary by Sourcery
Orchestrate dependency upgrade PR creation and CI monitoring via the workflow pipeline while limiting the agent to committing and pushing changes to a designated branch.
New Features:
Enhancements: