Skip to content

allow downstream product overrides for features#503

Merged
evgeni merged 1 commit into
theforeman:masterfrom
bochi:allow-for-downstream-configs
May 29, 2026
Merged

allow downstream product overrides for features#503
evgeni merged 1 commit into
theforeman:masterfrom
bochi:allow-for-downstream-configs

Conversation

@bochi
Copy link
Copy Markdown
Contributor

@bochi bochi commented May 11, 2026

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

This allows downstream products to extend foremanctl without touching the actual files (features.yaml, foremanctl) As of now adding features requires patching the checkout

What are the changes introduced in this pull request?

  • foremanctl.py: load src/features.d/*.yaml if the directory exists

How to test this pull request

Steps to test:

  • Without creating overlays, test foremanctl, there is no change to the current behavior
  • Write features.d/whatever.yaml with feature: { description: my_great_feature } and try foremanctl features list
  • use OBSAH_ALLOW_EXTRA_VARS=true and set extra vars (-e var=value) and see if they are accepted

Checklist

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

with features_yaml.open() as features_file:
FEATURE_MAP = yaml.safe_load(features_file)

# load additional feature files under features.d
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.

this goes beyond the "override images" that is also (differently) solved in #501, which I think can be a very valuable addition outside the image context

@bochi bochi force-pushed the allow-for-downstream-configs branch from 9878b94 to 88fa077 Compare May 13, 2026 19:05
@bochi bochi changed the title allow downstream product overrides for features and images allow downstream product overrides for features May 13, 2026
@bochi bochi force-pushed the allow-for-downstream-configs branch from 88fa077 to ee15b6e Compare May 13, 2026 19:12
@evgeni evgeni force-pushed the allow-for-downstream-configs branch from ee15b6e to 0e50f0a Compare May 29, 2026 11:22
@evgeni
Copy link
Copy Markdown
Member

evgeni commented May 29, 2026

Tested this to create a Satellite-specific feature using foremanctl-3.0.0.develop-1.20260529112315925378.pr503.4.g0e50f0a.el9.noarch and it worked like a charm.

Thanks!

@evgeni evgeni merged commit c0d1468 into theforeman:master May 29, 2026
14 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.

2 participants