feat(eval): imperative online-insight commands + BYO execution role (draft) - #2067
Draft
jariy17 wants to merge 1 commit into
Draft
feat(eval): imperative online-insight commands + BYO execution role (draft)#2067jariy17 wants to merge 1 commit into
jariy17 wants to merge 1 commit into
Conversation
… role Adds `agentcore eval online-insight` (create/get/list/pause/resume/delete) backed by dedicated CoreEvalClient methods (createOnlineInsight, getOnlineInsight, listOnlineInsights, setOnlineInsightExecutionStatus, deleteOnlineInsight). - create sets insights + optional clusteringConfig (never evaluators) and REQUIRES --execution-role-arn — no CLI-side auto-provisioning for insight configs. - read/lifecycle reuse the online-eval control-plane ops (same resource). Part 1 (draft). TODO: online-insight update; make online-eval --role-arn required + remove the shared auto-provisioning (onlineEvalExecutionRole).
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## refactor #2067 +/- ##
============================================
- Coverage 97.24% 97.03% -0.22%
============================================
Files 396 403 +7
Lines 24019 24305 +286
============================================
+ Hits 23357 23584 +227
- Misses 662 721 +59 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Command structure
Also:
eval online-insight get | list | pause | resume | delete(by--id).What this does
eval online-insightcommand family (service-direct), sibling ofeval online-eval.CoreEvalClient:createOnlineInsight,getOnlineInsight,listOnlineInsights,setOnlineInsightExecutionStatus,deleteOnlineInsight.createsets the SDKinsights(+ optionalclusteringConfig), neverevaluators, and requires--execution-role-arn— insight configs are not auto-provisioned a role.OnlineEvaluationConfigresource).Service client (
CoreEvalClient)CreateOnlineInsightInput:name,samplingRate,insightIds(required),evaluationExecutionRoleArn(required),clusteringConfig?,sessionTimeoutMinutes?,filters?,enableOnCreate?,description?, and a source union (agent+endpoint?|dataSourceConfig). The impl mapsinsightIds → insights[{insightId}]onCreateOnlineEvaluationConfigCommandand passes the caller role straight through (nograntOnlineEvalScope).Decisions made (flag for review)
--execution-role-arn(net-new, non-breaking). Online-eval's--role-arnrename is deferred.CoreEvalClient(not a separate class file).TODO (remaining scope)
eval online-insight updateeval online-eval--role-arnrequired + remove shared auto-provisioning (onlineEvalExecutionRole.tsx, the?? autoProvisionfallback,--update-role, role-scope warning)Verification
tsc --noEmitclean for these changes. Unit test added (online-insight.test.tsx). Note:bun test/unbundledbun runfor theevalchain can't execute in the current sandbox (pre-existing missing@opentelemetry/otlp-transformerdeep-import that only the bundler resolves) — bug-bash uses the built bundle.Bug bash — exploratory account (PASSED)
Bundled CLI vs account 725476964917 (us-west-2). Evidence:
bugbash-evidence/OI-IMPERATIVE.log.--data-source-config+ BYO roleAgentCoreEvalsSDK-…+--insight Builtin.Insight.FailureAnalysis --clustering-frequency DAILY --sampling-rate 50) → createdoiImperativeBugBash-Dak7Bc4nAu,executionStatus=ENABLED.insights:[{insightId:"Builtin.Insight.FailureAnalysis"}],evaluators:[], andevaluationExecutionRoleArn== the supplied role → BYO role honored, not auto-provisioned. sampling / clustering / data-source round-tripped exactly.createwithout--execution-role-arn→ exit 1 (required option '--execution-role-arn'), no resource created.Notes: (1) command uses the global
--region+AWS_PROFILEenv — there is no--profileflag (doc-worthy). (2) A stalenode_modules(@opentelemetry/otlp-transformer0.221.0 vs pinned 0.213.0) breaks the unbundled/dev build;bun installfixes it — environment drift, not this PR.