Skip to content

Conversation

strickvl
Copy link
Contributor

Summary

  • Enhanced alerter documentation to comprehensively cover the ask step functionality for human-in-the-loop workflows
  • Added detailed section explaining how ask steps work, default keywords, and customization options
  • Updated all alerter docs (main, Discord, Slack, custom) with consistent examples and patterns

Key Changes

Main Alerter Documentation

  • New section: "Using the Ask Step for Human-in-the-Loop Workflows"
  • Proper ZenML patterns: Shows conditional logic inside steps (not pipeline functions)
  • Default keywords: Documents built-in approval (approve, LGTM, ok, yes) and disapproval (decline, disapprove, no, reject) options
  • Customization examples: Shows how to use custom keywords with alerter parameters

Discord & Slack Alerter Documentation

  • Enhanced examples: Updated pipeline examples to show proper conditional step patterns
  • Custom approval keywords: Added sections showing how to use DiscordAlerterParameters and SlackAlerterParameters
  • Boolean return type: Clearly documented that ask steps return True/False
  • Timeout behavior: Explained what happens when no valid response is received

Custom Alerter Documentation

  • Realistic implementation: Provided comprehensive ask() method example with proper approval/disapproval logic
  • Parameter support: Added MyAlerterParameters class showing how to support custom approval keywords
  • Error handling: Demonstrated proper exception handling and return patterns
  • Implementation guidance: Added detailed notes on what custom alerters should do

Technical Details

The ask step functionality works by:

  1. Posting a message to the chat service
  2. Waiting for user responses containing specific keywords
  3. Returning True for approval, False for disapproval/timeout

Default keywords are defined in:

  • discord_alerter.py:31-32 (DEFAULT_APPROVE_MSG_OPTIONS, DEFAULT_DISAPPROVE_MSG_OPTIONS)
  • slack_alerter.py:35-36 (same pattern)

Both support customization via approve_msg_options and disapprove_msg_options parameters.

Test Plan

  • Read all updated documentation for clarity and consistency
  • Verify code examples follow proper ZenML patterns
  • Check that all parameter names match actual implementation
  • Ensure examples show realistic use cases

🤖 Generated with Claude Code

- Add detailed section on ask step functionality to main alerter docs
- Document default approval/disapproval keywords (approve, LGTM, ok, yes / decline, disapprove, no, reject)
- Show proper ZenML pipeline patterns with conditional logic inside steps
- Add custom approval keyword examples for both Discord and Slack
- Update custom alerter docs with realistic ask() implementation
- Include parameter classes for configurable approval/disapproval options
- Document boolean return type and timeout behavior
- Add human-in-the-loop workflow examples and best practices

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@strickvl strickvl added documentation Improvements or additions to documentation internal To filter out internal PRs and issues labels May 22, 2025
@strickvl strickvl requested a review from htahir1 May 22, 2025 12:19
Copy link
Contributor

coderabbitai bot commented May 22, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this 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.

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.

@strickvl strickvl requested a review from Copilot May 22, 2025 12:24
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the alerter documentation to comprehensively cover the ask step functionality in human-in-the-loop workflows by updating examples, adding detailed explanations, and ensuring consistency across different integrations.

  • Updated Slack documentation to showcase conditional step execution and custom approval options
  • Refactored Discord documentation to include conditional behavior and custom parameter examples
  • Expanded custom and README documentation to guide users on implementing and customizing alerter behavior

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
docs/book/component-guide/alerters/slack.md Updated examples to capture and pass approval status between steps
docs/book/component-guide/alerters/discord.md Added conditional step and custom parameter examples for Discord
docs/book/component-guide/alerters/custom.md Expanded example implementation and added support for custom params
docs/book/component-guide/alerters/README.md Introduced a new section covering ask step functionality with examples

strickvl and others added 5 commits May 22, 2025 14:28
- Clarify that ZenML alerter implementations handle case conversion, not the platforms
- Discord alerter: exact case matching in our implementation (discord_alerter.py:300-302)
- Slack alerter: lowercase conversion in our implementation (slack_alerter.py:348)
- Remove misleading references to platform behavior vs our code behavior

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Add info hints in both Discord and Slack alerter documentation
- Explain secure token storage using ZenML secrets instead of hardcoding
- Include examples showing secret creation and reference syntax
- Link to secrets documentation for detailed guidance

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Copy link
Contributor

github-actions bot commented May 22, 2025

Documentation Link Check Results

Absolute links check passed
Relative links check passed
Last checked: 2025-05-22 21:27:02 UTC

Copy link
Contributor

@htahir1 htahir1 left a comment

Choose a reason for hiding this comment

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

Wow many holes in those docs

@strickvl strickvl merged commit 2781e4d into develop May 22, 2025
16 checks passed
@strickvl strickvl deleted the doc/improve-alerter-docs branch May 22, 2025 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation internal To filter out internal PRs and issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants