fix(operator): correct local kubeops CLI detection#1035
fix(operator): correct local kubeops CLI detection#1035kimpenhaus merged 2 commits intodotnet:mainfrom
Conversation
|
@fuguiKz thanks for the pr <3 this is just my personal flavour but I actually don't like a continue on error flag here. if the target is configured to run it should work proper - if it is not needed, it should be deactivated by configuration. I wish to understand more of the details raised in issue #1030 thanks for your understanding |
cbc123d to
f7d082e
Compare
|
@kimpenhaus thanks for the feedback! Agree that making the actual Instead I dug into why #1030 is failing in Docker/CI and it looks like the local-tool detection is giving a false positive:
Fix in this PR: change the probe to This should unblock Docker builds without masking real generation failures (when |
good catch 👍🏼 that totally makes sense |
Addresses #1030.
Context
During
dotnet publish, KubeOps runskubeops generate ...via MSBuild targets. When the globalkubeopscommand isn't available (common in Docker/CI), the targets try to detect a local tool fallback.The local-tool probe currently uses
dotnet tool run kubeops -h, but-his parsed bydotnet tool runitself (help), so it can exit0even when there is no tool manifest / no localkubeopstool. This false-positive switchesKubeOpsClitodotnet tool run kubeopsand then fails later during generation.Change
dotnet tool run kubeops -- -hso-his forwarded tokubeopsand the exit code reflects actual tool availability.kubeops generate ...failures as errors (noContinueOnError).Tested
dotnet tool run kubeops -hvsdotnet tool run kubeops -- -hsemantics and ran a minimal MSBuild repro.