Skip to content

hotfix: Live run/task errors#108

Merged
monoxgas merged 2 commits into
mainfrom
hotfix/live-run-task-errors
Jul 17, 2025
Merged

hotfix: Live run/task errors#108
monoxgas merged 2 commits into
mainfrom
hotfix/live-run-task-errors

Conversation

@monoxgas
Copy link
Copy Markdown
Contributor

@monoxgas monoxgas commented Jul 17, 2025

Live run/task errors

Key Changes:

  • Refactored many places where RuntimeErrors were being thrown when calls were made outside of tasks/runs and migrated them to warnings that gracefully fail

Generated Summary:

  • Updated multiple functions to replace RuntimeError with warn_at_user_stacklevel, improving user feedback when methods are called outside of a valid run context.
  • Functions affected:
    • link_objects
    • log_artifact
    • log_input
    • log_metric
    • log_metrics
    • log_output
    • log_params
    • push_update
    • tag
  • Bumped version from 1.11.0 to 1.11.1 in pyproject.toml reflecting these changes.
  • Enhanced the user experience by providing warnings instead of raising exceptions, reducing potential disruptions in workflow.

This summary was generated with ❤️ by rigging

@monoxgas monoxgas requested a review from Copilot July 17, 2025 18:59
@dreadnode-renovate-bot dreadnode-renovate-bot Bot added area/docs Changes to documentation and guides area/python Changes to Python package configuration and dependencies type/docs Documentation updates and improvements labels Jul 17, 2025
Copy link
Copy Markdown
Contributor

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 hotfix addresses error handling by refactoring RuntimeError exceptions to graceful warning-based failures when SDK functions are called outside of tasks/runs, improving the user experience by preventing unexpected crashes.

Key changes:

  • Replaced RuntimeError exceptions with warning messages for SDK functions called outside proper context
  • Added early returns to prevent execution when context is missing
  • Updated version from 1.11.0 to 1.11.1

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
pyproject.toml Version bump to 1.11.1 for hotfix release
dreadnode/tracing/span.py Removed RuntimeError for task spans without runs, added conditional logic
dreadnode/main.py Replaced RuntimeError with warnings for all SDK functions called outside context
docs/sdk/main.mdx Updated documentation to reflect the new warning-based error handling

Comment thread dreadnode/main.py
@monoxgas monoxgas merged commit 2ef7086 into main Jul 17, 2025
8 of 9 checks passed
@monoxgas monoxgas deleted the hotfix/live-run-task-errors branch July 17, 2025 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Changes to documentation and guides area/python Changes to Python package configuration and dependencies type/docs Documentation updates and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants