Skip to content

More docs updates#34

Merged
josh-padnick merged 20 commits intomainfrom
update-lambda-runbook
Dec 13, 2025
Merged

More docs updates#34
josh-padnick merged 20 commits intomainfrom
update-lambda-runbook

Conversation

@josh-padnick
Copy link
Copy Markdown
Collaborator

No description provided.

@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 13, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
runbooks Ready Ready Preview, Comment Dec 13, 2025 8:56am

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @josh-padnick, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the quality and user experience of the Runbooks documentation. By integrating "cspell", it establishes a robust spell-checking mechanism to maintain high editorial standards. The UI tour has been upgraded from static images to an engaging video, providing a clearer demonstration of the product. Furthermore, improvements to the Lambda test script offer more actionable feedback for developers, while various textual refinements across the documentation ensure greater clarity and consistency.

Highlights

  • Introduced Spell Checking: Integrated "cspell" into the documentation build process, adding it as a dev dependency and creating a configuration file ("cspell.json") to ensure consistent spelling across the docs.
  • Enhanced UI Tour: Replaced static screenshots in the UI tour documentation with an embedded Loom video, offering a more interactive and comprehensive walkthrough of the Runbooks user interface.
  • Improved Lambda Test Script: Updated the "test-lambda.sh" script to provide more detailed error reporting, including error type, message, and potential causes, when a Lambda function invocation fails.
  • Documentation Clarity and Consistency: Made numerous minor text adjustments across several documentation files ("installation.mdx", "runbooks_vs_other.md", "use_cases.mdx", "write_your_first_runbook.mdx", "execution-model.md") to improve readability, correct typos, and standardize heading capitalization.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces several documentation updates, including the addition of a spell checker (cspell), fixing numerous typos, and improving heading consistency. A notable change is the replacement of the UI tour page with an embedded video, which modernizes the content. Furthermore, a shell script in the test data has been enhanced to provide more detailed error feedback for Lambda function invocations. Overall, these are positive changes that improve the quality and usability of the documentation. I've included a couple of suggestions to further enhance the robustness of a script and to improve consistency in one of the documentation files.

Comment on lines +61 to 93
# Check if the response contains a Lambda runtime error
RESPONSE=$(cat "$RESPONSE_FILE")
if echo "$RESPONSE" | grep -q '"errorType"'; then
echo "❌ Lambda function returned an error!"
echo ""
echo "📄 Response:"
echo "$RESPONSE"
echo ""

# Extract error details if possible
ERROR_TYPE=$(echo "$RESPONSE" | grep -o '"errorType":"[^"]*"' | cut -d'"' -f4)
ERROR_MESSAGE=$(echo "$RESPONSE" | grep -o '"errorMessage":"[^"]*"' | cut -d'"' -f4)

if [ -n "$ERROR_TYPE" ]; then
echo " Error Type: $ERROR_TYPE"
fi
if [ -n "$ERROR_MESSAGE" ]; then
echo " Error Message: $ERROR_MESSAGE"
fi
echo ""
echo " Possible causes:"
echo " - Missing dependencies (check your package/deployment)"
echo " - Handler configuration is incorrect"
echo " - Runtime error in your Lambda code"
exit 1
fi

echo "✅ Lambda function invoked successfully!"
echo ""
echo "📄 Response:"
cat "$RESPONSE_FILE"
echo "$RESPONSE"
echo ""
exit 0
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.

high

This is a great improvement for error handling! To make it even more robust and user-friendly, I have a few suggestions:

  1. Robust JSON Parsing: Using grep and cut to parse JSON is brittle and can fail if the error message contains special characters like escaped quotes. Using a dedicated JSON parser like jq is much more reliable.
  2. Pretty-Print JSON: For better readability, the JSON response can be pretty-printed if jq is available. This is helpful for both error and success cases.

Here's a suggestion that implements these ideas, using jq if present and falling back to the current method otherwise.

  # Check if the response contains a Lambda runtime error
  RESPONSE=$(cat "$RESPONSE_FILE")
  if echo "$RESPONSE" | grep -q '"errorType"'; then
    echo "❌ Lambda function returned an error!"
    echo ""
    echo "📄 Response:"
    echo "$RESPONSE" | (command -v jq >/dev/null && jq . || cat)
    echo ""

    # Extract error details if possible
    if command -v jq >/dev/null; then
      ERROR_TYPE=$(echo "$RESPONSE" | jq -r '.errorType // ""')
      ERROR_MESSAGE=$(echo "$RESPONSE" | jq -r '.errorMessage // ""')
    else
      # Fallback for when jq is not installed. Note: this can be brittle.
      ERROR_TYPE=$(echo "$RESPONSE" | grep -o '"errorType":"[^"]*"' | cut -d'"' -f4)
      ERROR_MESSAGE=$(echo "$RESPONSE" | grep -o '"errorMessage":"[^"]*"' | cut -d'"' -f4)
    fi

    if [ -n "$ERROR_TYPE" ]; then
      echo "   Error Type: $ERROR_TYPE"
    fi
    if [ -n "$ERROR_MESSAGE" ]; then
      echo "   Error Message: $ERROR_MESSAGE"
    fi
    echo ""
    echo "   Possible causes:"
    echo "   - Missing dependencies (check your package/deployment)"
    echo "   - Handler configuration is incorrect"
    echo "   - Runtime error in your Lambda code"
    exit 1
  fi

  echo "✅ Lambda function invoked successfully!"
  echo ""
  echo "📄 Response:"
  echo "$RESPONSE" | (command -v jq >/dev/null && jq . || cat)
  echo ""
  exit 0

Comment thread docs/src/content/docs/intro/installation.mdx
@josh-padnick
Copy link
Copy Markdown
Collaborator Author

/gemini Can you do a fresh review of all content?

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a significant overhaul of the documentation, greatly improving its structure, clarity, and content. The addition of new pages for core concepts like boilerplate, variables, and runbook-structure provides a much better learning path for authors. The refactoring of the block component documentation, including adding comparison tables, is particularly helpful. I've found a few minor issues, mostly typos and small inconsistencies in the new documentation, which I've detailed in the comments.

Comment thread README.md
## Security concerns

Runbooks are designed to streamline the code generation and commands you might otherwise run on your local computer. This has important security implications you should be aware of prior to running Runbooks.
Runbooks is designed to streamline the code generation and commands you might otherwise run on your local computer. This has important security implications you should be aware of prior to running Runbooks.
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.

medium

There's a subject-verb agreement inconsistency. On line 13, you use "Runbooks are...", but here you use "Runbooks is...". For consistency, it's best to use the plural form throughout.

Suggested change
Runbooks is designed to streamline the code generation and commands you might otherwise run on your local computer. This has important security implications you should be aware of prior to running Runbooks.
Runbooks are designed to streamline the code generation and commands you might otherwise run on your local computer. This has important security implications you should be aware of prior to running Runbooks.

Comment thread docs/src/components/Head.astro Outdated
<path d="M12 2L3 7v10l9 5 9-5V7l-9-5zm0 2.18l6.26 3.48L12 11.14 5.74 7.66 12 4.18zm-7 5.04l6 3.33v6.63l-6-3.33v-6.63zm8 9.96v-6.63l6-3.33v6.63l-6 3.33z" fill="currentColor"/>
`;

function replaceTerrformIconsWithOpenTofu() {
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.

medium

There's a typo in the function name: Terrform should be Terraform. Remember to update the call sites on lines 38, 40, and 44 as well.

  function replaceTerraformIconsWithOpenTofu() {

- `allowPermanentHide` (boolean) - When true with confirmationText, adds "Don't show again" option
- `storageKey` (string) - Unique key for localStorage (required with allowPermanentHide)
- `className` (string) - Additional CSS classes
- `storageKey` (string) - Unique key for localStorage (required with allowPermanentHide
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.

medium

There's a missing closing parenthesis in the description for the storageKey prop.

Suggested change
- `storageKey` (string) - Unique key for localStorage (required with allowPermanentHide
- `storageKey` (string) - Unique key for localStorage (required with allowPermanentHide)


### Using inputsId

The Check command or script ulls its values from a separate Inputs block.
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.

medium

There's a typo here. "ulls" should be "pulls".

Suggested change
The Check command or script ulls its values from a separate Inputs block.
The Check command or script pulls its values from a separate Inputs block.

command="cd generated && terraform apply -auto-approve"
title="Deploy VPC"
successMessage="VPC deployed!"
/>
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.

medium

This line appears to be a stray /> from a copy-paste error and should be removed.

2. **Non-interactive mode:** Variables can also be set non-interactively, via command-line options, so that Boilerplate can be used in automated settings (e.g. during automated tests).
3. **Flexible templating:** Boilerplate uses Go Template for templating, which gives you the ability to do formatting, conditionals, loops, and call out to Go functions. It also includes helpers for common tasks such as loading the contents of another file, executing a shell command and rendering the output in a template, and including partial templates.
4. **Dependencies.** You can "chain" templates together, conditionally including other templates depending on variable values.
4. **Variable types:** Boilerplate variables support types, so you have first-class support for strings, ints, bools, lists, maps, and enums.
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.

medium

This numbered list has a duplicate number. This item should be 5. instead of 4.. Please also update the subsequent numbers in the list accordingly.

Suggested change
4. **Variable types:** Boilerplate variables support types, so you have first-class support for strings, ints, bools, lists, maps, and enums.
5. **Variable types:** Boilerplate variables support types, so you have first-class support for strings, ints, bools, lists, maps, and enums.

Comment on lines +55 to +57
<Aside type="caution">
When you update a `command` property, local template, or local script, the runbook will automatically load these changes in the _UI_, but because of the [executable registry](/security/execution-model/#executable-registry), the runbook will continue to execute the _old_ versions of these files. The solution is to always restart your runbook (re-run `runbooks watch`) when you make a template or script change.
</Aside>
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.

medium

This warning is a duplicate of the one on lines 13-15. It should be removed to avoid redundancy.

@josh-padnick josh-padnick merged commit 095ba9d into main Dec 13, 2025
9 of 10 checks passed
@josh-padnick josh-padnick deleted the update-lambda-runbook branch December 13, 2025 08:57
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.

1 participant