-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat(workflow-block): added redeploy action to workflow header for workflow block #1875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryThis PR adds a visual indicator when a child workflow referenced in a workflow block has been modified since its last deployment. It introduces a Key changes:
Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant UI as Workflow Block UI
participant Hook as useChildDeployment
participant API1 as /api/workflows/{id}/deployments
participant API2 as /api/workflows/{id}
participant DB as Database
UI->>Hook: Mount with childWorkflowId
Hook->>Hook: fetchActiveVersion(childWorkflowId)
par Parallel API Calls
Hook->>API1: GET /deployments (fetch active version)
API1->>DB: Query deployment versions
DB-->>API1: versions with createdAt
API1-->>Hook: {versions: [{version, isActive, createdAt}]}
and
Hook->>API2: GET /workflow (fetch metadata)
API2->>DB: Query workflow
DB-->>API2: workflow with updatedAt
API2-->>Hook: {data: {updatedAt}}
end
Hook->>Hook: Compare timestamps:<br/>needsRedeploy = workflow.updatedAt > deployment.createdAt
Hook-->>UI: Return {isDeployed, needsRedeploy, activeVersion}
alt needsRedeploy is true
UI->>UI: Show orange "redeploy" badge
Note over UI: Badge is clickable
UI->>UI: User clicks badge
UI->>API2: POST /api/workflows/{id}/deploy
API2->>DB: Create new deployment version
DB-->>API2: New deployment with new createdAt
API2-->>UI: Deployment success
UI->>Hook: refetchDeployment()
Hook->>Hook: Increment refetchTrigger
Note over Hook,API2: Repeat fetch cycle
end
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 files reviewed, no comments
The timestamp comparison is safe because deployWorkflow explicitly does not update |
Summary
Type of Change
Testing
Tested manually.
Checklist