Skip to content

feat: auto-ARN secret resolution and job lifecycle notify functions#146

Merged
Kydoimos97 merged 1 commit into
releasefrom
feat/notify-auto-arn-and-job-lifecycle
Jun 9, 2026
Merged

feat: auto-ARN secret resolution and job lifecycle notify functions#146
Kydoimos97 merged 1 commit into
releasefrom
feat/notify-auto-arn-and-job-lifecycle

Conversation

@Kydoimos97

Copy link
Copy Markdown
Contributor

Summary

  • resolve_secret now auto-detects {env_var}_ARN as a fallback when the env var is empty and no explicit ARN is passed. This fixes silent notification failures across all services that use the ARN-only secret pattern (WRENCH_SERVICE_SECRET_ARN set, WRENCH_SERVICE_SECRET unset).
  • New _notify.py module adds job_register, job_update, job_close — thin wrappers over the AiAxis job lifecycle endpoints. Same fire-and-forget / never-raise contract as slack_post.
  • All three functions exported from WrenchCL.Wrench.

Root cause this fixes

Services deploy with only WRENCH_SERVICE_SECRET_ARN set (no plaintext — correct, because the secret rotates every 4 hours). WrenchCL.slack_post called resolve_secret with only the env var name, got an empty string, and silently returned False without ever checking the _ARN env var. Result: 0 Slack notifications across all services since the v6 rollout June 8.

No breaking changes

Priority order for existing callers is unchanged: direct value > env var > auto-ARN > explicit ARN. Callers that pass an explicit secret_arn are unaffected.

Sales impact

Job progress notifications and Slack alerts now work correctly for all services regardless of whether the service secret is injected as a plaintext env var or an ARN reference.

- resolve_secret now auto-detects {env_var}_ARN as a fallback when the env var is empty and no explicit ARN is passed (e.g. WRENCH_SERVICE_SECRET_ARN). This fixes silent notification failures across all services that use the ARN-only secret pattern.
- New _notify.py module adds job_register, job_update, job_close — three fire-and-forget wrappers over the AiAxis job lifecycle endpoints with the same never-raise contract as slack_post.
- All three functions exported from WrenchCL.Wrench for use in FeatureForge, elt-api-requester, model-input-builder and other Wrench services.
- Comprehensive test coverage: 8 tests for auto-ARN fallback behaviour, 39 tests for the three notify functions, all passing.

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Kydoimos97 Kydoimos97 merged commit 5a5f888 into release Jun 9, 2026
1 of 2 checks passed
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