Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New runs fundamentals page #1401

Merged
merged 9 commits into from
Oct 11, 2024
Merged

New runs fundamentals page #1401

merged 9 commits into from
Oct 11, 2024

Conversation

samejr
Copy link
Member

@samejr samejr commented Oct 11, 2024

Closes #

✅ Checklist

  • I have followed every step in the contributing guide
  • The PR title follows the convention.
  • I ran and tested the code works

Testing

[Describe the steps you took to test this change]


Changelog

[Short description of what has changed]


Screenshots

[Screenshots]

💯

Summary by CodeRabbit

  • New Features
    • Added a new documentation page titled "Runs & Attempts" to enhance understanding of task execution lifecycle.
  • Improvements
    • Updated the "redirects" section for better navigation through documentation.
    • Enhanced formatting and linking in the "Triggering" document for improved clarity and usability.
  • Documentation
    • Comprehensive overview of task Runs and Attempts, including advanced features and API methods.
    • Added detailed information about task execution states and management.
    • Improved navigation structure to include the new "runs-and-attempts" page.

Copy link

changeset-bot bot commented Oct 11, 2024

⚠️ No Changeset found

Latest commit: e538ebb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

coderabbitai bot commented Oct 11, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

The changes introduce a new page titled "Runs & Attempts" to the documentation, enhancing the "Fundamentals" section under "Tasks." This page details the lifecycle of task execution, including concepts of Runs and Attempts, their states, and advanced features. Additionally, the docs/mint.json file is updated to reflect this new page and improve navigation with new redirects. The docs/triggering.mdx file has been modified for better formatting and linking of functions related to task triggering, improving clarity and usability.

Changes

File Change Summary
docs/mint.json - Added new page "runs-and-attempts" in "Fundamentals" section.
- Updated "redirects" for navigation.
- Reorganized "navigation" structure.
docs/runs-and-attempts.mdx - Added new document "Runs & Attempts" detailing task execution lifecycle, states, and advanced features.
docs/triggering.mdx - Enhanced formatting and linking for task triggering functions.
- Updated function signatures for clarity.

Possibly related PRs

Suggested reviewers

  • ericallam

Poem

🐇 In the garden of docs, new paths we weave,
With "Runs & Attempts," we help users believe.
Each task's journey, a tale to unfold,
In clarity and structure, our stories are told.
So hop along, dear friends, explore with delight,
For in every new page, there's wisdom in sight! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (2)
docs/mint.json (2)

124-124: LGTM! Consider adding a description for the new page.

The addition of the "runs-and-attempts" page to the navigation structure is well-placed within the "Fundamentals" group under "Tasks". This aligns with the PR objective to introduce a new page focused on the fundamentals of runs.

To improve clarity for users navigating the documentation, consider adding a brief description for the new page. For example:

 "runs-and-attempts",
+"runs-and-attempts": "Understanding task execution lifecycle",

This addition would provide users with a quick overview of the page's content without needing to navigate to it.


Action Required: Missing 'Conclusion' Section in 'runs-and-attempts' Page

The 'runs-and-attempts' page exists and includes several key sections; however, it is missing a 'Conclusion' section. Please add a conclusion to ensure the documentation is comprehensive and provides proper closure to the topic.

🔗 Analysis chain

Line range hint 1-391: Summary: Navigation structure updated successfully

The changes to docs/mint.json successfully introduce the new "Runs & Attempts" page to the documentation structure. This addition aligns with the PR objectives and enhances the "Fundamentals" section under "Tasks".

However, to fully meet the PR objectives:

  1. Ensure the actual content for the "runs-and-attempts" page is created and comprehensive.
  2. Update the PR description with testing information, changelog, and screenshots if applicable.
  3. Mark the checklist items in the PR description as completed once you've addressed them.

To ensure all necessary files are present, run the following script:

This script will help verify that the content for the new page has been created and highlight any remaining TODO items.


Further Verification Needed:

To ensure the 'runs-and-attempts' page is comprehensive and aligns with documentation standards, please run the following script:

This script will help verify that essential sections are included in the 'runs-and-attempts' page, ensuring it meets the documentation requirements.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify the existence of the new "runs-and-attempts" page

# Check if the file exists (adjust the path if necessary)
if [ -f "docs/runs-and-attempts.mdx" ] || [ -f "docs/runs-and-attempts.md" ]; then
    echo "The 'runs-and-attempts' page file exists."
else
    echo "Warning: The 'runs-and-attempts' page file is missing. Please create the content for this new page."
fi

# Check for any TODO comments in the new file
if [ -f "docs/runs-and-attempts.mdx" ]; then
    grep -n "TODO" docs/runs-and-attempts.mdx
elif [ -f "docs/runs-and-attempts.md" ]; then
    grep -n "TODO" docs/runs-and-attempts.md
fi

Length of output: 220


Script:

#!/bin/bash
# Check the content of the 'runs-and-attempts' page for key sections

# Display the first few lines to verify the introduction exists
head -n 10 docs/runs-and-attempts.mdx

# Search for key headers to ensure all necessary sections are present
rg "^## " docs/runs-and-attempts.mdx

# Verify the presence of a 'Conclusion' section
if grep -q "^## Conclusion" docs/runs-and-attempts.mdx; then
    echo "Conclusion section is present."
else
    echo "Warning: Conclusion section is missing."
fi

Length of output: 892

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between ba96397 and c0c0eca.

⛔ Files ignored due to path filters (6)
  • docs/images/run-lifecycle.png is excluded by !**/*.png
  • docs/images/run-with-batchTriggerAndWait().png is excluded by !**/*.png
  • docs/images/run-with-delay.png is excluded by !**/*.png
  • docs/images/run-with-retries.png is excluded by !**/*.png
  • docs/images/run-with-triggerAndWait().png is excluded by !**/*.png
  • docs/images/run-with-ttl.png is excluded by !**/*.png
📒 Files selected for processing (3)
  • docs/mint.json (1 hunks)
  • docs/runs-and-attempts.mdx (1 hunks)
  • docs/triggering.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/runs-and-attempts.mdx

[uncategorized] ~10-~10: The abbreviation “e.g.” (= for example) requires two periods.
Context: ...Run is created when you trigger a task (e.g calling `yourTask.trigger({ foo: "bar" ...

(E_G)

🔇 Additional comments (11)
docs/runs-and-attempts.mdx (6)

1-7: LGTM: Well-structured frontmatter and introduction

The frontmatter and introduction provide a clear and concise overview of the document's content. The title and description are appropriate, and the introduction sets the stage for the detailed explanations that follow.


182-185: LGTM: Useful information on triggering runs for undeployed tasks

The section on triggering runs for undeployed tasks provides valuable information, especially highlighting its usefulness in CI/CD pipelines. This feature adds flexibility to the task execution process.


57-76: LGTM: Clear explanation of Attempts

The Attempts section provides a concise and informative explanation of what Attempts are and how they relate to Runs. The explanation of Run completion is also clear and helpful.

Please ensure that the referenced image file exists:

#!/bin/bash
# Verify the existence of the Run with retries image
if [ -f "public/images/run-with-retries.png" ]; then
    echo "Run with retries image exists."
else
    echo "Run with retries image is missing."
fi

78-143: LGTM: Comprehensive coverage of Advanced Run Features

The Advanced Run Features section provides detailed explanations and examples for various advanced concepts. The code examples are clear and illustrative.

Please ensure that all referenced image files exist:

#!/bin/bash
# Verify the existence of images for Advanced Run Features
images=("run-with-ttl.png" "run-with-delay.png")
for img in "${images[@]}"; do
    if [ -f "public/images/$img" ]; then
        echo "$img exists."
    else
        echo "$img is missing."
    fi
done

Additionally, please verify that the runs.cancel(), runs.replay(), and other API methods mentioned in the code examples are correctly implemented and documented in the codebase.

#!/bin/bash
# Search for the implementation of runs API methods
rg --type typescript 'runs\.(cancel|replay|list|retrieve|reschedule)' src/

145-157: LGTM: Clear explanation of waiting for Runs

The Waiting for Runs section provides a concise explanation of triggerAndWait() and batchTriggerAndWait() functions. The links to more detailed documentation are helpful.

Please ensure that the referenced image files exist and the links are correct:

#!/bin/bash
# Verify the existence of images for Waiting for Runs
images=("run-with-triggerAndWait().png" "run-with-batchTriggerAndWait().png")
for img in "${images[@]}"; do
    if [ -f "public/images/$img" ]; then
        echo "$img exists."
    else
        echo "$img is missing."
    fi
done

# Verify the existence of linked pages
pages=("triggering#yourtask-triggerandwait" "triggering#yourtask-batchtriggerandwait")
for page in "${pages[@]}"; do
    if rg --type mdx "^title:.*$page" docs/; then
        echo "Page for $page exists."
    else
        echo "Page for $page is missing or not properly titled."
    fi
done

159-180: LGTM: Comprehensive overview of Runs API

The Runs API section provides a clear overview of the available API methods for managing Runs. The code example effectively demonstrates the usage of these methods.

Please ensure that all mentioned API methods are correctly implemented in the codebase:

✅ Verification successful

Verified: Runs API Documentation is Accurate

The Runs API methods (list, retrieve, replay, reschedule, cancel) are correctly imported from the @trigger.dev/sdk/v3 package. The documentation accurately reflects the usage of these methods without missing or replaced code.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for the implementation of Runs API methods
rg --type typescript 'runs\.(list|retrieve|replay|reschedule|cancel)' src/

Length of output: 111


Script:

#!/bin/bash
# Search for the implementation of Runs API methods in .ts and .tsx files
rg 'runs\.(list|retrieve|replay|reschedule|cancel)' --glob '*.ts' --glob '*.tsx' src/

Length of output: 132


Script:

#!/bin/bash
# Search for the implementation of Runs API methods across the entire repository
rg 'runs\.(list|retrieve|replay|reschedule|cancel)' --glob '*.{ts,tsx,js,jsx}' .

Length of output: 3357


Script:

#!/bin/bash
# Search for import or require statements for `runs` across the entire repository
rg "import\s+.*\bruns\b.*from\s+['\"].*['\"]" --glob '*.{ts,tsx,js,jsx}' .
rg "const\s+runs\s*=\s*require\(['\"].*['\"]\)" --glob '*.{ts,tsx,js,jsx}' .

Length of output: 1143

docs/triggering.mdx (5)

9-12: Improved table formatting and added helpful links.

The changes enhance the readability of the documentation by using proper markdown syntax for the table. The addition of links to specific sections provides better context and navigation for users.


17-21: Enhanced table formatting with improved function descriptions.

The table for triggering tasks from inside a run has been updated with proper markdown syntax, improving readability. The added links provide easy navigation to relevant sections. Notably, the function descriptions have been refined to offer more precise information about their behavior, particularly clarifying which functions wait for results and which don't.


Line range hint 318-334: Valuable clarifications and best practices added to yourTask.trigger() documentation.

The updates to the yourTask.trigger() section provide crucial information:

  1. It now clearly states that the function does NOT wait for the result.
  2. It suggests using the 'AndWait' version when needing to pause execution.
  3. It recommends using batchTrigger() for loop scenarios, which can significantly improve performance.

These additions will help developers use the function more effectively and avoid common pitfalls.


Line range hint 371-420: Critical usage guidance added for yourTask.triggerAndWait().

The new accordion section provides essential information for correct usage of triggerAndWait():

  1. It warns against using this method in parallel (e.g., with Promise.all()).
  2. It offers correct alternatives using batchTriggerAndWait() or a for loop.
  3. It explains how to control concurrency using queue.concurrencyLimit.

These additions are crucial for preventing misuse that could lead to performance issues or unexpected behavior. The provided examples clearly illustrate the correct approaches, which will be very helpful for developers.


Line range hint 478-538: Comprehensive error handling guidance added for yourTask.batchTriggerAndWait().

The new accordion section provides crucial information on handling run failures:

  1. It explains how to inspect individual run results.
  2. It outlines different strategies for handling failures (fail entire batch vs. continue despite failures).
  3. It includes an example of custom error handling logic.

This addition is extremely valuable as it empowers developers to implement robust error handling strategies when using batchTriggerAndWait(). The detailed explanations and practical example will significantly improve the reliability and flexibility of code using this method.

Comment on lines 8 to 15
## What are Runs?

A Run is created when you trigger a task (e.g calling `yourTask.trigger({ foo: "bar" })`). It represents a single instance of a task being executed and contains the following key information:

- A unique run ID
- The current status of the run
- The payload (input data) for the task
- Lots of other metadata
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix grammatical issue in code example

The explanation of Runs is clear and informative. However, there's a minor grammatical issue in the code example.

Please update the following line:

-A Run is created when you trigger a task (e.g calling `yourTask.trigger({ foo: "bar" })`). It represents a single instance of a task being executed and contains the following key information:
+A Run is created when you trigger a task (e.g., calling `yourTask.trigger({ foo: "bar" })`). It represents a single instance of a task being executed and contains the following key information:

This change adds the missing comma after "e.g." and improves readability.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## What are Runs?
A Run is created when you trigger a task (e.g calling `yourTask.trigger({ foo: "bar" })`). It represents a single instance of a task being executed and contains the following key information:
- A unique run ID
- The current status of the run
- The payload (input data) for the task
- Lots of other metadata
## What are Runs?
A Run is created when you trigger a task (e.g., calling `yourTask.trigger({ foo: "bar" })`). It represents a single instance of a task being executed and contains the following key information:
- A unique run ID
- The current status of the run
- The payload (input data) for the task
- Lots of other metadata
🧰 Tools
🪛 LanguageTool

[uncategorized] ~10-~10: The abbreviation “e.g.” (= for example) requires two periods.
Context: ...Run is created when you trigger a task (e.g calling `yourTask.trigger({ foo: "bar" ...

(E_G)

Comment on lines 17 to 55
## The Run Lifecycle

A Run can go through **various** states during its lifecycle. The following diagrams illustrate the possible state transitions:

![Run Lifecycle](/images/run-lifecycle.png)

### Initial States

<Icon icon="rectangle-history" iconType="solid" color="#FBBF24" size={17} /> **Waiting for deploy**: If a task is triggered before it has been deployed, the Run enters this state and waits for the task to be deployed.

<Icon icon="clock" iconType="solid" color="#878C99" size={17} /> **Delayed**: When a Run is triggered with a delay, it enters this state until the specified delay period has passed.

<Icon icon="rectangle-history" iconType="solid" color="#878C99" size={17} /> **Queued**: The Run is ready to be executed and is waiting in the queue.

### Execution States

<Icon icon="spinner-third" iconType="duotone" color="#3B82F6" size={17} /> **Executing**: The task is currently running.

<Icon icon="arrows-rotate" iconType="solid" color="#3B82F6" size={17} /> **Reattempting**: The task has failed and is being retried.

<Icon icon="snowflake" iconType="solid" color="#68BAF2" size={17} /> **Frozen**: Task has been frozen and is waiting to be resumed.

### Final States

<Icon icon="circle-check" iconType="solid" color="#28BF5C" size={17} /> **Completed**: The task has successfully finished execution.

<Icon icon="ban" iconType="solid" color="#878C99" size={17} /> **Canceled**: The Run was manually canceled by the user.

<Icon icon="circle-xmark" iconType="solid" color="#E11D48" size={17} /> **Failed**: The task has failed to complete successfully.

<Icon icon="alarm-exclamation" iconType="solid" color="#E11D48" size={17} /> **Timed out**: Task has failed because it exceeded its `maxDuration`.

<Icon icon="fire" iconType="solid" color="#E11D48" size={17} /> **Crashed**: The worker process crashed during execution (likely due to an Out of Memory error).

<Icon icon="bolt-slash" iconType="solid" color="#E11D48" size={17} /> **Interrupted**: In development mode, when the CLI is disconnected.

<Icon icon="bug" iconType="solid" color="#E11D48" size={17} /> **System failure**: An unrecoverable system error has occurred.

<Icon icon="trash-can" iconType="solid" color="#878C99" size={17} /> **Expired**: The Run's Time-to-Live (TTL) has passed before it could start executing.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Issues Found: Missing Images and Documentation Pages

  • run-with-triggerAndWait().png is missing.
  • run-with-batchTriggerAndWait().png is missing.
  • Page for triggering#yourtask-triggerandwait is missing or not properly titled.
  • Page for triggering#yourtask-batchtriggerandwait is missing or not properly titled.

Please address these issues to ensure the Run Lifecycle documentation is complete and accurate.

🔗 Analysis chain

LGTM: Comprehensive Run Lifecycle explanation

The Run Lifecycle section provides a detailed and well-structured explanation of the various states a Run can go through. The use of icons for different states enhances readability.

Please ensure that the referenced image file exists and correctly represents the Run Lifecycle:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify the existence of the Run Lifecycle image
if [ -f "public/images/run-lifecycle.png" ]; then
    echo "Run Lifecycle image exists."
else
    echo "Run Lifecycle image is missing."
fi

Length of output: 1140

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between c0c0eca and f18df88.

⛔ Files ignored due to path filters (6)
  • docs/images/run-lifecycle.png is excluded by !**/*.png
  • docs/images/run-with-batchTriggerAndWait().png is excluded by !**/*.png
  • docs/images/run-with-delay.png is excluded by !**/*.png
  • docs/images/run-with-retries.png is excluded by !**/*.png
  • docs/images/run-with-triggerAndWait().png is excluded by !**/*.png
  • docs/images/run-with-ttl.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • docs/runs-and-attempts.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/runs-and-attempts.mdx

[uncategorized] ~10-~10: The abbreviation “e.g.” (= for example) requires two periods.
Context: ...run is created when you trigger a task (e.g calling `yourTask.trigger({ foo: "bar" ...

(E_G)


[style] ~23-~23: The phrase ‘lots of’ might be wordy and overused. Consider using an alternative.
Context: ....png) Runs can also find themselves in lots of other states depending on what's happen...

(A_LOT_OF)

🔇 Additional comments (4)
docs/runs-and-attempts.mdx (4)

1-7: LGTM: Well-structured metadata and introduction

The file metadata and introduction provide a clear overview of the document's purpose and content. The title and description in the frontmatter are concise and informative.


161-187: LGTM: Comprehensive explanation of Runs API and undeployed tasks

The Runs API section provides a clear overview of the available methods for managing runs. The explanation of triggering runs for undeployed tasks is informative and highlights a useful feature for CI/CD pipelines. Both sections are well-structured and provide valuable information to the users.


151-153: Verify triggerAndWait() documentation and image

Please ensure that:

  1. The link to the triggerAndWait() documentation is correct and the page exists.
  2. The referenced image file exists and is correctly placed in the repository.
[Learn more about triggerAndWait()](/triggering#yourtask-triggerandwait)
![Run with triggerAndWait](/images/run-with-triggerAndWait().png)

If any of these are missing, please add them to maintain the documentation's completeness.

#!/bin/bash
# Verify the existence of the triggerAndWait documentation and image
if grep -q "yourtask-triggerandwait" docs/triggering.mdx; then
    echo "triggerAndWait() documentation exists."
else
    echo "triggerAndWait() documentation is missing or not properly titled."
fi

if [ -f "public/images/run-with-triggerAndWait().png" ]; then
    echo "Run with triggerAndWait image exists."
else
    echo "Run with triggerAndWait image is missing."
fi

157-159: Verify batchTriggerAndWait() documentation and image

Please ensure that:

  1. The link to the batchTriggerAndWait() documentation is correct and the page exists.
  2. The referenced image file exists and is correctly placed in the repository.
[Learn more about batchTriggerAndWait()](/triggering#yourtask-batchtriggerandwait)
![Run with batchTriggerAndWait](/images/run-with-batchTriggerAndWait().png)

If any of these are missing, please add them to maintain the documentation's completeness.

#!/bin/bash
# Verify the existence of the batchTriggerAndWait documentation and image
if grep -q "yourtask-batchtriggerandwait" docs/triggering.mdx; then
    echo "batchTriggerAndWait() documentation exists."
else
    echo "batchTriggerAndWait() documentation is missing or not properly titled."
fi

if [ -f "public/images/run-with-batchTriggerAndWait().png" ]; then
    echo "Run with batchTriggerAndWait image exists."
else
    echo "Run with batchTriggerAndWait image is missing."
fi


## What are runs?

A run is created when you trigger a task (e.g calling `yourTask.trigger({ foo: "bar" })`). It represents a single instance of a task being executed and contains the following key information:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix grammatical issue in code example

There's a minor grammatical issue in the code example. Please update the following line:

-A run is created when you trigger a task (e.g calling `yourTask.trigger({ foo: "bar" })`). It represents a single instance of a task being executed and contains the following key information:
+A run is created when you trigger a task (e.g., calling `yourTask.trigger({ foo: "bar" })`). It represents a single instance of a task being executed and contains the following key information:

This change adds the missing comma after "e.g." and improves readability.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
A run is created when you trigger a task (e.g calling `yourTask.trigger({ foo: "bar" })`). It represents a single instance of a task being executed and contains the following key information:
A run is created when you trigger a task (e.g., calling `yourTask.trigger({ foo: "bar" })`). It represents a single instance of a task being executed and contains the following key information:
🧰 Tools
🪛 LanguageTool

[uncategorized] ~10-~10: The abbreviation “e.g.” (= for example) requires two periods.
Context: ...run is created when you trigger a task (e.g calling `yourTask.trigger({ foo: "bar" ...

(E_G)


When a task fails, it will be retried according to its retry settings, creating new attempts until it either succeeds or reaches the retry limit.

![Run with retries](/images/run-with-retries.png)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Run with retries image is missing.

Please add the run-with-retries.png image to the /public/images/ directory to ensure the documentation is complete and the image reference is valid.

🔗 Analysis chain

Verify the existence of the Run with retries image

Please ensure that the referenced image file exists and is correctly placed in the repository:

![Run with retries](/images/run-with-retries.png)

If the image is missing, please add it to maintain the documentation's completeness.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify the existence of the Run with retries image
if [ -f "public/images/run-with-retries.png" ]; then
    echo "Run with retries image exists."
else
    echo "Run with retries image is missing."
fi

Length of output: 126


If the run hasn't started within the specified TTL, it will automatically expire. This is useful for time-sensitive tasks. Note that dev runs automatically have a 10-minute TTL.

![Run with TTL](/images/run-with-ttl.png)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Run with TTL image is missing

The referenced image ![Run with TTL](/images/run-with-ttl.png) does not exist in the repository. Please add the image to maintain the documentation's completeness.

🔗 Analysis chain

Verify the existence of the Run with TTL image

Please ensure that the referenced image file exists and is correctly placed in the repository:

![Run with TTL](/images/run-with-ttl.png)

If the image is missing, please add it to maintain the documentation's completeness.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify the existence of the Run with TTL image
if [ -f "public/images/run-with-ttl.png" ]; then
    echo "Run with TTL image exists."
else
    echo "Run with TTL image is missing."
fi

Length of output: 322


Script:

#!/bin/bash
# Verify the existence of the Run with TTL image
if [ -f "public/images/run-with-ttl.png" ]; then
    echo "Run with TTL image exists."
else
    echo "Run with TTL image is missing."
fi

Length of output: 114


A run can go through **various** states during its lifecycle. The following diagram illustrates a typical state transition where a single run is triggered and completes successfully:

![Run Lifecycle](/images/run-lifecycle.png)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Run Lifecycle image is missing

Please add the run-lifecycle.png image to the repository to ensure the documentation is complete.

🔗 Analysis chain

Verify the existence of the Run Lifecycle image

Please ensure that the referenced image file exists and is correctly placed in the repository:

![Run Lifecycle](/images/run-lifecycle.png)

If the image is missing, please add it to maintain the documentation's completeness.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify the existence of the Run Lifecycle image
if [ -f "public/images/run-lifecycle.png" ]; then
    echo "Run Lifecycle image exists."
else
    echo "Run Lifecycle image is missing."
fi

Length of output: 126


Script:

#!/bin/bash
# Verify the existence of the Run Lifecycle image
if [ -f "images/run-lifecycle.png" ]; then
    echo "Run Lifecycle image exists."
else
    echo "Run Lifecycle image is missing."
fi

Length of output: 110


This is useful for tasks that need to be executed at a specific time in the future.

![Run with delay](/images/run-with-delay.png)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Run with delay image is missing in the repository

  • The image file public/images/run-with-delay.png is missing.

Please add the run-with-delay.png image to the public/images/ directory to maintain the documentation's completeness.

🔗 Analysis chain

Verify the existence of the Run with delay image

Please ensure that the referenced image file exists and is correctly placed in the repository:

![Run with delay](/images/run-with-delay.png)

If the image is missing, please add it to maintain the documentation's completeness.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify the existence of the Run with delay image
if [ -f "public/images/run-with-delay.png" ]; then
    echo "Run with delay image exists."
else
    echo "Run with delay image is missing."
fi

Length of output: 322


Script:

#!/bin/bash
# Verify the existence of the Run with delay image
if [ -f "public/images/run-with-delay.png" ]; then
    echo "Run with delay image exists."
else
    echo "Run with delay image is missing."
fi

Length of output: 120

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