Skip to content

Remove closeAndGetPendingLocalState #25091

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

Merged
merged 3 commits into from
Jul 24, 2025
Merged

Conversation

ChumpChief
Copy link
Contributor

@ChumpChief ChumpChief commented Jul 24, 2025

The purpose of closeAndGetPendingLocalState (as opposed to getPendingLocalState) is to trigger a special behavior of the BlobManager to fake blob upload completion, such that the customer then will store their handles to be included in the pending state. However, this flow is not needed with payload pending handles, which is the only flow we intend to support in combination with pending state going forward.

Removing this entry point to the special behavior frees us up to make simplifications in the runtime and BlobManager (to be done in a following PR). This should be a safe removal as it's an internal-only API with no current customers.

Internal uses of the API are primarily just converted to call getPendingLocalState followed by close(), except where the test is specifically for blob functionality. These will need to be updated after we add blob support to getPendingLocalState via payload pending handles.

AB#45000

@Copilot Copilot AI review requested due to automatic review settings July 24, 2025 21:02
@ChumpChief ChumpChief requested a review from a team as a code owner July 24, 2025 21:02
@github-actions github-actions bot added area: dds Issues related to distributed data structures area: dds: tree area: loader Loader related issues area: runtime Runtime related issues area: tests Tests to add, test infrastructure improvements, etc base: main PRs targeted against main branch labels Jul 24, 2025
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 removes the closeAndGetPendingLocalState API method and replaces its usage with separate calls to getPendingLocalState() followed by close(). The removal simplifies the runtime by eliminating a special blob upload completion behavior that is no longer needed with the payload pending handles flow.

  • Replaces all closeAndGetPendingLocalState() calls with getPendingLocalState() followed by close()
  • Removes the closeAndGetPendingLocalState method from container interfaces and implementations
  • Comments out blob-related tests that relied on the special behavior, to be updated later for payload pending handles

Reviewed Changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/test/test-service-load/src/runner.ts Updates offline container handling to use new API pattern
packages/test/test-end-to-end-tests/src/test/refreshSerializedStateManager.spec.ts Replaces API calls in snapshot refresh tests
packages/test/test-end-to-end-tests/src/test/offline/waitForSummary.spec.ts Updates summary waiting tests with new API pattern
packages/test/test-end-to-end-tests/src/test/offline/stashedOps.spec.ts Converts stashed ops tests and comments out blob-specific tests
packages/test/test-end-to-end-tests/src/test/offline/blobHandles.spec.ts Comments out blob test that relied on special behavior
packages/test/test-end-to-end-tests/src/test/migration-shim/reconnect.spec.ts Updates migration tests to use new API pattern
packages/test/test-end-to-end-tests/src/test/intervalCollectionEndToEndTests.spec.ts Replaces API call in interval collection test
packages/test/test-end-to-end-tests/src/test/data-virtualization/*.spec.ts Updates data virtualization tests with new API pattern
packages/test/test-end-to-end-tests/src/test/container.spec.ts Updates container test name and implementation
packages/runtime/container-runtime/src/containerRuntime.ts Updates comment reference to new API method
packages/loader/container-loader/src/test/serializedStateManager.spec.ts Removes props parameter from test calls
packages/loader/container-loader/src/serializedStateManager.ts Simplifies method signature by removing props parameter
packages/loader/container-loader/src/container.ts Removes deprecated method and interface definitions
packages/dds/tree/src/test/shared-tree/sharedTree.spec.ts Updates tree tests to use new API pattern
experimental/dds/tree/src/test/utilities/TestUtilities.ts Updates test utility to use new API pattern

Comment on lines +432 to +433
sessionExpiryTimerStarted: undefined,
snapshotSequenceNumber: undefined,
Copy link
Contributor

Choose a reason for hiding this comment

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

i think these should stay

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sessionExpiryTimerStarted and snapshotSequenceNumber have never been passed here, even before this change. I was actually thinking about removing them outright rather than leaving them here and undefined, but wasn't sure what impact it'd have on telemetry.

Copy link
Contributor

Choose a reason for hiding this comment

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

makes sense since both fields are encapsulated in the pending runtime state

await mainObject3.handleGetPromise.promise;
});
// TODO: Update for placeholder pending blob creation and getPendingLocalState
// it("Slow blob create request before container closes", async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we skip, rather than comment it out, and there should be a bug linked to the skip

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in latest

@ChumpChief ChumpChief merged commit 8aac62e into microsoft:main Jul 24, 2025
47 checks passed
@ChumpChief ChumpChief deleted the RemoveCAGPLS branch July 24, 2025 23:58
MarioJGMsoft pushed a commit to MarioJGMsoft/FluidFramework that referenced this pull request Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: dds: tree area: dds Issues related to distributed data structures area: loader Loader related issues area: runtime Runtime related issues area: tests Tests to add, test infrastructure improvements, etc base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants