Skip to content

Remove unused advisor_engine_config API endpoint#1226

Open
jeremylenz wants to merge 1 commit into
theforeman:developfrom
jeremylenz:remove-dead-advisor-engine-config-endpoint
Open

Remove unused advisor_engine_config API endpoint#1226
jeremylenz wants to merge 1 commit into
theforeman:developfrom
jeremylenz:remove-dead-advisor-engine-config-endpoint

Conversation

@jeremylenz

Copy link
Copy Markdown
Collaborator

Summary

  • Remove the dead GET /api/v2/rh_cloud/advisor_engine_config endpoint (controller, route, permission entry)
  • Remove unused JS constants ADVISOR_ENGINE_CONFIG_KEY and ADVISOR_ENGINE_CONFIG_PATH
  • IoP detection was refactored in b53390f to use server-side page metadata (useForemanContext().metadata.foreman_rh_cloud.iop) instead of this API call, making the endpoint dead code

Test plan

  • bundle exec rake test:foreman_rh_cloud — 537 tests, 0 failures
  • npm test — 191 tests pass (3 pre-existing failures from missing Foreman mock modules)
  • grep -r "advisor_engine_config" confirms no remaining references

🤖 Generated with Claude Code

IoP detection was refactored in b53390f to use server-side page
metadata instead of this endpoint. The frontend now reads
useForemanContext().metadata.foreman_rh_cloud.iop, making the
GET /api/v2/rh_cloud/advisor_engine_config endpoint dead code.

Removes the controller, route, permission entry, and two unused
JS constants (ADVISOR_ENGINE_CONFIG_KEY, ADVISOR_ENGINE_CONFIG_PATH).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@nofaralfasi nofaralfasi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. Thanks @jeremylenz!

@jeremylenz

Copy link
Copy Markdown
Collaborator Author

waiting to merge until Robottelo automation is passing with PRT

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