Skip to content
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

Offline: Minor refactoring of stashedOps.spec.ts #21052

Merged
merged 5 commits into from
May 15, 2024

Conversation

markfields
Copy link
Member

Description

Reading through stashedOps.spec.ts, I wanted to make a couple changes:

  • Move helpers out of the top-level describe block, because they were inconsistently using both "global" state from that scope and objects passed in via parameters
  • Moved waitForSummary helper out too, so callsites are explicit about which container is being awaited
  • Note that getPendingOps callsites all changed indentation of the callback, hopefully ignoring whitespace will help in the diff
  • I added comments and tweaked some names/strings in the test handles stashed ops created on top of sequenced local ops after stepping through it, it was a very interesting one to follow in terms of learning.

Bonus change: Move event-specific logging props into the "details" property. It's easier to find this info that way (you don't have to remember the exact name), and avoids an explosion of columns when the telemetry sink turns each prop into its own column.
 

Reviewer Guidance

The logging change should be the only functional change here.

@github-actions github-actions bot added area: loader Loader related issues area: tests Tests to add, test infrastructure improvements, etc base: main PRs targeted against main branch labels May 10, 2024
@msfluid-bot
Copy link
Collaborator

@fluid-example/bundle-size-tests: +336 Bytes
Metric NameBaseline SizeCompare SizeSize Diff
aqueduct.js 453.18 KB 453.18 KB No change
azureClient.js 550.5 KB 550.61 KB +112 Bytes
connectionState.js 680 Bytes 680 Bytes No change
containerRuntime.js 257.02 KB 257.02 KB No change
fluidFramework.js 357.56 KB 357.56 KB No change
loader.js 132.78 KB 132.89 KB +112 Bytes
map.js 41.45 KB 41.45 KB No change
matrix.js 143.67 KB 143.67 KB No change
odspClient.js 518.83 KB 518.94 KB +112 Bytes
odspDriver.js 97.29 KB 97.29 KB No change
odspPrefetchSnapshot.js 42.15 KB 42.15 KB No change
sharedString.js 160.19 KB 160.19 KB No change
sharedTree.js 357.55 KB 357.55 KB No change
Total Size 3.19 MB 3.19 MB +336 Bytes

Baseline commit: 32274f6

Generated by 🚫 dangerJS against 5ee1a87

@markfields markfields merged commit 3f33cdb into microsoft:main May 15, 2024
30 checks passed
@markfields markfields deleted the offline/e2e-tests-tweaks branch May 15, 2024 19:17
kekachmar pushed a commit to kekachmar/FluidFramework that referenced this pull request May 21, 2024
Reading through stashedOps.spec.ts, I wanted to make a couple changes:

* Move helpers out of the top-level `describe` block, because they were
inconsistently using both "global" state from that scope and objects
passed in via parameters
* Moved `waitForSummary` helper out too, so callsites are explicit about
which container is being awaited
* I added comments and tweaked some names/strings in the test `handles
stashed ops created on top of sequenced local ops` after stepping
through it, it was a very interesting one to follow in terms of
learning.

Bonus change: Move event-specific logging props into the "details"
property. It's easier to find this info that way (you don't have to
remember the exact name), and avoids an explosion of columns when the
telemetry sink turns each prop into its own column.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: loader Loader 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.

None yet

3 participants