Repository navigation
Conversation
|
👋 Tofel, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
There was a problem hiding this comment.
Pull request overview
This PR adds functionality to the ChainlinkClient to retrieve workflow debug events from the HTTP API. The implementation includes new data models for workflow events and a client method to fetch them with pagination support.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| framework/clclient/models.go | Defines data structures for workflow debug events API response |
| framework/clclient/client.go | Implements ReadWorkflowEvents method to fetch workflow events via HTTP API |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "sequence": strconv.FormatInt(sequence, 10), | ||
| "limit": strconv.Itoa(limit), | ||
| }). | ||
| Get("/v2/debug/workflow/{id}/events?sequence={sequenceg}") |
There was a problem hiding this comment.
Corrected spelling of 'sequenceg' to 'sequence' in the URL template.
| Get("/v2/debug/workflow/{id}/events?sequence={sequenceg}") | |
| Get("/v2/debug/workflow/{id}/events?sequence={sequence}") |
|
we will not need this functionality |
Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.
Why
The pull request introduces functionality to read workflow events from a Chainlink node, enhancing debug capabilities. It also adds necessary data models for handling the debug events.
What
strconvimport to use for integer to string conversions.ReadWorkflowEventsfunction to fetch workflow debug events from a Chainlink node using its REST API. This function constructs a request with workflow ID, sequence number, and limit as parameters, processes the response, and returns debug event data along with the HTTP response or an error.WorkflowDebugEventsstruct to model the response for workflow debug events, which includes a nestedWorkflowDebugEventsDatastructure.WorkflowDebugEventsDatastruct to detail the data type, ID, and attributes related to workflow debug events.WorkflowDebugEventsAttributesstruct to encapsulate the events as an array ofWorkflowDebugEvent.WorkflowDebugEventstruct to model individual debug events, including timestamp, sequence, message (protobuf encoded), and type (protobuf type name).