Skip to content

Add matching .fXX suffixes to generator.py - #430

Open
pkhartsk wants to merge 1 commit into
sclorg:masterfrom
pkhartsk:add-fxx-to-generator
Open

Add matching .fXX suffixes to generator.py#430
pkhartsk wants to merge 1 commit into
sclorg:masterfrom
pkhartsk:add-fxx-to-generator

Conversation

@pkhartsk

@pkhartsk pkhartsk commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Main purpose is to enable easy distgenification of the base and core containers. Added a new statement to filename_to_distro_config()

Summary by CodeRabbit

  • Bug Fixes
    • Fedora base and core image filenames using the *.f<NUM> format are now recognized correctly.
    • These filenames are now mapped to the appropriate Fedora distribution configuration for image generation.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

filename_to_distro_config() recognizes Fedora base/core image filenames ending in .f<NUM>, maps them to fedora-<NUM>-x86_64.yaml, and includes the new pattern in unknown-suffix errors.

Changes

Fedora configuration mapping

Layer / File(s) Summary
Fedora suffix resolution
generator.py
Detects .f<NUM> filenames, returns the corresponding Fedora distgen configuration, and updates the fallback error message.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: frenzymadness

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding .fXX suffix matching in generator.py.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown

Pull Request validation

Failed

🔴 Failed or pending statuses:

  • Testing Farm - RHEL11 - postgresql-container[error]
  • Testing Farm - RHEL10 - postgresql-container[error]
  • Testing Farm - RHEL11 - s2i-perl-container[error]
  • Testing Farm - RHEL10 - s2i-perl-container[error]
  • Testing Farm - RHEL10 - s2i-base-container[error]
  • Testing Farm - RHEL10 - s2i-python-container[error]
  • Testing Farm - RHEL9 - postgresql-container[error]
  • Testing Farm - RHEL11 - s2i-base-container[error]
  • Testing Farm - RHEL11 - nginx-container[error]
  • Testing Farm - RHEL9 - s2i-base-container[error]
  • Testing Farm - RHEL9 - s2i-perl-container[error]
  • Testing Farm - RHEL10 - nginx-container[error]
  • Testing Farm - RHEL11 - s2i-python-container[error]
  • Testing Farm - RHEL9 - nginx-container[error]
  • Testing Farm - RHEL9 - s2i-python-container[error]
  • Testing Farm - RHEL8 - s2i-python-container[pending]
  • Testing Farm - CentOS Stream 9 - s2i-python-container[pending]
  • Testing Farm - CentOS Stream 10 - s2i-python-container[pending]

Success

🟢 Review - Reviewed by a member
🟢 Approval - Changes were approved


Triggered by Workflow Run

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@generator.py`:
- Around line 100-101: Update the relevant function’s docstring and
unmatched-suffix diagnostic to include the newly supported .f<NUM> pattern
alongside .rhelXX, .cXs, and .fedora. Keep the existing validation behavior
unchanged; only expand the documented and reported accepted suffixes.
- Around line 100-101: Update the fedora_match branch in main() to verify that
the generated Fedora config exists in mapping[version] before assigning or
returning it; return "" when the selected multispec does not contain that
config, while preserving the existing config value for supported images.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8d85e3f1-410b-4c20-9db4-8d0ebe17e949

📥 Commits

Reviewing files that changed from the base of the PR and between 498153e and 78b0077.

📒 Files selected for processing (1)
  • generator.py

Comment thread generator.py Outdated
@phracek

phracek commented Jul 27, 2026

Copy link
Copy Markdown
Member

[test]

@phracek phracek 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.

LGTM

@phracek

phracek commented Jul 27, 2026

Copy link
Copy Markdown
Member

@pkhartsk There is sanity error

pre-commit run --all
[INFO] Initializing environment for https://github.com/ambv/black.
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[WARNING] repo `[https://github.com/pre-commit/pre-commit-hooks`](https://github.com/pre-commit/pre-commit-hooks%60) uses deprecated stage names (commit, push) which will be removed in a future version.  Hint: often `pre-commit autoupdate --repo [https://github.com/pre-commit/pre-commit-hooks`](https://github.com/pre-commit/pre-commit-hooks%60) will fix this.  if it does not -- consider reporting an issue to that repo.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-mypy.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-mypy:types-PyYAML.
[INFO] Installing environment for https://github.com/ambv/black.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/mirrors-mypy.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
black....................................................................Failed
- hook id: black
- files were modified by this hook

reformatted generator.py

All done! ✨ 🍰 ✨
1 file reformatted, 4 files left unchanged.

Check for merge conflicts................................................Passed
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
mypy.....................................................................Passed
make: *** [Makefile:32: pre-commit-check] Error 1

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

Testing Farm results

namecomposearchstatusstarted (UTC)timelogs
RHEL11 - postgresql-containerRHEL-10-Nightlyx86_64❌ error27.07.2026 12:30:357min 34stest pipeline
RHEL10 - postgresql-containerRHEL-10-Nightlyx86_64❌ error27.07.2026 12:30:377min 23stest pipeline
RHEL10 - s2i-base-containerRHEL-10-Nightlyx86_64❌ error27.07.2026 12:30:3710min 45stest pipeline
RHEL10 - s2i-perl-containerRHEL-10-Nightlyx86_64❌ error27.07.2026 12:30:359min 28stest pipeline
RHEL9 - nginx-containerRHEL-9.6.0-Nightlyx86_64❌ error27.07.2026 12:54:557min 5stest pipeline
RHEL9 - s2i-perl-containerRHEL-9.6.0-Nightlyx86_64❌ error27.07.2026 12:30:3516min 55stest pipeline
RHEL9 - s2i-base-containerRHEL-9.6.0-Nightlyx86_64❌ error27.07.2026 12:38:597min 12stest pipeline
RHEL9 - postgresql-containerRHEL-9.6.0-Nightlyx86_64❌ error27.07.2026 12:30:3512min 17stest pipeline
Fedora - s2i-base-containerFedora-latestx86_64✅ passed27.07.2026 12:30:3713min 1stest pipeline
Fedora - nginx-containerFedora-latestx86_64✅ passed27.07.2026 12:30:3612min 42stest pipeline
CentOS Stream 11 - s2i-perl-containerCentOS-Stream-10x86_64✅ passed27.07.2026 12:43:5313min 23stest pipeline
RHEL11 - s2i-perl-containerRHEL-10-Nightlyx86_64❌ error27.07.2026 12:30:368min 22stest pipeline
RHEL9 - s2i-python-containerRHEL-9.6.0-Nightlyx86_64❌ error27.07.2026 12:54:557min 20stest pipeline
CentOS Stream 10 - postgresql-containerCentOS-Stream-10x86_64✅ passed27.07.2026 12:30:3720min 53stest pipeline
RHEL11 - nginx-containerRHEL-10-Nightlyx86_64❌ error27.07.2026 12:40:595min 59stest pipeline
CentOS Stream 11 - postgresql-containerCentOS-Stream-10x86_64✅ passed27.07.2026 12:30:3513min 26stest pipeline
CentOS Stream 10 - s2i-perl-containerCentOS-Stream-10x86_64✅ passed27.07.2026 12:30:3523min 5stest pipeline
Fedora - postgresql-containerFedora-latestx86_64✅ passed27.07.2026 12:30:3523min 47stest pipeline
CentOS Stream 11 - s2i-base-containerCentOS-Stream-10x86_64✅ passed27.07.2026 12:44:5913min 31stest pipeline
CentOS Stream 11 - nginx-containerCentOS-Stream-10x86_64✅ passed27.07.2026 12:43:2813min 21stest pipeline
RHEL10 - nginx-containerRHEL-10-Nightlyx86_64❌ error27.07.2026 12:45:095min 23stest pipeline
CentOS Stream 10 - s2i-base-containerCentOS-Stream-10x86_64✅ passed27.07.2026 12:52:5813min 22stest pipeline
CentOS Stream 11 - s2i-python-containerCentOS-Stream-10x86_64✅ passed27.07.2026 12:51:0112min 25stest pipeline
RHEL10 - s2i-python-containerRHEL-10-Nightlyx86_64❌ error27.07.2026 12:31:3210min 23stest pipeline
CentOS Stream 9 - nginx-containerCentOS-Stream-9x86_64✅ passed27.07.2026 12:30:3818min 8stest pipeline
CentOS Stream 9 - s2i-perl-containerCentOS-Stream-9x86_64✅ passed27.07.2026 12:44:5524min 13stest pipeline
CentOS Stream 10 - nginx-containerCentOS-Stream-10x86_64✅ passed27.07.2026 12:30:3514min 30stest pipeline
CentOS Stream 9 - postgresql-containerCentOS-Stream-9x86_64✅ passed27.07.2026 12:47:2230min 28stest pipeline
CentOS Stream 9 - s2i-base-containerCentOS-Stream-9x86_64✅ passed27.07.2026 12:47:1816min 35stest pipeline
RHEL8 - s2i-base-containerRHEL-8.10.0-Nightlyx86_64✅ passed27.07.2026 12:30:3736min 33stest pipeline
RHEL8 - postgresql-containerRHEL-8.10.0-Nightlyx86_64✅ passed27.07.2026 12:44:4940min 53stest pipeline
RHEL8 - s2i-perl-containerRHEL-8.10.0-Nightlyx86_64✅ passed27.07.2026 12:47:0747min 21stest pipeline
Fedora - s2i-perl-containerFedora-latestx86_64✅ passed27.07.2026 12:46:5739min 51stest pipeline
CentOS Stream 10 - s2i-python-containerCentOS-Stream-10x86_64✅ passed27.07.2026 12:48:551h 15min 24stest pipeline
Fedora - s2i-python-containerFedora-latestx86_64✅ passed27.07.2026 12:30:401h 3min 44stest pipeline
RHEL8 - s2i-python-containerRHEL-8.10.0-Nightlyx86_64✅ passed27.07.2026 12:30:361h 18min 20stest pipeline
CentOS Stream 9 - s2i-python-containerCentOS-Stream-9x86_64✅ passed27.07.2026 12:40:531h 26min 15stest pipeline
RHEL11 - s2i-base-containerRHEL-10-Nightlyx86_64❌ error27.07.2026 12:38:506min 20stest pipeline
RHEL11 - s2i-python-containerRHEL-10-Nightlyx86_64❌ error27.07.2026 12:51:245min 24stest pipeline
RHEL8 - nginx-containerRHEL-8.10.0-Nightlyx86_64✅ passed27.07.2026 12:30:3540min 44stest pipeline

Main purpose is to enable easy distgenification of the
base and core containers. Added a new statement to
filename_to_distro_config()
@phracek

phracek commented Jul 27, 2026

Copy link
Copy Markdown
Member

[test]

@phracek phracek 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.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants