You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow OIDC deployment of the conversational result dispatcher
Status: pending
Tags: enhancement, assistant, infra, testing, P1
Depends on: #129 source acceptance/merge — implementation may start from independently reviewed commit 9b5b888, but review/merge must use the finally accepted #129 source
Blocks: #126 production deployment and its HUMAN sandbox gate
Related: #124, DataTalksClub/aws-infra#18
Outcome and ownership
Update only the shared DataTalksClub/aws-infra source of truth at sandbox/dataops/template.github-actions.yaml and its focused tests so dataops-github-actions-deploy can deploy and roll back #126's exact result dispatcher. Do not change DataOps runtime code or apply AWS during agent work.
Fetch first and work in a fresh isolated worktree, suggested as /home/alexey/git/.worktrees/aws-infra-130 on issue-130-conversational-result-dispatcher-deploy-role. Preserve the dirty ../aws-infra checkout, merged #124 PR #18, and finally accepted #129 changes. Never stash/reset/overwrite the sibling checkout.
generated role ConversationalResultDispatcherFunctionRole;
its generated Lambda log group;
one Schedule event named ResultDelivery, rate(1 minute), conditional on ConversationalResultDeliveryEnabled;
the schedule's generated EventBridge rule and Lambda permission.
There is no dispatcher event-source mapping, queue, EventInvokeConfig, Function URL, API, layer, or separately managed log resource. Default-false disables the schedule but does not remove the function/role.
Acceptance must compare the policy with final agent-approved #126 source, a fresh isolated sam build, and the deploy change-set inventory. Exact logical-ID/resource changes require exact policy/test changes; add nothing speculative.
Policy placement and quotas
The inline role policy is already about 9,341 compact characters, only 899 below IAM's aggregate 10,240 role-inline quota. Do not extend it.
Do not mix this unrelated domain into #129's Sponsor-only compute policy or weaken its negative boundary. Add one generated-name AWS::IAM::ManagedPolicy logical resource, ConversationalResultDispatcherDeployPolicy, attached only through Roles: [!Ref GitHubActionsDeployRole]. Do not set ManagedPolicyName. The OIDC role must not manage/version/attach its own policies; the credentialed shared-stack operator owns those operations.
Deterministic default/pseudo-value resolution plus compact JSON tests must prove:
Tests compare exact strings without trailing whitespace. Do not grant invoke, Function URL operations, lambda:*, ${FullDocsStackName}-Conversational*, or stack/account-wide functions. Add/RemovePermission cover only the generated schedule permission on this function.
Keep it unchanged. Exact Lambda Add/RemovePermission covers the generated permission. Add no EventBridge/Scheduler action, event-bus write, event-source mapping, async-invoke configuration, SQS, DynamoDB, Secrets Manager, Telegram, or runtime permission.
One generated-name dispatcher managed policy attaches only to GitHubActionsDeployRole; inline and Sponsor policies have no dispatcher resource.
Lambda, role/PassRole, and log action/resource sets exactly match this spec.
Existing EventBridge statement remains unchanged and final comparison proves it covers ResultDelivery.
No dispatcher mapping permission exists; no invoke/URL/EventInvokeConfig/queue/table/secret/Telegram/runtime/broad/self-administration permission is added.
Resolve actual documents and enforce all size/count ceilings. Fresh-build #126 in an isolated output directory and assert exactly one dispatcher function, generated role/log family, one ResultDelivery schedule plus generated rule/permission, and no dispatcher mapping/queue/async config/URL. Compare the eventual CloudFormation change set.
Minimum commands:
uv run --with pytest python -m pytest sandbox/dataops/tests -q
sam validate --lint --template-file sandbox/dataops/template.github-actions.yaml
git diff --check <accepted-base>...HEAD
Also run project-supported #126make sam-build and lint with fresh isolated output, never stale .aws-sam.
Pipeline and HUMAN apply
Engineer implements/commits in isolated aws-infra with Refs DataTalksClub/dataops#130; no push/apply.
Use CloudFormation, never manual IAM edits. Retain the exact prior merged template/commit. A failed update must reach an explained terminal rollback state. For an unacceptable successful update, redeploy the prior accepted shared-infra template with CAPABILITY_NAMED_IAM; confirm dispatcher policy detaches/deletes and #124/#129 remain effective. Do not remove PR #18 while #124 resources exist, remove #129 coverage while Sponsor resources exist, or edit/delete DataOps app/runtime resources. Keep result delivery disabled during rollback verification.
Out of scope
DataOps code/SAM changes, conversational behavior, Telegram/z.ai calls, secrets, task writes, app deploy outside CI, #126's sandbox journey, broad role redesign, moving existing inline statements, permission boundaries, speculative access, live IAM edits, retained-resource deletion, or other stacks/repos.
Allow OIDC deployment of the conversational result dispatcher
Status: pending
Tags:
enhancement,assistant,infra,testing,P1Depends on: #129 source acceptance/merge — implementation may start from independently reviewed commit
9b5b888, but review/merge must use the finally accepted #129 sourceBlocks: #126 production deployment and its HUMAN sandbox gate
Related: #124, DataTalksClub/aws-infra#18
Outcome and ownership
Update only the shared
DataTalksClub/aws-infrasource of truth atsandbox/dataops/template.github-actions.yamland its focused tests sodataops-github-actions-deploycan deploy and roll back #126's exact result dispatcher. Do not change DataOps runtime code or apply AWS during agent work.Fetch first and work in a fresh isolated worktree, suggested as
/home/alexey/git/.worktrees/aws-infra-130onissue-130-conversational-result-dispatcher-deploy-role. Preserve the dirty../aws-infracheckout, merged #124 PR #18, and finally accepted #129 changes. Never stash/reset/overwrite the sibling checkout.Authoritative #126 graph
Final #126
infra/template.full.yamlalways declares:AWS::Serverless::FunctionConversationalResultDispatcherFunction;ConversationalResultDispatcherFunctionRole;Scheduleevent namedResultDelivery,rate(1 minute), conditional onConversationalResultDeliveryEnabled;There is no dispatcher event-source mapping, queue, EventInvokeConfig, Function URL, API, layer, or separately managed log resource. Default-false disables the schedule but does not remove the function/role.
Acceptance must compare the policy with final agent-approved #126 source, a fresh isolated
sam build, and the deploy change-set inventory. Exact logical-ID/resource changes require exact policy/test changes; add nothing speculative.Policy placement and quotas
The inline role policy is already about 9,341 compact characters, only 899 below IAM's aggregate 10,240 role-inline quota. Do not extend it.
Do not mix this unrelated domain into #129's Sponsor-only compute policy or weaken its negative boundary. Add one generated-name
AWS::IAM::ManagedPolicylogical resource,ConversationalResultDispatcherDeployPolicy, attached only throughRoles: [!Ref GitHubActionsDeployRole]. Do not setManagedPolicyName. The OIDC role must not manage/version/attach its own policies; the credentialed shared-stack operator owns those operations.Deterministic default/pseudo-value resolution plus compact JSON tests must prove:
If upstream breaks a ceiling, redesign/split rather than weaken assertions. Operator must inspect live external attachments before apply. Quota reference: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html
Exact dispatcher policy
Lambda statement
Grant exactly:
on exactly:
Tests compare exact strings without trailing whitespace. Do not grant invoke, Function URL operations,
lambda:*,${FullDocsStackName}-Conversational*, or stack/account-wide functions. Add/RemovePermission cover only the generated schedule permission on this function.Generated role and PassRole statement
Grant exactly:
on only:
No wildcard-role PassRole,
iam:*, user/group, standalone policy administration, or unrelated role.Log-group statement
Grant exactly:
on exactly the base and stream-suffix forms:
Tests compare exact strings without trailing whitespace. No log-event read/write, arbitrary log group, or broader retention access.
Schedule: preserve existing boundary
The one proven trigger is a SAM
Schedule, not an event-source mapping. Existing inlineEventBridgeDataOpsRulesalready grants rule lifecycle on only:Keep it unchanged. Exact Lambda Add/RemovePermission covers the generated permission. Add no EventBridge/Scheduler action, event-bus write, event-source mapping, async-invoke configuration, SQS, DynamoDB, Secrets Manager, Telegram, or runtime permission.
Acceptance criteria
aws-infratemplate/focused tests and is based on finally accepted Extend the DataOps OIDC deploy role for reviewed sponsor communications #129; sibling checkout and DataOps code untouched.GitHubActionsDeployRole; inline and Sponsor policies have no dispatcher resource.ResultDelivery.sandbox/dataopstests, SAM lint, andgit diff --checkpass.DataTalksClub/aws-infraPR merges withRefs DataTalksClub/dataops#130.dataops-github-actionswithCAPABILITY_NAMED_IAM.Required tests
Parse YAML as an object graph and assert exact attachment/statements/resources plus absence from inline/Sponsor policies. Mutation tests must reject:
ManagedPolicyName, another role attachment;Resolve actual documents and enforce all size/count ceilings. Fresh-build #126 in an isolated output directory and assert exactly one dispatcher function, generated role/log family, one
ResultDeliveryschedule plus generated rule/permission, and no dispatcher mapping/queue/async config/URL. Compare the eventual CloudFormation change set.Minimum commands:
Also run project-supported #126
make sam-buildand lint with fresh isolated output, never stale.aws-sam.Pipeline and HUMAN apply
aws-infrawithRefs DataTalksClub/dataops#130; no push/apply.aws-infraPR, confirming merged source includes accepted Extend the DataOps OIDC deploy role for reviewed sponsor communications #129+Allow OIDC deployment of the conversational result dispatcher #130.human.sandbox/dataopsruns:UPDATE_COMPLETEand inspect effective role before retrying DataOps CI.Rollback
Use CloudFormation, never manual IAM edits. Retain the exact prior merged template/commit. A failed update must reach an explained terminal rollback state. For an unacceptable successful update, redeploy the prior accepted shared-infra template with
CAPABILITY_NAMED_IAM; confirm dispatcher policy detaches/deletes and #124/#129 remain effective. Do not remove PR #18 while #124 resources exist, remove #129 coverage while Sponsor resources exist, or edit/delete DataOps app/runtime resources. Keep result delivery disabled during rollback verification.Out of scope
DataOps code/SAM changes, conversational behavior, Telegram/z.ai calls, secrets, task writes, app deploy outside CI, #126's sandbox journey, broad role redesign, moving existing inline statements, permission boundaries, speculative access, live IAM edits, retained-resource deletion, or other stacks/repos.