Skip to content

Fixes #38938 - Add containerfile-install-command#1017

Merged
ianballou merged 1 commit into
Katello:mainfrom
pavanshekar:issue-38938
Dec 11, 2025
Merged

Fixes #38938 - Add containerfile-install-command#1017
ianballou merged 1 commit into
Katello:mainfrom
pavanshekar:issue-38938

Conversation

@pavanshekar
Copy link
Copy Markdown
Contributor

Added a new Hammer CLI command to generate Containerfile RUN commands from a host's transiently installed packages for bootc/image-mode systems.

Copy link
Copy Markdown
Member

@chris1984 chris1984 left a comment

Choose a reason for hiding this comment

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

Have not tested, code looks good

Copy link
Copy Markdown
Member

@qcjames53 qcjames53 left a comment

Choose a reason for hiding this comment

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

Hey Pavan. This works pretty well! I have a few suggestions surrounding flavor but nothing that changes your core functionality here.

Comment thread lib/hammer_cli_katello/host_package.rb Outdated
Comment thread lib/hammer_cli_katello/host_package.rb Outdated
Comment thread lib/hammer_cli_katello/host_package.rb Outdated
@pavanshekar pavanshekar changed the title Fixes #38938 - Add generate-bootc-command to fetch Containerfile RUN command Fixes #38938 - Add containerfile-install-command Dec 9, 2025
@pavanshekar
Copy link
Copy Markdown
Contributor Author

I have made the suggested changes and pushed the updated code

Copy link
Copy Markdown
Member

@qcjames53 qcjames53 left a comment

Choose a reason for hiding this comment

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

Your PR looks great to me. It works/fails correctly for many repos, no repos, missing hosts, and server errors. Approving.

While testing this, I also uncovered a bug with the API where only the first 20 repos are returned. I think this is my fault to be honest. I have full confidence your hammer command can handle 1000 repos no problem.

@chris1984
Copy link
Copy Markdown
Member

Looks good to me, will let @ianballou do a final look and merge

Copy link
Copy Markdown
Member

@ianballou ianballou left a comment

Choose a reason for hiding this comment

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

Small wording change to keep things consistent , looking good otherwise!

Comment thread lib/hammer_cli_katello/host_package.rb Outdated
end

class ContainerfileInstallCommand < HammerCLIKatello::Command
desc _("Generate a Containerfile RUN command from transiently installed packages on image-mode hosts")
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.

Suggested change
desc _("Generate a Containerfile RUN command from transiently installed packages on image-mode hosts")
desc _("Generate a Containerfile RUN command from transiently installed packages on image mode hosts")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have implemented the suggested changes.

Copy link
Copy Markdown
Member

@ianballou ianballou left a comment

Choose a reason for hiding this comment

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

Thanks!

@ianballou ianballou merged commit 7246d77 into Katello:main Dec 11, 2025
12 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.

4 participants