Skip to content

Refactor: Extract compute log operations into ComputeLogDomain #31610

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

Closed
wants to merge 2 commits into from

Conversation

schrockn
Copy link
Member

@schrockn schrockn commented Aug 7, 2025

Summary & Motivation

Extracts compute log operations from DagsterInstance into a dedicated ComputeLogDomain following the established domain pattern used by other areas like RunDomain, DaemonDomain, etc. This addresses an API inconsistency where compute log operations required direct access to instance.compute_log_manager.* rather than having wrapper methods on DagsterInstance like other functional areas.

The refactor provides:

  • Consistent API surface: New wrapper methods like instance.get_compute_log_data(), instance.capture_compute_logs(), etc.
  • Enhanced functionality: Additional business logic including error handling, logging, and convenience methods
  • Backward compatibility: All existing instance.compute_log_manager.* calls continue to work unchanged

Key new methods include:

# Core operations
instance.capture_compute_logs(log_key)
instance.get_compute_log_data(log_key, cursor, max_bytes)
instance.delete_compute_logs(log_key=log_key)

# Convenience methods
instance.get_compute_logs_for_run(run_id, step_key)
instance.cleanup_compute_logs_for_run(run_id)

How I Tested These Changes

New unit tests verify all wrapper methods delegate correctly to the underlying ComputeLogManager. All existing functionality remains unchanged.

Copy link
Member Author

schrockn commented Aug 7, 2025

@schrockn schrockn changed the title compute-log-domain Refactor: Extract compute log operations into ComputeLogDomain Aug 7, 2025
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