* Test for checkpoints
* Make sourceTaskAttemptId optional on resumeBatchRun
* Removed all completions/executions logic from the shared queue consumer
* Removed the sourceTaskAttemptId from ResumeBatchRunService
* Revert "Removed all completions/executions logic from the shared queue consumer"
This reverts commit d35398d50463c81a1975bb5d5bcfca66a24b8ede.
* WIP on triggerAndWait…
* Fixed triggerAndWait continuing when a checkpoint completes
* Remove the ResumeAttempt code that fails attempts (was protecting against infinite restores)
* Removed messageBody.data.completedAttemptIds.length === 0 commented out code
* Don’t ack if there’s no batchRun
* Added the marqs?.replaceMessage back in but NOT when there’s no checkpoint. More logging
This is a fix for when some attempts fail
* Improvement to the test task that now randomly fails attempts
* When a checkpoint happens, only continue the attempt if it’s in the correct state
* Changeset for rollback in branch
* Set keepRunAlive to false when the dependent task isn’t finished
* Changeset manual version (to get inline with the hotfix branch)
* Changeset: Fixes for continuing after waits
* Latest lockfile (after manual changeset version)
* support named capture groups
* write crash errors to attempt.error
* make restored pod names unique per checkpoint
* use last eight characters of checkpoint id instead
* add more chaos monkey env vars
* Ignore unfreezable states
* prevent excessive queue config parsing errors
* handle dependency resume edge case
* better entry point logging
* ignore checkpoint cancellation timeouts
* add missing idempotency keys to wait for dep replays
* remove checkpoints between attempts
* fix retry container names on kubernetes
* add changeset
* fix types
* bring back internal duration timers
* PropertyTable component changed to use sub components
* Separate run span component
* Early WIP on tabs that use search query
* Shortcut key tabs for the span panel
* The span timeline is working
* When runs get expired, update the OTEL event with an error
* Improved the expired error message
* Reveal env vars when editing
* Tightened things up a bit
* Added detail tab properties
* Progress dashed line
* Move the env label next to the Run number title
* Top level cancel/replay buttons
* Replay with a different payload and environment
* Fix for non json payloads
* Hide the clear/copy buttons
* UI improvements with large payloads
* Close the panels when you replay/cancel
* Added the new timeline to spans
* Use the u-turn left icon for replay
* Added an index for spanId on TaskRun
* Remove replay/cancel buttons the span view
* Replay shortcut works inside the code editor
* Split the log/span inspector between Overview and Detail as well
* More improvements to the inspector
* Context and output improvements
* Focus on run working
* Added version to run.ctx
* Added some padding to the detail view
* Added context tab with shortcut
* Only load the replay data when the dialog is open
* Replaying uses the tags from the original run
* Links are now text links
* Removed version links for now because we don’t have dropdown filters for them yet
* Tabs are now outside of the scrollview
* The inspector is now 30% of the width by default
* Allow replaying and editing SuperJSON payloads
* Deleted unused CodeGroup file
* Increase the tags limit to 5, do the limiting on the server
* The admin tooltip now always shows basic org, project and user info
* Fix for schedule inspector disabled state layout
* Remove new unused span metadata and context
* Removed unused import
* add xdg command check for linux
* bump version of cli-v3, add changeset
* Don't bump the version
* lint and log
* prettier log message
---------
Co-authored-by: Matt Aitken <matt@mattaitken.com>
Co-authored-by: nicktrn <55853254+nicktrn@users.noreply.github.com>
* TaskRunTag migration. Removed unused TaskTag
* Show tags for a run in the run list
* API endpoint for searching tags
* Let’s not expose an API endpoint for tags at the moment
* Filter by tags working from the URL
* Tag async filter working
* We don’t need a “None” option because it’s multi-select
* When triggering a run you can add tags
* SDK runs.retrieve and runs.list with tag support
* Tidied imports
* Changed the run list query so we show all the tags even if a run only matches one of them
* Fix for dealing with weird characters in tags
* Run tags changeset
* Creating a project has a proper loading state (and blocks multiple)
* Improved the error message for tag length
* Added a tags icon for display on the run screen
* Convenient functions for creating and getting run tags
* tags.set() from inside the run function
* Replay a run passes tags through
* Less ridiculous tags for the catalog example
* Allow passing just a string for the tags
* Order by id because there’s an index on the primary key already
* Trim the tags earlier so we don’t accidentally error if a blank string is passed
* Renamed some thing from setTags to addTags
* Use findFirst for the tags project lookup
* Added an index for "TaskRunTag"("name", "id")
It massively improves the performance of run filtering based on tags
* Use `array_agg` for the run list tags so pagination works and we get a single result for each run
* Tidied imports
* More comprehensive test of tags with all triggering functions
* Support tags with tasks.trigger, tasks.batchTrigger and tasks poll variants
* Added tasks.batchTrigger tags
* Sort the tags in the UI so they’re always in the same order
* Added tooltips in the run table for delay, ttl and tags
* Added costInCents, baseCostInCents and durationMs to runs.retrieve and runs.list
* Added support for displaying a split tag if you use key_value or key:value format
* Fix code comment
* Tweaked the JSDoc to make the prefixing clearer
* Added tasks.triggerAndWait to the tags test task
* Add fixture
* Update fixture name
* Update fixture to work with npm & pnpm
* Update setup/teardown and README
* Add support for monorepo to e2e suite utilities
* Use direct dependencies info in esbuild plugin
* Renaming
* Add support for yarn
* Add fixture for npm
* Remove console.log call
* Edge cases
* Remove unused options
* Fix error unknown yarn in CI
* Fix logger debug call's error field
* Add changeset
* Fix missing span end
* Fix resolve-legacy-peer-deps when PM=pnpm
* Fix setup/teardown
* Fix skip test before installing dependencies
* Re-enable e2e suite in CI
* Add changeset
* Added type (STATIC or DYNAMIC) to TaskSchedule. Defaults to dynamic
* WIP with dev indexing of static schedules
* Added a code comment
* First stab at deleting unused static schedules
* Dashboard changes for the static schedules
* Generate the description. Upsert the instances when editing. Fix for the friendlyId
* Don’t allow deleting of static schedules
* Don’t allow enabling/disabling of static schedules
* Added filtering for schedule types
* Syncing of schedule for deployed tasks
* Static schedules are now created for each environment
* Added a second static schedule for testing
* Add the type to the schedule task run payload and the object you get back from the SDK
* Changed static/dynamic to declarative/imperative
* Timezone example
* Changeset
* Updated scheduled docs to include declarative
* When you test a schedule it set the type to “IMPERATIVE”
* Improved the tooltip
* Fix for queue time continuing to rise when a run is canceled/expired etc
* Update the info panel on a selected declarative schedule
* Check if there are no instances. This should never happen but log an error if it does
* Throw errors and push them through to the CLI dev command
* Fail deployments if creating the background tasks or schedules fails
* Format the deployment error so it gets displayed
* Changed the maxed out schedules error message to remove bit about support
* feature: add no-trigger-core-import
* fix: handle aliases and limit to exported modules
* fix: use longest export map name
* fix: support export type and interface
* fix: simplify message when export map is needed
* feature: fine grained modules for core
* fix: add prerequisite lint plugins
* fix: why do I have to fix these components again???
* fix: tests
* Add eslint config and vscode settings
* Create yellow-roses-arrive.md
* Remove the vscode linting
This is temporary so no one fixes these until we merge the remix branch
---------
Co-authored-by: Eric Allam <eric@trigger.dev>
Co-authored-by: Eric Allam <eallam@icloud.com>
Co-authored-by: Matt Aitken <matt@mattaitken.com>
* v3: cancel subtasks when parent task runs are cancelled
* v3: recover from server rate limiting errors in a more reliable way
- Changing from sliding window to token bucket in the API rate limiter, to help smooth out traffic
- Adding spans to the API Client core & SDK functions
- Added waiting spans when retrying in the API Client
- Retrying in the API Client now respects the x-ratelimit-reset
- Retrying ApiError’s in tasks now respects the x-ratelimit-reset
- Added AbortTaskRunError that when thrown will stop retries
- Added idempotency keys SDK functions and automatically injecting the run ID when inside a task
- Added the ability to configure ApiRequestOptions (retries only for now) globally and on specific calls
- Implement the maxAttempts TaskRunOption (it wasn’t doing anything before)
* Adding some docs about the request options
* Fix type error
* Remove context propagation through graphile jobs
* Remove logger
* only select a subset of task run columns
* limit columns selected in batchTrigger as well
* added idempotency doc
* allow scoped idempotency keys, and fixed an issue with the unique index on BatchTaskRun and TaskRun
* Removed old cancel task run children code
* v3: Trigger delayed runs and reschedule them
* Create a `@trigger.dev/core/v3/schemas` export
* fixed the `@trigger.dev/core/v3/schemas` export
* Small docs tweak
* Add ttl option when triggering tasks, expire runs after ttl
Dev runs expire in 10m by default
* prevent downgrades during update check
* detect bun and use npm instead
* detect missing tsconfig during init and print helpful error
* add changeset
* add links to dev worker started message
* allow users to add custom pkg manager args during init
* update changeset
* fix links in unsupported terminals
* deprecate terminalLink
* update changeset
* WIP
* Handle tasks that have failed but are being auto yielded
* Limit trace view to 25k event records, add a download run logs button
Also added two new indexes to TaskEvent:
```
/// Used on eventRepository.getTraceSummary()
@@index([traceId, startTime])
// Used for getting all logs for a run
@@index([runId])
```
* perf improvements on eventRepository.getSpan()
* v2: Add a 5 minute timeout for run execution requests in dev
* v3: Include presigned urls for downloading large payloads and outputs when using runs.retrieve
* v3: better handle large task payloads and outputs
* Change to 512KB
* v2: paginate trigger schedules endpoint
* v3: add 3MB limit on batch and single payloads
* Update task payload and output limits