ROX-20811: Roxctl central generate pvc bug#14312
Conversation
|
Images are ready for the commit at 4795317. To use with deploy scripts, first |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #14312 +/- ##
=======================================
Coverage 49.04% 49.04%
=======================================
Files 2514 2516 +2
Lines 182854 182868 +14
=======================================
+ Hits 89680 89688 +8
- Misses 86051 86057 +6
Partials 7123 7123
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
/retest |
|
@jschnath: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Added in #14312 as a CI sanity check for IsRunningInContainer(). The test is inherently circular — it can only verify container detection by checking the same signals the function checks. Actual regression protection comes from local-roxctl bats tests which exercise the central generate command that depends on this. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Added in #14312 as a CI sanity check for IsRunningInContainer(). The test is inherently circular — it can only verify container detection by checking the same signals the function checks. Actual regression protection comes from local-roxctl bats tests which exercise the central generate command that depends on this. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Description
The
OutputZip()function in roxctl does not actually always output a zip file to stdout, even though it says that it does. However making it always do this could now pose a problem for existing docker setups using the logic ofroxctl central generate k8s pvcwhere is puts the output into an output path iffROX_ROXCTL_IN_MAIN_IMAGEis unset.But the output path is populated by default so checking if that's unset does not work. I propose fixing this problem by checking if we are running inside a docker container, and always outputting the zip to
STDOUTif we are not. That way the behavior ofroxctl central generate k8s pvcmatches its description.Alternative idea: Change the description of
roxctl central generate k8s pvcand explain that it only prints the output to STDOUT ifROX_ROXCTL_IN_MAIN_IMAGEis set, but I think that is the worse approach.User-facing documentation
Testing and quality
Automated testing
How I validated my change
Locally ran
roxctl central generate k8s pvc > pvc.zipand thenfile pvc.zipconfirming the file was not empty.