Skip to content

Republish metadata via Hammer CLI - #4307

Merged
Lennonka merged 3 commits into
theforeman:masterfrom
ATIX-AG:republishing_via_cli
Oct 19, 2025
Merged

Lennonka merged 3 commits into
theforeman:masterfrom
ATIX-AG:republishing_via_cli

Conversation

@maximiliankolb

Copy link
Copy Markdown
Contributor

What changes are you introducing?

  • Rename existing modules
  • Add module to republish metadata by using Hammer CLI

Why are you introducing these changes? (Explanation, links to references, issues, etc.)

CLI procedures were missing.

Anything else to add? (Considerations, potential downsides, alternative solutions you have explored, etc.)

Republishing the metadata felt a bit weird to me. I would appreciate it if someone would rerun the commands on Foreman nightly or latest too.

Contributor checklists

  • I am okay with my commits getting squashed when you merge this PR.
  • I am familiar with the contributing guidelines.

Please cherry-pick my commits into:

  • Foreman 3.16/Katello 4.18 (Satellite 6.18)
  • Foreman 3.15/Katello 4.17
  • Foreman 3.14/Katello 4.16 (Satellite 6.17; orcharhino 7.4)
  • Foreman 3.13/Katello 4.15 (EL9 only)
  • Foreman 3.12/Katello 4.14 (Satellite 6.16; orcharhino 7.2 on EL9 only; orcharhino 7.3)
  • Foreman 3.11/Katello 4.13 (orcharhino 6.11 on EL8 only; orcharhino 7.0 on EL8+EL9; orcharhino 7.1 with Leapp)
  • Foreman 3.10/Katello 4.12
  • Foreman 3.9/Katello 4.11 (Satellite 6.15; orcharhino 6.8/6.9/6.10)
  • We do not accept PRs for Foreman older than 3.9.

@maximiliankolb maximiliankolb added this to the Managing content milestone Sep 25, 2025
@github-actions github-actions Bot added Needs tech review Requires a review from the technical perspective Needs style review Requires a review from docs style/grammar perspective Needs testing Requires functional testing labels Sep 25, 2025
@github-actions

github-actions Bot commented Sep 25, 2025 •

Copy link
Copy Markdown
Contributor

@Lennonka Lennonka left a comment

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.

I've requested testing of the commands. We should get an ack here.

@pr-processor pr-processor Bot added Waiting on contributor Requires an action from the author and removed Not yet reviewed labels Oct 7, 2025
You can republish repository metadata when a repository distribution does not have the content that should be distributed based on the contents of the repository.

Use this procedure with caution.
{Team} recommends a complete repository sync or publishing a new content view version to repair broken metadata.

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.

Should we avoid referencing CV since we are in the Republishing repository metadata by using CLI section?

Suggested change
{Team} recommends a complete repository sync or publishing a new content view version to repair broken metadata.
{Team} recommends a complete repository sync or metadata republish to repair broken metadata.

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 think this is exactly the point: You should not really (need to) do this: republish repo metadata. That's why this line mentions either doing a complete re-sync or publishing a new CV version.

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.

I agree with Max. I suggest no change.

@vsedmik vsedmik left a comment

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.

Tested the CLI commands work good. One proposal to consider posted above ^

@Lennonka Lennonka added testing done No issues from the functional perspective and removed Needs testing Requires functional testing labels Oct 7, 2025
@pr-processor pr-processor Bot added Needs re-review and removed Waiting on contributor Requires an action from the author labels Oct 8, 2025

@maximiliankolb maximiliankolb left a comment

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.

Rebased to HEAD of "master" and applied one suggestion.

You can republish repository metadata when a repository distribution does not have the content that should be distributed based on the contents of the repository.

Use this procedure with caution.
{Team} recommends a complete repository sync or publishing a new content view version to repair broken metadata.

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 think this is exactly the point: You should not really (need to) do this: republish repo metadata. That's why this line mentions either doing a complete re-sync or publishing a new CV version.

@Lennonka Lennonka left a comment

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.

LGTM

@Lennonka Lennonka added style review done No issues from docs style/grammar perspective and removed Needs style review Requires a review from docs style/grammar perspective labels Oct 9, 2025
@Lennonka

Lennonka commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

I don't think this needs an additional tech ack.

@Lennonka Lennonka removed the Needs tech review Requires a review from the technical perspective label Oct 9, 2025
+
[options="nowrap", subs="+quotes,attributes"]
----
$ hammer task list --search "Metadata generate repository"

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 already shows the STATE and RESULT columns so why is another info below needed?

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.

Thanks Ewoud, good catch! It's not needed -> Dropped in both procedures. I would also like to search for this pattern in a follow-up PR in all other CLI modules.

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.

It finally happened: #4396

This patch prepares the splitting the modules into WebUI and CLI
procedures.
Tested on Foreman 3.14/Katello 4.16
Based on "proc_recovering-a-corrupted-repository.adoc".
@Lennonka
Lennonka merged commit 2ce907e into theforeman:master Oct 19, 2025
10 checks passed
Lennonka pushed a commit that referenced this pull request Oct 19, 2025
* Rename modules about republishing metadata

This patch prepares the splitting the modules into WebUI and CLI
procedures.

* Add modules to republish metadata via CLI

Tested on Foreman 3.14/Katello 4.16

* Add introduction to republishing CV metadata

Based on "proc_recovering-a-corrupted-repository.adoc".
@Lennonka

Copy link
Copy Markdown
Contributor

Cherry picked:

@maximiliankolb
maximiliankolb deleted the republishing_via_cli branch October 20, 2025 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

style review done No issues from docs style/grammar perspective testing done No issues from the functional perspective

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants