Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the “Scheduled Runs” documentation and examples across SDKs, while adding new Go SDK scheduling capabilities and surfacing the language selector in the docs navbar.
Changes:
- Refresh scheduled run examples (TS/Python/Go) to use “tomorrow at noon UTC” semantics and updated scheduled-run APIs.
- Add Go SDK support for scheduling runs via
Workflow.Schedule/StandaloneTask.Scheduleand extend the Go schedules client with update + bulk ops. - Move the docs language selector into the navbar and adjust styling to reorder navbar items.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
sdks/typescript/src/v1/examples/simple/schedule.ts |
Updates v1 TS scheduled-runs example used for docs snippets. |
examples/typescript/simple/schedule.ts |
Updates standalone TS example script mirroring docs. |
sdks/python/examples/simple/schedule.py |
Updates Python SDK example for scheduling at tomorrow noon UTC. |
examples/python/simple/schedule.py |
Updates standalone Python example mirroring docs. |
sdks/go/workflow.go |
Adds Workflow.Schedule to create a scheduled run. |
sdks/go/client.go |
Adds StandaloneTask.Schedule convenience wrapper. |
sdks/go/features/schedules.go |
Adds schedules Update/BulkDelete/BulkUpdate REST helpers. |
pkg/client/client.go |
Wires REST client into admin client construction. |
pkg/client/admin.go |
Adds ScheduleWorkflowV1 on legacy client to return a workflow version. |
sdks/go/examples/scheduled/main.go |
Expands Go scheduled-runs example with reschedule and bulk operations. |
examples/go/scheduled/main.go |
Mirrors the Go scheduled-runs example under top-level examples. |
frontend/docs/pages/v1/scheduled-runs.mdx |
Updates scheduled-runs docs content and adds Go tabs/snippets. |
frontend/docs/theme.config.tsx |
Moves LanguageSelectorButton into navbar extra content. |
frontend/docs/styles/global.css |
Adds CSS to reorder navbar items to place language selector earlier. |
.golangci.yml |
Excludes sdks/go/examples/ (and formatting for Go examples) from golangci processing. |
Comments suppressed due to low confidence (2)
examples/typescript/simple/schedule.ts:37
- This example deletes
scheduledRunIdand then later uses the same ID for bulk delete / bulk reschedule calls. Running the script sequentially will likely fail after the delete. Consider reordering so delete happens last, or create separate scheduled runs for each standalone example block.
// > Delete a Scheduled Run
await hatchet.scheduled.delete(scheduledRunId);
// > List Scheduled Runs
const scheduledRuns = await hatchet.scheduled.list({});
// > Bulk Delete Scheduled Runs
await hatchet.scheduled.bulkDelete({
scheduledRuns: [scheduledRunId],
});
// > Bulk Reschedule Scheduled Runs
await hatchet.scheduled.bulkUpdate([
{ scheduledRun: scheduledRunId, triggerAt: new Date(Date.now() + 2 * 60 * 60 * 1000) },
]);
sdks/typescript/src/v1/examples/simple/schedule.ts:36
- As written, this script deletes
scheduledRunIdand then later uses the same ID in bulk delete / bulk update calls. If someone runs the example end-to-end, those later calls will likely fail because the scheduled run has already been deleted. Consider either reordering (delete last) or creating a new scheduled run ID for each independent example block.
// > Delete a Scheduled Run
await hatchet.scheduled.delete(scheduledRunId);
// !!
// > List Scheduled Runs
const scheduledRuns = await hatchet.scheduled.list({});
// !!
// > Bulk Delete Scheduled Runs
await hatchet.scheduled.bulkDelete({
scheduledRuns: [scheduledRunId],
});
You can also share your feedback on Copilot code review. Take the survey.
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.
Description
Changes to the following in the
Triggerssection:Type of change