Skip to content

Add note to orderSequentially that it may enter staging mode #24886

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kian-thompson
Copy link
Contributor

The orderSequentially function may enter staging mode for the duration of the call. Because of this, an error will be thrown if a user tries to enter staging mode in the callback provided to orderSequentially. The error's message is "Already in staging mode", and could be confusing from the end user's perspective as they never entered staging mode themselves.

See #24728 (comment)

Example:

// This will throw a UsageError "Already in staging mode"
containerRuntime.orderSequentially(() => {
    containerRuntime.enterStagingMode();
});

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 documentation for the orderSequentially function to clarify that it may enter staging mode for the duration of its execution, which helps explain potential error messages for users.

  • Added a @remarks section in the documentation
  • Clarified that staging mode is required for rolling back certain op types

@github-actions github-actions bot added base: main PRs targeted against main branch area: runtime Runtime related issues labels Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: runtime Runtime related issues base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants