Skip to content

Fixes #39717 - Prepare for the upcoming remediation changes - #178

Open
michalgritzbach wants to merge 1 commit into
theforeman:masterfrom
michalgritzbach:39717-remediation-command-changes
Open

michalgritzbach wants to merge 1 commit into
theforeman:masterfrom
michalgritzbach:39717-remediation-command-changes

Conversation

@michalgritzbach

Copy link
Copy Markdown
Contributor

Makes sure that preupgrade report entries are prepared for remediation quotation changes that landed in leapp 0.22.0 (oamg/leapp-repository#1520).

@michalgritzbach
michalgritzbach force-pushed the 39717-remediation-command-changes branch from 2cc1ef0 to 8ce7449 Compare August 31, 2026 14:02
@pirat89

pirat89 commented Sep 3, 2026

Copy link
Copy Markdown

@michalgritzbach seems good to me. I could not went through the whole code in details due to limited time now (I haven't seen ruby for 10+ years so I am slow) but so far the solution seems to do what I would expect based on the code.

Comment thread app/views/foreman_leapp/job_templates/leapp_preupgrade.erb

@adamruzicka adamruzicka 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 like the general approach, left some minor comments inline

Comment thread app/lib/foreman_leapp/remediation_plan.rb Outdated
Comment thread app/lib/actions/foreman_leapp/preupgrade_job.rb Outdated
Comment thread app/lib/foreman_leapp/remediation_plan.rb Outdated
# Unknown versions are treated as old leapp, so that reports collected
# before the version was recorded keep rendering the way they used to.
def quoted_by_leapp?(leapp_version)
version = Gem::Version.new(leapp_version.to_s[/\A[0-9][0-9.]*/].to_s.chomp('.'))

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.

This would mean parsing the version over and over again for every preupgrade report entry. Could we do it just per remediation report?

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.

That's not quite it, is it? It now lives in RemediationPlan.build, but that is still called separately for each entry of the preupgrade report

@michalgritzbach
michalgritzbach force-pushed the 39717-remediation-command-changes branch from 8ce7449 to ab411b1 Compare September 14, 2026 09:02
@michalgritzbach
michalgritzbach force-pushed the 39717-remediation-command-changes branch from ab411b1 to 6558b79 Compare September 29, 2026 10:12

This branch has not been deployed

No deployments
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