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

fix(js_run_devserver): ensure files are synced before waiting for next build event #1999

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

Conversation

jbedard
Copy link
Member

@jbedard jbedard commented Oct 22, 2024

I think this removes the possibility of processing multiple build events in parallel.


Changes are visible to end-users: no

Test plan

  • Covered by existing test cases

updatedDataFiles,
sandbox
)
deleteFiles(oldFiles, updatedDataFiles, sandbox),
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that this returns a promise, which this PR has not changed, but previously we were never doing await anywhere. So the deleteFiles and syncFiles were running async and concurrently (and they still are), but nothing was doing await to wait for them.

This means the await syncing below was essentially not waiting for anything. Then this code could start to be executed multiple times in parallel, defeating hte purpose of syncing...

@jbedard jbedard requested a review from dzbarsky October 22, 2024 21:19
Copy link

aspect-workflows bot commented Oct 22, 2024

Test

2 test targets passed

Targets
//js/private/test/js_run_devserver:js_run_devserver_test [k8-fastbuild]                                 388ms
//js/private/test/js_run_devserver:node_modules_symlink_to_execroot_test [k8-fastbuild]                 575ms

Total test execution time was 963ms. 201 tests (99.0%) were fully cached saving 38s.


Test

e2e/bzlmod

All tests were cache hits

5 tests (100.0%) were fully cached saving 789ms.


Test

e2e/gyp_no_install_script

All tests were cache hits

2 tests (100.0%) were fully cached saving 169ms.


Test

e2e/js_image_oci

All tests were cache hits

1 test (100.0%) was fully cached saving 8s.


Test

e2e/npm_link_package

All tests were cache hits

3 tests (100.0%) were fully cached saving 920ms.


Test

e2e/npm_link_package-esm

All tests were cache hits

3 tests (100.0%) were fully cached saving 924ms.


Test

e2e/npm_translate_lock

All tests were cache hits

1 test (100.0%) was fully cached saving 27ms.


Test

e2e/npm_translate_lock_empty

All tests were cache hits

1 test (100.0%) was fully cached saving 27ms.


Test

e2e/npm_translate_lock_multi

All tests were cache hits

2 tests (100.0%) were fully cached saving 296ms.


Test

e2e/npm_translate_lock_partial_clone

All tests were cache hits

1 test (100.0%) was fully cached saving 112ms.


Test

e2e/npm_translate_lock_replace_packages

All tests were cache hits

3 tests (100.0%) were fully cached saving 233ms.


Test

e2e/npm_translate_lock_subdir_patch

All tests were cache hits

1 test (100.0%) was fully cached saving 236ms.


Test

e2e/npm_translate_package_lock

All tests were cache hits

1 test (100.0%) was fully cached saving 81ms.


Test

e2e/npm_translate_yarn_lock

All tests were cache hits

1 test (100.0%) was fully cached saving 81ms.


Test

e2e/package_json_module

All tests were cache hits

1 test (100.0%) was fully cached saving 504ms.


Test

e2e/pnpm_lockfiles

All tests were cache hits

40 tests (100.0%) were fully cached saving 3s.


Test

e2e/pnpm_workspace

All tests were cache hits

10 tests (100.0%) were fully cached saving 2s.


Test

e2e/pnpm_workspace_rerooted

All tests were cache hits

12 tests (100.0%) were fully cached saving 3s.


Test

e2e/repo_mapping

All tests were cache hits

2 tests (100.0%) were fully cached saving 493ms.


Test

e2e/rules_foo

All tests were cache hits

2 tests (100.0%) were fully cached saving 153ms.


Test

e2e/runfiles

All tests were cache hits

1 test (100.0%) was fully cached saving 443ms.


Test

e2e/vendored_node

All tests were cache hits

1 test (100.0%) was fully cached saving 171ms.


Buildifier      Format

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