Repository navigation
Conversation
Since apache#6832 dropped the cancellable child context that kamel run --sync used, NewKamelCommand sets RootContext and Context to the same ctx. Keep Context and move the only RootContext reader, the wait point after kamel run --logs, over to it. Both fields held the same value, so the wait blocks on the same channel as before.
This branch has not been deployed
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.
Fixes #6843
RootCmdOptionscarries two contexts that now always hold the same value.RootContextused to keep the process alive whilekamel run --synccancelled and reran the command throughContext. #6832 removed--sync, and since thenNewKamelCommandsets both fields to the samectx. Two names for one value leave readers guessing which to use.RootContextfield and its assignment inNewKamelCommand.kamel run --logsnow blocks ono.Context.Done(). It was the onlyRootContextreader, andkamel logalready waits the same way.No behaviour change: both fields held the same
ctx, so the wait blocks on the same channel as before. The unit-test fixtures inroot_test.goalready set onlyContext.Testing
go build,go vet(including theintegration-tagged e2e packages) andgofmtare clean, andgolangci-lintreports nothing in the touched files.go test ./pkg/cmd/...shows the same pre-existing Windows-only failures before and after the change.