Skip to content

[PRODCRE-1483] obs without ctf bin - #2314

Closed
Tofel wants to merge 3 commits into
mainfrom
prodcre-1483-obs-without-ctf-bin
Closed

Tofel wants to merge 3 commits into
mainfrom
prodcre-1483-obs-without-ctf-bin

Conversation

@Tofel

@Tofel Tofel commented Dec 15, 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 updates include the introduction of functionalities to read workflow and orphan events, models to support these functionalities, and improvements to the observability setup, including the ability to specify a source for observability files. These changes enhance the Chainlink client's capabilities and the flexibility of the observability setup, facilitating better debugging and monitoring.

What

  • framework/clclient/client.go
    • Added strconv import for string conversion.
    • Introduced ReadWorkflowEvents and ReadOrphanEvents methods to fetch workflow-related debug events and orphan events, respectively. These methods facilitate better debugging by allowing retrieval of specific event logs.
  • framework/clclient/models.go
    • Added models WorkflowDebugEvents, WorkflowOrphanEvents, and their related models to support the new client methods for fetching debug and orphan events.
  • framework/go.mod
    • Added indirect dependencies github.com/google/go-github/v72 and github.com/google/go-querystring v1.1.0 to support new functionalities related to GitHub integration.
  • framework/observability.go
    • Introduced new methods resolveObservabilitySource, downloadAndCacheObservabilityFiles, parseGitHubURL, and downloadDirectoryRecursive to handle observability files sourcing from different locations, including embedded, local, and GitHub sources.
    • Added ObservabilityUpOnlyLokiWithSource, ObservabilityUpWithSource, and ObservabilityUpFullWithSource methods that allow specifying an observability file source, enhancing flexibility in observability setup.
    • Updated existing ObservabilityUpOnlyLoki, ObservabilityUp, and ObservabilityUpFull methods to utilize the new source specification capabilities.

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

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 enhances the observability framework to support flexible sourcing of observability configuration files. Instead of relying solely on embedded files, users can now load observability configurations from local filesystems or remote GitHub repositories, with automatic caching for remote sources.

Key Changes:

  • Added support for multiple observability file sources (embedded, local filesystem, remote GitHub)
  • Implemented GitHub API integration with caching mechanism for remote observability files
  • Added new Chainlink client methods to read workflow debug and orphan events

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.

File Description
framework/observability.go Core implementation of flexible observability file sourcing with GitHub download/caching capabilities
framework/go.mod Added GitHub API client dependencies (v72.0.0)
framework/clclient/models.go Added data models for workflow debug and orphan events
framework/clclient/client.go Added API methods to fetch workflow debug and orphan events

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1449 to +1451
Type string `json:"type"`
ID string `json:"id"`
Attributes WorkflowDebugEventsAttributes `json:"attributes"`

Copilot AI Dec 15, 2025

Copy link

Choose a reason for hiding this comment

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

The field type should be WorkflowOrphanEventsAttributes instead of WorkflowDebugEventsAttributes. This is a copy-paste error that causes the WorkflowOrphanEventsData struct to have the wrong attributes type.

Suggested change
Type string `json:"type"`
ID string `json:"id"`
Attributes WorkflowDebugEventsAttributes `json:"attributes"`
Type string `json:"type"`
ID string `json:"id"`
Attributes WorkflowOrphanEventsAttributes `json:"attributes"`

Copilot uses AI. Check for mistakes.
"sequence": strconv.FormatInt(sequence, 10),
"limit": strconv.Itoa(limit),
}).
Get("/v2/debug/workflow/{id}/events?sequence={sequence}&limit={limit}")

Copilot AI Dec 15, 2025

Copy link

Choose a reason for hiding this comment

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

Query parameters should not be included in the URL path when using SetQueryParams. The query string should be just '/v2/debug/workflow/{id}/events' as SetQueryParams already adds the query parameters.

Copilot uses AI. Check for mistakes.
"sequence": strconv.FormatInt(sequence, 10),
"limit": strconv.Itoa(limit),
}).
Get("/v2/debug/workflow/orphan_events?sequence={sequence}&limit={limit}")

Copilot AI Dec 15, 2025

Copy link

Choose a reason for hiding this comment

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

Query parameters should not be included in the URL path when using SetQueryParams. The query string should be just '/v2/debug/workflow/orphan_events' as SetQueryParams already adds the query parameters.

Copilot uses AI. Check for mistakes.
@Tofel Tofel closed this Dec 18, 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.

2 participants