Skip to content

Fixes #39414 - Show unrecognized smart proxy features in list and info#656

Merged
ofedoren merged 4 commits into
theforeman:masterfrom
adamruzicka:unknown-proxy-features
Jun 22, 2026
Merged

Fixes #39414 - Show unrecognized smart proxy features in list and info#656
ofedoren merged 4 commits into
theforeman:masterfrom
adamruzicka:unknown-proxy-features

Conversation

@adamruzicka

@adamruzicka adamruzicka commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Companion to theforeman/foreman#11017

Display unrecognized_features from the Foreman API response in both the list and info commands, hidden when blank.

# bundle exec ruby bin/hammer proxy list
---|-----------|-----------------------|-----------------------|----------------------
ID | NAME      | URL                   | FEATURES              | UNRECOGNIZED FEATURES
---|-----------|-----------------------|-----------------------|----------------------
1  | localhost | http://localhost:8000 | Dynflow, Script, Logs | openscap
---|-----------|-----------------------|-----------------------|----------------------
# bundle exec ruby bin/hammer proxy info --id 1
Id:                    1
Name:                  localhost
URL:                   http://localhost:8000
Unrecognized features: openscap
Host count:            0
Features:
 1) Name: Dynflow
 2) Name: Script
 3) Name: Logs
Unrecognized features: openscap
Locations:
    Default Location
Organizations:
    Default Organization
Created at:            2026/01/05 13:23:58
Updated at:            2026/06/10 13:43:27

To be squashed on merge

@ofedoren

Copy link
Copy Markdown
Member

Just a nit:

Features:
 1) Name: Dynflow
 2) Name: Script
 3) Name: Logs
Unrecognized features: openscap

Can we unify the output? I mean either it's just a comma-separated list or "numerized lines", having both feels weird.

Display unrecognized_features from the Foreman API response in both
the list and info commands, hidden when blank.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@adamruzicka adamruzicka force-pushed the unknown-proxy-features branch from ac1725f to aa67933 Compare June 10, 2026 14:46
@adamruzicka adamruzicka changed the title Fixes #XXXXX - Show unrecognized smart proxy features in list and info Fixes #39414 - Show unrecognized smart proxy features in list and info Jun 10, 2026
@adamruzicka

Copy link
Copy Markdown
Contributor Author

Unified

# bundle exec ruby bin/hammer proxy info --id 1
Id:                    1
Name:                  localhost
URL:                   http://localhost:8000
Unrecognized features: openscap
Host count:            0
Features:
 1) Name: Dynflow
 2) Name: Script
 3) Name: Logs
Unrecognized features:
 1) Name: openscap
Locations:
    Default Location
Organizations:
    Default Organization
Created at:            2026/01/05 13:23:58
Updated at:            2026/06/10 13:43:27

@adamruzicka

Copy link
Copy Markdown
Contributor Author

And now even without listing the unrecognized features twice

# bundle exec ruby bin/hammer proxy info --id 1
Id:                    1
Name:                  localhost
URL:                   http://localhost:8000
Host count:            0
Features:
 1) Name: Dynflow
 2) Name: Script
 3) Name: Logs
Unrecognized features:
 1) Name: openscap
Locations:
    Default Location
Organizations:
    Default Organization
Created at:            2026/01/05 13:23:58
Updated at:            2026/06/10 13:43:27

Comment thread lib/hammer_cli_foreman/smart_proxy.rb
Comment thread lib/hammer_cli_foreman/smart_proxy.rb
@adamruzicka adamruzicka marked this pull request as ready for review June 12, 2026 12:39
@ofedoren ofedoren self-assigned this Jun 18, 2026

@ofedoren ofedoren left a comment

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.

Thanks, @adamruzicka !

Works as expected:

$ hm proxy list
---|----------------------|-----------------------------------|--------------|----------------------
ID | NAME                 | URL                               | FEATURES     | UNRECOGNIZED FEATURES
---|----------------------|-----------------------------------|--------------|----------------------
1  | foreman.ofedoren.com | https://foreman.ofedoren.com:9090 | Dynflow, ... | myfeature            
---|----------------------|-----------------------------------|--------------|----------------------
$ hm proxy info --id 1
Id:                    1
Name:                  foreman.ofedoren.com
URL:                   https://foreman.ofedoren.com:9090
Host count:            8
Features:              
 1) Name: Dynflow
# ...
Unrecognized features: 
 1) Name: myfeature
Locations:             
    Default Location
Organizations:         
    Default Organization
Created at:            2024/08/20 10:37:13
Updated at:            2026/06/22 14:41:54
$ hm --output yaml proxy list
---
- Id: 1
  Name: foreman.ofedoren.com
  URL: https://foreman.ofedoren.com:9090
  Features:
  - Dynflow
# ...
  Unrecognized features:
  - myfeature

Regarding missing tests: well, it would be nice to have them, but I don't see any decent existing test anyway, it would require us to cover everything instead of just unrecognized feature thingy, so it's up to you.

Also, it's worth to mention that we have now a new string to extract, so we could do it here or hope that maintainers still do that :)

P.S. I've noticed that we have really outdated test/data, so I'll probably open a maintenance PR, maybe include the i18n extraction there.

@ofedoren ofedoren merged commit 96051dc into theforeman:master Jun 22, 2026
8 checks passed
@adamruzicka adamruzicka deleted the unknown-proxy-features branch June 23, 2026 06:59
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.

2 participants