Skip to content

feat(info): display workflow image vetting settings#182

Merged
tiborsimko merged 2 commits into
reanahub:masterfrom
CameronMcClymont:vetted-containers
Jun 7, 2026
Merged

feat(info): display workflow image vetting settings#182
tiborsimko merged 2 commits into
reanahub:masterfrom
CameronMcClymont:vetted-containers

Conversation

@CameronMcClymont

Copy link
Copy Markdown
Member

@CameronMcClymont CameronMcClymont self-assigned this Jun 5, 2026
CameronMcClymont added a commit to CameronMcClymont/reana-client-go that referenced this pull request Jun 5, 2026
@codecov

codecov Bot commented Jun 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.20%. Comparing base (921b93b) to head (ee4735b).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            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              
Files with missing lines Coverage Δ
cmd/info.go 87.79% <100.00%> (+0.51%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

CameronMcClymont added a commit to CameronMcClymont/reana-client-go that referenced this pull request Jun 5, 2026
CameronMcClymont added a commit to CameronMcClymont/reana-client-go that referenced this pull request Jun 5, 2026
Comment thread cmd/info.go
if p.VettedContainerImagesEnabled.Value {
value = "True"
}
cmd.Printf("%s: %s\n", p.VettedContainerImagesEnabled.Title, value)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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.

Comment thread cmd/info.go
if p.VettedContainerImagesEnabled.Value {
value = "True"
}
cmd.Printf("%s: %s\n", p.VettedContainerImagesEnabled.Title, value)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 /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.

@tiborsimko

Copy link
Copy Markdown
Member

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: True

The 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

CameronMcClymont added a commit to CameronMcClymont/reana-client-go that referenced this pull request Jun 5, 2026
CameronMcClymont added a commit to CameronMcClymont/reana-client-go that referenced this pull request Jun 5, 2026
@tiborsimko tiborsimko merged commit ee4735b into reanahub:master Jun 7, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

validate: check workflow specification for unauthorised container images

2 participants