Skip to content

migrate a real-world example and map existing features - #1004

Draft
evgeni wants to merge 4 commits into
masterfrom
real-world-answers
Draft

evgeni wants to merge 4 commits into
masterfrom
real-world-answers

Conversation

@evgeni

@evgeni evgeni commented Nov 24, 2026

Copy link
Copy Markdown
Member

Why are you introducing these changes? (Problem description, related links)

What are the changes introduced in this pull request?

How to test this pull request

Steps to reproduce:

Checklist

  • Tests added/updated (if applicable)
  • Documentation updated (if applicable)

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

No actionable comments were generated in the recent review.

Walkthrough

The Katello installer-answer fixture expands to cover certificates, Foreman, Smart Proxy services and plugins, content services, and Katello. It also changes database values, the Pulp worker setting, and the Puppet setting.

Changes: Installer answers fixture

Layer / File(s) Summary
Foreman answers
tests/fixtures/installer-answers/katello-answers.yaml
Adds certificate, Foreman, CLI, compute-provider, and plugin answers. Foreman database host and port are blank, and adapter and pool settings are absent.
Smart Proxy services and plugins
tests/fixtures/installer-answers/katello-answers.yaml
Adds Smart Proxy service and feature answers, plus settings for Smart Proxy plugins.
Content services and Katello answers
tests/fixtures/installer-answers/katello-answers.yaml
Adds content-proxy and Pulp settings. Replaces pulp_worker_count: 2 with pulpcore_worker_count: 6. Katello database port and password are blank, and Puppet is set to false at the top level.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: ehelms

Merge Risk: Minimal · previous review 513e3

This change replaces a test fixture with a more realistic installer answers file. It does not affect production behavior, and no merge-blocking risk has been identified.

Pre-merge checks: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Description check Inconclusive The description contains only the unfilled template headings and checklist. It does not describe the problem, the changes, or how to test them. The description is therefore generic and does not convey… Fill in the template sections. Describe why the katello-answers.yaml fixture is replaced with a real-world example, list the key changes (for example, the database settings removed, pulpcore_worker_count replacing pulp_worker_count, and the…
Passed Passed checks: 3 passed

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title "migrate a real-world example and map existing features" is partially related to the change. The PR replaces the Katello installer answers fixture with an expanded, real-world style answers …
Full details: Title check

Explanation

The title "migrate a real-world example and map existing features" is partially related to the change. The PR replaces the Katello installer answers fixture with an expanded, real-world style answers file, which matches the migrate-example part. The mapping of existing features is only loosely reflected in the diff. The title is somewhat broad but refers to a real aspect of the change, and it does not describe anything absent from the changeset.

Full details: Description check

Explanation

The description contains only the unfilled template headings and checklist. It does not describe the problem, the changes, or how to test them. The description is therefore generic and does not convey meaningful information about the changeset. Its only link to the change is the template text, which is not substantive.

Resolution

Fill in the template sections. Describe why the katello-answers.yaml fixture is replaced with a real-world example, list the key changes (for example, the database settings removed, pulpcore_worker_count replacing pulp_worker_count, and the puppet setting change), and explain how to test the change.

Finishing Touches

Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 96e54357-ecc2-403b-9557-4b74f03e3186
Commits

Reviewing files that changed from the base of the PR and between 9fe033e and 513e3fc.

Files selected for processing: 1

  • tests/fixtures/installer-answers/katello-answers.yaml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@evgeni
evgeni force-pushed the real-world-answers branch from 28c1b45 to 513e3fc Compare November 24, 2026 15:05
tar_file:
foreman:
db_host: localhost
db_port: 5432

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.

Why did this and the other port value disappeared? Just weird given that the file stores passwords even...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Because the real default values are undef in Puppet

@evgeni
evgeni marked this pull request as draft November 24, 2026 15:27
@evgeni
evgeni force-pushed the real-world-answers branch 3 times, most recently from 04b627f to 258b50a Compare November 25, 2026 08:26
@evgeni evgeni changed the title Replace answers fixture with a real world example migrate a real-world example and map existing features Nov 25, 2026
Comment thread src/plugins/modules/migrate_answers.py Resolved
Comment thread src/plugins/modules/migrate_answers.py Resolved
--add-feature remote-execution \
--add-feature webhooks \
--add-feature tftp \
--tftp-servername quadlet.example.com

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

how do we get this value now?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

which? the tftp server name?

it gets migrated from the answers:

('foreman_proxy', 'tftp_servername'): 'foreman_proxy_tftp_servername',

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

(well, or in the case of this particular PR: the answer is empty, so it doesn't get set and then Foreman defaults to the hostname of the Proxy)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yeah, that tftp-servername

@arvind4501

Copy link
Copy Markdown
Contributor

can we also migrate bmc feature by mocking answers file

@evgeni

evgeni commented Nov 27, 2026

Copy link
Copy Markdown
Member Author

can we also migrate bmc feature by mocking answers file

absolutely. the system I copied the file from didn't have bmc enabled, so I didn't invest time in it.

see this whole PR more as "this is how the functionality can be used to migrate individual features", not "all features are migrated properly"

@evgeni
evgeni force-pushed the real-world-answers branch from 84842af to 3067132 Compare November 27, 2026 10:23
@evgeni
evgeni force-pushed the real-world-answers branch from 3067132 to a372ff6 Compare November 27, 2026 10:27
@evgeni

evgeni commented Nov 27, 2026

Copy link
Copy Markdown
Member Author

there we go, added bmc and a content proxy answers file

dns_forwarders: []
libvirt_network: default
libvirt_connection: qemu:///system
bmc: false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

bmc is false here, if the feature is not enabled how can we expect it in mapped feature? sorry if i missed something

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

migrate_test.py has tests that use a full file, and some that use a pre-created stub.

only the later ones assert that the feature is mapped

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.

3 participants