Skip to content

[PRODCRE-1484] add a function to ChainlinkClient to read workflow events from a HTTP API - #2300

Closed
Tofel wants to merge 2 commits into
mainfrom
prodcre-1484-dev-only-API
Closed

Tofel wants to merge 2 commits into
mainfrom
prodcre-1484-dev-only-API

Conversation

@Tofel

@Tofel Tofel commented Dec 8, 2025 •

Copy link
Copy Markdown
Contributor

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

  • framework/clclient/client.go
    • Added strconv import to use for integer to string conversions.
    • Implemented ReadWorkflowEvents function 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.
  • framework/clclient/models.go
    • Defined WorkflowDebugEvents struct to model the response for workflow debug events, which includes a nested WorkflowDebugEventsData structure.
    • Defined WorkflowDebugEventsData struct to detail the data type, ID, and attributes related to workflow debug events.
    • Defined WorkflowDebugEventsAttributes struct to encapsulate the events as an array of WorkflowDebugEvent.
    • Defined WorkflowDebugEvent struct to model individual debug events, including timestamp, sequence, message (protobuf encoded), and type (protobuf type name).

@Tofel
Tofel requested a review from a team as a code owner December 8, 2025 16:07
Copilot AI review requested due to automatic review settings December 8, 2025 16:07
@github-actions

github-actions Bot commented Dec 8, 2025

Copy link
Copy Markdown

👋 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!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread framework/clclient/client.go Outdated
"sequence": strconv.FormatInt(sequence, 10),
"limit": strconv.Itoa(limit),
}).
Get("/v2/debug/workflow/{id}/events?sequence={sequenceg}")

Copilot AI Dec 8, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'sequenceg' to 'sequence' in the URL template.

Suggested change
Get("/v2/debug/workflow/{id}/events?sequence={sequenceg}")
Get("/v2/debug/workflow/{id}/events?sequence={sequence}")

Copilot uses AI. Check for mistakes.
@Tofel Tofel changed the title [PRODCRE-1484] add a function to ChainlinkClient to read workflow events from http API [PRODCRE-1484] add a function to ChainlinkClient to read workflow events from a HTTP API Dec 9, 2025
@Tofel

Tofel commented Dec 23, 2025

Copy link
Copy Markdown
Contributor Author

we will not need this functionality

@Tofel Tofel closed this Dec 23, 2025
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.

3 participants