Skip to content

Make WorkerInstance a @ClassRule @Rule#25432

Closed
fmeum wants to merge 1 commit intobazelbuild:masterfrom
fmeum:refactor-worker-instance
Closed

Make WorkerInstance a @ClassRule @Rule#25432
fmeum wants to merge 1 commit intobazelbuild:masterfrom
fmeum:refactor-worker-instance

Conversation

@fmeum
Copy link
Copy Markdown
Collaborator

@fmeum fmeum commented Mar 3, 2025

This makes it easier to use in tests and also avoids restarting the worker for each test by only deleting its state.

Before:

//src/test/java/com/google/devtools/build/lib/remote:BuildWithoutTheBytesIntegrationTest PASSED in 33.4s
  Stats over 5 runs: max = 33.4s, min = 28.8s, avg = 31.8s, dev = 1.7s

After:

//src/test/java/com/google/devtools/build/lib/remote:BuildWithoutTheBytesIntegrationTest PASSED in 11.5s
  Stats over 5 runs: max = 11.5s, min = 9.0s, avg = 10.0s, dev = 0.8s

Requires fixing an InputStream leak in DiskCacheClient.

Suggested in #25412 (comment)

@fmeum fmeum requested a review from a team as a code owner March 3, 2025 09:37
@fmeum fmeum requested a review from coeuvre March 3, 2025 09:38
@github-actions github-actions Bot added team-Remote-Exec Issues and PRs for the Execution (Remote) team awaiting-review PR is awaiting review from an assigned reviewer labels Mar 3, 2025
@fmeum fmeum force-pushed the refactor-worker-instance branch from b72fd36 to 81862f6 Compare March 3, 2025 13:04
@fmeum
Copy link
Copy Markdown
Collaborator Author

fmeum commented Mar 3, 2025

@bazel-io fork 8.2.0

This makes it easier to use in tests and also avoids restarting the worker for each test by only deleting its state.
@fmeum fmeum force-pushed the refactor-worker-instance branch from 81862f6 to a26e8e6 Compare March 3, 2025 15:40
@coeuvre coeuvre added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels Mar 4, 2025
@fmeum
Copy link
Copy Markdown
Collaborator Author

fmeum commented Mar 4, 2025

@bazel-io fork 8.2.0

@copybara-service copybara-service Bot closed this in 7bc4469 Mar 6, 2025
@github-actions github-actions Bot removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Mar 6, 2025
@fmeum fmeum deleted the refactor-worker-instance branch March 7, 2025 08:08
iancha1992 pushed a commit to iancha1992/bazel that referenced this pull request Mar 7, 2025
This makes it easier to use in tests and also avoids restarting the worker for each test by only deleting its state.

Before:
```
//src/test/java/com/google/devtools/build/lib/remote:BuildWithoutTheBytesIntegrationTest PASSED in 33.4s
  Stats over 5 runs: max = 33.4s, min = 28.8s, avg = 31.8s, dev = 1.7s
```

After:
```
//src/test/java/com/google/devtools/build/lib/remote:BuildWithoutTheBytesIntegrationTest PASSED in 11.5s
  Stats over 5 runs: max = 11.5s, min = 9.0s, avg = 10.0s, dev = 0.8s
```

Requires fixing an `InputStream` leak in `DiskCacheClient`.

Suggested in bazelbuild#25412 (comment)

Closes bazelbuild#25432.

PiperOrigin-RevId: 734107531
Change-Id: Icf8f593f8c368c5d9daa36002a6fb1aa9b789dca
github-merge-queue Bot pushed a commit that referenced this pull request Mar 10, 2025
This makes it easier to use in tests and also avoids restarting the
worker for each test by only deleting its state.

Before:
```
//src/test/java/com/google/devtools/build/lib/remote:BuildWithoutTheBytesIntegrationTest PASSED in 33.4s
  Stats over 5 runs: max = 33.4s, min = 28.8s, avg = 31.8s, dev = 1.7s
```

After:
```
//src/test/java/com/google/devtools/build/lib/remote:BuildWithoutTheBytesIntegrationTest PASSED in 11.5s
  Stats over 5 runs: max = 11.5s, min = 9.0s, avg = 10.0s, dev = 0.8s
```

Requires fixing an `InputStream` leak in `DiskCacheClient`.

Suggested in
#25412 (comment)

Closes #25432.

PiperOrigin-RevId: 734107531
Change-Id: Icf8f593f8c368c5d9daa36002a6fb1aa9b789dca

Commit
7bc4469

Co-authored-by: Fabian Meumertzheim <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-Remote-Exec Issues and PRs for the Execution (Remote) team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants