Move keeper scheduling off Vercel Cron - #516
Conversation
|
@Chigybillionz is attempting to deploy a commit to the Collins' projects Team on Vercel. A member of the Team first needs to authorize it. |
collinsezedike
left a comment
There was a problem hiding this comment.
CI is failing on 4 checks and needs to be green before this can be evaluated further:
- PR Title and Commit Messages both fail because the title and commit don't follow the
type: subjectformat. ReadCONTRIBUTING.md's Commit Convention section and retitle to something likeci: move keeper scheduling off Vercel Cron. - Lint & Typecheck fails because
.github/workflows/keepers.ymlwas never run throughpnpm format.CONTRIBUTING.mdrequires this before committing. - Test fails on an assertion in
accrual-keeper.test.tsinsidestellar-sdk-helpers, a package this PR doesn't touch. Main is green on its last several runs, so the branch is stale. Rebase ontomain.
The PR description also doesn't match the PR body template in CONTRIBUTING.md (no ## Summary / ## Test plan headers), and the whole body is wrapped in a stray ```markdown fence, so GitHub renders it as one unformatted code block instead of the intended sections.
The description says vercel.json's crons array was removed and the operations docs were updated to document the new trigger, but the diff only adds keepers.yml. vercel.json still has the */15 * * * * cron entry that Issue #513 says breaks Vercel's Hobby-plan deployment checks, and apps/docs/operations/accrual-keeper.md / migration-keeper.md still describe Vercel Cron as the trigger. As it stands, the root cause from #513 isn't fixed.
A few problems in keepers.yml itself, noted inline.
|
|
||
| jobs: | ||
| trigger-keepers: | ||
| runs-on: ubuntu-latest |
There was a problem hiding this comment.
No timeout-minutes on this job. A hung endpoint can block the runner up to GitHub's 6-hour default, which also delays the next scheduled tick if runs overlap.
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Trigger Accrual Keeper | ||
| if: github.event.schedule == '*/15 * * * *' || github.event_name == 'workflow_dispatch' |
There was a problem hiding this comment.
This condition and the one on line 22 both independently allow github.event_name == 'workflow_dispatch', so a manual run always fires accrual and rebalance together. Rebalance moves real funded-account positions, scope each step to its own manual case or split into separate jobs.
| - name: Trigger Accrual Keeper | ||
| if: github.event.schedule == '*/15 * * * *' || github.event_name == 'workflow_dispatch' | ||
| run: | | ||
| curl -f -X POST "${{ secrets.API_BASE_URL }}/api/v1/keepers/accrue" \ |
There was a problem hiding this comment.
secrets.API_BASE_URL isn't documented anywhere (not in environment-variables.md, not in .env.example). Add it there, and add --max-time/--connect-timeout plus --retry, since a single transient 5xx here fails the whole run with no recovery until the next tick.
|
@Chigybillionz checking in, since this fixes the active production outage (#513), it'd be great to get it merged soon. Several CI checks are currently failing (Lint & Typecheck, Test, Commit Messages, PR Title). Let me know if you need any help resolving them. |
Please kindly review this task. If there are any corrections, improvements, adjustments, or merge conflicts that you notice regarding my implementation, I'd really appreciate your feedback. I'd also love to hear your overall review of my work on this branch. Thank you!