Repository navigation
build(server): take all of kore to 0.1.14 under one version ref - #58
Merged
Merged
Conversation
kore-core, kore-ktor and the build plugin stayed on 0.1.4 while kore-mcp rode 0.1.14 on its own ref, because the newer EngineDrain refuses to run beside Ktor's own shutdown hook. The lifecycle now uses the 0.1.9+ wiring: startForKore, one DrainGate shared by the refusal and the drain, reuseAddress with a pre-start check of the HTTP port, and stopAndJoin on the health registry. Closes #56
The agent sends from its own thread while the test iterated the same ArrayList, which failed CI with ConcurrentModificationException on the JVM. Both recording senders now guard the list with a Mutex and hand out a copy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Takes every kore module and the
kore.buildplugin to 0.1.14 under onekoreversion ref;koreMcpis gone. The lifecycle moves to the 0.1.9+ wiring (kotlin-skillsnative-service-bootstrap, step 6):startForKore()instead ofstart(wait = false). On the JVMstartleft Ktor's own shutdown hook on, which stops the engine at the signal, mid-announce (On the JVM, Ktor's own shutdown hook stops the engine at SIGTERM, before kore's announce kore#90); on Kotlin/Native a SIGTERM right after start could hang the process (kore B-63). The 0.1.14EngineDrainrefuses to be built beside an armed hook.DrainGate, the same instanceEngineDrainopens as its first act, instead of readiness — which falls at the start of the announce and so refused exactly the requests the announce wait is for (kore B-61). The deprecated predicate form is gone (warnings are errors here).reuseAddress = trueon the engine, and the HTTP port checked before start with kore'srequireListenableand the same flag: a busyMETRIK_HTTP_PORTis now one line naming the variable and exit code 1, not a native crash (kore B-59, B-62). metrik reads its environment by hand, so the check gets a one-key schema fed the already-parsed port rather than the process environment — kore's schema refuses undeclared variables under its prefix, and the kubelet injectsMETRIK_METRIK_*service variables into the pod.MetrikProbes.stop()callsstopAndJoin()(HealthRegistry.stop() cannot be waited on, so a check can outlive what it checks kore#79), so the stage waits for a check in flight.Also in this PR, because it failed the first CI run:
AgentLossReportingTestandMetrikPluginTestiterated the recording sender'sArrayListwhile the agent appended to it from its own thread (ConcurrentModificationExceptionon the JVM). Both senders now keep the list under aMutexand hand out a copy.Docs in the same change:
BACKLOG.mdM-114, theMETRIK_HTTP_PORTrow indocs/services/metrik-server.md.Verification
:server:jvmTestand:server:linuxX64Testgreen on a Linux host, compile with no kore deprecation warnings. NewHttpPortCheckTest: a port something listens on is aConfigurationExceptionnamingMETRIK_HTTP_PORT(JVM and linuxX64).Ktor unchanged: every
io.ktorin:server:dependencies --configuration linuxX64CompileKlibrariesresolves to 3.6.0, as before; the only arrows are the MCP SDK's 3.5.1 → 3.6.0, same as on main.Image built from this branch,
docker stopunder load (/api/servicesevery 50 ms), side by side with the image of main (sha-d7031e2):503× 33 in a row200throughout, no503Transcript on this branch:
A second process in the first one's network namespace: main —
Uncaught Kotlin exception … AddressAlreadyInUseException, exit 139; this branch —METRIK_HTTP_PORT: 8080 cannot be listened on: bind: Address already in use (errno 98), exit 1.Not covered: the UDP ingest port has the same failure class and kore's check is TCP-only — #57.
Closes #56