feat(info): display workflow image vetting settings#182
Conversation
190ee0f to
fbdf89f
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #182 +/- ##
==========================================
+ Coverage 87.17% 87.20% +0.02%
==========================================
Files 42 42
Lines 3814 3821 +7
==========================================
+ Hits 3325 3332 +7
Misses 387 387
Partials 102 102
🚀 New features to boost your workflow:
|
fbdf89f to
0cb83ac
Compare
| if p.VettedContainerImagesEnabled.Value { | ||
| value = "True" | ||
| } | ||
| cmd.Printf("%s: %s\n", p.VettedContainerImagesEnabled.Title, value) |
There was a problem hiding this comment.
🤖 Could add a false-valued fixture for vetted_container_images_enabled (NIT)
The current info fixture covers the True output. Since this is the first boolean-valued /info field handled by a one-off formatter, it would be useful to also assert the False rendering, e.g. in the missing-fields/small fixture or a tiny dedicated case.
Suggested fix — extend testdata/inputs/info_small.json with "vetted_container_images_enabled": {"value": false, "title": "Whether container image vetting is enabled"} and add "Whether container image vetting is enabled: False" to the missing fields expectations in cmd/info_test.go.
| if p.VettedContainerImagesEnabled.Value { | ||
| value = "True" | ||
| } | ||
| cmd.Printf("%s: %s\n", p.VettedContainerImagesEnabled.Title, value) |
There was a problem hiding this comment.
🤖 /info now mixes real booleans with string-encoded booleans (NIT, server-side)
vetted_container_images_enabled.value is a JSON boolean, while older toggles such as dask_enabled and interactive_sessions_custom_image_allowed remain "True"/"False" strings. The Go client handles this correctly here (hence the manual True/False conversion above), but it may be worth deciding on one convention for future /info fields.
Suggested fix — raise on reanahub/reana-server#739 (e.g. converge older toggles on BooleanInfoValue, or document the rationale). No change needed in this Go client PR.
|
BTW this is something for the REANA cluster (commons): the current output looks like: $ rcg info
...
List of container images allowed in user workflows: docker.io/library/python:2.7-slim, docker.io/library/python:2.8-slim
Whether container image vetting is enabled: TrueThe word "vetted" is used only once, even though the property is named that way, and also "Whether container..." reads a bit different from the rest such as Dask. What about printing: $ rcg info
...
Vetted container images required for user workflows: True
List of vetted container images allowed in user workflows: docker.io/library/python:2.7-slim, docker.io/library/python:2.8-slim |
0cb83ac to
2ebd3ff
Compare
2ebd3ff to
ee4735b
Compare
Closes reanahub/reana-server#728