Skip to content

Comments

Add a hook to tag workflow SDK discovery. This will be used to track what SDKs are used#1850

Open
nolag wants to merge 2 commits intomainfrom
rtinianov_tagsdk
Open

Add a hook to tag workflow SDK discovery. This will be used to track what SDKs are used#1850
nolag wants to merge 2 commits intomainfrom
rtinianov_tagsdk

Conversation

@nolag
Copy link
Contributor

@nolag nolag commented Feb 24, 2026

For usage, see this draft PR

Copilot AI review requested due to automatic review settings February 24, 2026 16:02
@nolag nolag requested a review from a team as a code owner February 24, 2026 16:02
@nolag nolag marked this pull request as draft February 24, 2026 16:02
@github-actions
Copy link

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

@github-actions
Copy link

github-actions bot commented Feb 24, 2026

✅ API Diff Results - No breaking changes


📄 View full apidiff report

Copy link
Contributor

Copilot AI left a comment

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 a hook mechanism to track SDK usage by introducing a SdkLabeler callback function to the ModuleConfig struct. The hook is invoked during module creation after SDK version discovery, allowing callers to tag metrics or logs with the discovered SDK import name.

Changes:

  • Added SdkLabeler optional callback field to ModuleConfig with nil-safety defaulting to no-op
  • Invoked SdkLabeler with the discovered v2 import name after module initialization in newModule
  • Added comprehensive test coverage for nil-safety and callback invocation with NoDAG modules

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pkg/workflows/wasm/host/module.go Added SdkLabeler field to ModuleConfig, implemented nil-safety default, and invoked the callback with v2ImportName after SDK discovery
pkg/workflows/wasm/host/module_test.go Added tests verifying nil SdkLabeler defaults to no-op and that it's called with discovered v2 import name

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

@nolag nolag marked this pull request as ready for review February 24, 2026 16:09
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