[PR #227] [MERGED] Bind PackageServer to ephemeral port to avoid port conflicts #464

Closed
opened 2025-12-30 01:24:38 +01:00 by adam · 0 comments
Owner

📋 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: mainHead: package-server


📝 Commits (1)

  • d61e6ee Bind PackageServer to 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.

## 📋 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>
adam added the pull-request label 2025-12-30 01:24:38 +01:00
adam closed this issue 2025-12-30 01:24:38 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#464