Here is my take on how to best solve the "flaky PackageServer tests" problem.
It is ready to be merged after #217 .
See commit message for details.
If you prefer a different solution, perhaps this can serve as inspiration.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/apple/pkl/pull/227
**Author:** [@odenix](https://github.com/odenix)
**Created:** 2/22/2024
**Status:** ✅ Merged
**Merged:** 3/13/2024
**Merged by:** [@bioball](https://github.com/bioball)
**Base:** `main` ← **Head:** `package-server`
---
### 📝 Commits (1)
- [`d61e6ee`](https://github.com/apple/pkl/commit/d61e6ee46ca091e606eeb6c44810a2ed9b2a3cce) Bind `PackageServer` to ephemeral port to avoid port conflicts
### 📊 Changes
**26 files changed** (+754 additions, -579 deletions)
<details>
<summary>View changed files</summary>
📝 `pkl-cli/src/test/kotlin/org/pkl/cli/CliEvaluatorTest.kt` (+24 -11)
📝 `pkl-cli/src/test/kotlin/org/pkl/cli/CliPackageDownloaderTest.kt` (+20 -11)
📝 `pkl-cli/src/test/kotlin/org/pkl/cli/CliProjectPackagerTest.kt` (+15 -4)
📝 `pkl-cli/src/test/kotlin/org/pkl/cli/CliProjectResolverTest.kt` (+29 -11)
📝 `pkl-commons-cli/src/main/kotlin/org/pkl/commons/cli/CliBaseOptions.kt` (+7 -0)
📝 `pkl-commons-cli/src/main/kotlin/org/pkl/commons/cli/commands/BaseOptions.kt` (+9 -0)
📝 `pkl-commons-test/src/main/kotlin/org/pkl/commons/test/PackageServer.kt` (+86 -85)
📝 `pkl-core/src/main/java/org/pkl/core/http/HttpClient.java` (+8 -0)
📝 `pkl-core/src/main/java/org/pkl/core/http/HttpClientBuilder.java` (+8 -1)
📝 `pkl-core/src/main/java/org/pkl/core/http/RequestRewritingClient.java` (+16 -2)
📝 `pkl-core/src/main/java/org/pkl/core/service/ExecutorSpiImpl.java` (+12 -4)
📝 `pkl-core/src/main/java/org/pkl/core/util/HttpUtils.java` (+20 -0)
📝 `pkl-core/src/test/kotlin/org/pkl/core/StackFrameTransformersTest.kt` (+18 -13)
📝 `pkl-core/src/test/kotlin/org/pkl/core/http/RequestRewritingClientTest.kt` (+21 -2)
📝 `pkl-core/src/test/kotlin/org/pkl/core/packages/PackageResolversTest.kt` (+11 -10)
📝 `pkl-core/src/test/kotlin/org/pkl/core/project/ProjectDependenciesResolverTest.kt` (+12 -7)
📝 `pkl-core/src/test/kotlin/org/pkl/core/project/ProjectTest.kt` (+15 -13)
📝 `pkl-core/src/test/kotlin/org/pkl/core/util/HttpUtilsTest.kt` (+18 -0)
📝 `pkl-executor/src/main/java/org/pkl/executor/ExecutorOptions.java` (+293 -29)
➖ `pkl-executor/src/main/java/org/pkl/executor/ExecutorOptions2.java` (+0 -174)
_...and 6 more files_
</details>
### 📄 Description
Here is my take on how to best solve the "flaky PackageServer tests" problem.
It is ready to be merged after #217 .
See commit message for details.
If you prefer a different solution, perhaps this can serve as inspiration.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/227
Author: @odenix
Created: 2/22/2024
Status: ✅ Merged
Merged: 3/13/2024
Merged by: @bioball
Base:
main← Head:package-server📝 Commits (1)
d61e6eeBindPackageServerto ephemeral port to avoid port conflicts📊 Changes
26 files changed (+754 additions, -579 deletions)
View changed files
📝
pkl-cli/src/test/kotlin/org/pkl/cli/CliEvaluatorTest.kt(+24 -11)📝
pkl-cli/src/test/kotlin/org/pkl/cli/CliPackageDownloaderTest.kt(+20 -11)📝
pkl-cli/src/test/kotlin/org/pkl/cli/CliProjectPackagerTest.kt(+15 -4)📝
pkl-cli/src/test/kotlin/org/pkl/cli/CliProjectResolverTest.kt(+29 -11)📝
pkl-commons-cli/src/main/kotlin/org/pkl/commons/cli/CliBaseOptions.kt(+7 -0)📝
pkl-commons-cli/src/main/kotlin/org/pkl/commons/cli/commands/BaseOptions.kt(+9 -0)📝
pkl-commons-test/src/main/kotlin/org/pkl/commons/test/PackageServer.kt(+86 -85)📝
pkl-core/src/main/java/org/pkl/core/http/HttpClient.java(+8 -0)📝
pkl-core/src/main/java/org/pkl/core/http/HttpClientBuilder.java(+8 -1)📝
pkl-core/src/main/java/org/pkl/core/http/RequestRewritingClient.java(+16 -2)📝
pkl-core/src/main/java/org/pkl/core/service/ExecutorSpiImpl.java(+12 -4)📝
pkl-core/src/main/java/org/pkl/core/util/HttpUtils.java(+20 -0)📝
pkl-core/src/test/kotlin/org/pkl/core/StackFrameTransformersTest.kt(+18 -13)📝
pkl-core/src/test/kotlin/org/pkl/core/http/RequestRewritingClientTest.kt(+21 -2)📝
pkl-core/src/test/kotlin/org/pkl/core/packages/PackageResolversTest.kt(+11 -10)📝
pkl-core/src/test/kotlin/org/pkl/core/project/ProjectDependenciesResolverTest.kt(+12 -7)📝
pkl-core/src/test/kotlin/org/pkl/core/project/ProjectTest.kt(+15 -13)📝
pkl-core/src/test/kotlin/org/pkl/core/util/HttpUtilsTest.kt(+18 -0)📝
pkl-executor/src/main/java/org/pkl/executor/ExecutorOptions.java(+293 -29)➖
pkl-executor/src/main/java/org/pkl/executor/ExecutorOptions2.java(+0 -174)...and 6 more files
📄 Description
Here is my take on how to best solve the "flaky PackageServer tests" problem.
It is ready to be merged after #217 .
See commit message for details.
If you prefer a different solution, perhaps this can serve as inspiration.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.