Skip to content

chore: add WithContext() option for engine.Invoke()#578

Open
PeterSchafer wants to merge 7 commits intomainfrom
chore/CLI-1416_terminated
Open

chore: add WithContext() option for engine.Invoke()#578
PeterSchafer wants to merge 7 commits intomainfrom
chore/CLI-1416_terminated

Conversation

@PeterSchafer
Copy link
Copy Markdown
Contributor

Description

This PR introduces WithContext() for engine.Invoke() so that invokers can provide custom contexts.
It also uses any provided context in report_analytics_workflow.

Checklist

  • Tests added and all succeed (make test)
  • Regenerated mocks, etc. (make generate)
  • Linted (make lint)
  • Test your changes work for the CLI
    1. Clone / pull the latest CLI main.
    2. Run go get github.com/snyk/go-application-framework@YOUR_LATEST_GAF_COMMIT in the cliv2 directory.
      • Tip: for local testing, you can uncomment the line near the bottom of the CLI's go.mod to point to your local GAF code.
    3. Run go mod tidy in the cliv2 directory.
    4. Run the CLI tests and do any required manual testing.
    5. Open a PR in the CLI repo now with the go.mod and go.sum changes.
    • Once this PR is merged, repeat these steps, but pointing to the latest GAF commit on main and update your CLI PR.

@PeterSchafer PeterSchafer requested review from a team as code owners March 30, 2026 17:05
@snyk-io
Copy link
Copy Markdown

snyk-io bot commented Mar 30, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@snyk-io
Copy link
Copy Markdown

snyk-io bot commented Mar 30, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

@PeterSchafer PeterSchafer force-pushed the chore/CLI-1416_terminated branch from 58f300c to 85d19c3 Compare April 1, 2026 16:19
@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot
Copy link
Copy Markdown

PR Reviewer Guide 🔍

🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Interface Constructor Privatized 🟡 [minor]

The function NewInvocationContext has been renamed to newInvocationContext, making it unexported. While the reference code shows it is only called internally within the workflow package (specifically in engineimpl.go), this is a breaking change for any external code or tests that may have been manually constructing an InvocationContext implementation instead of using the provided mocks.

func newInvocationContext(
📚 Repository Context Analyzed

This review considered 67 relevant code sections from 13 files (average relevance: 0.91)

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.

1 participant