Skip to content

[RHELC-1792] Allow using % character in convert2rhel.ini#1460

Open
bocekm wants to merge 1 commit into
oamg:mainfrom
bocekm:disable-interpolation-in-config-ini
Open

[RHELC-1792] Allow using % character in convert2rhel.ini#1460
bocekm wants to merge 1 commit into
oamg:mainfrom
bocekm:disable-interpolation-in-config-ini

Conversation

@bocekm
Copy link
Copy Markdown
Member

@bocekm bocekm commented Mar 14, 2025

Whenever a user entered the % character in the convert2rhel.ini config file, such as in the RHSM password, convert2rhel failed with an error:

configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: "%<STRING>"

The solution is to disable interpreting the % character as a sign for string replacement.

Related: https://access.redhat.com/solutions/7107977

Jira Issues:

Checklist

  • PR has been tested manually in a VM (either author or reviewer)
  • Jira issue has been made public if possible
  • [RHELC-] or [HMS-] is part of the PR title
  • Label depicting the kind of PR it is
  • PR title explains the change from the user's point of view
  • Code and tests are documented properly
  • The commits are squashed to as few commits as possible (without losing data)
  • When merged: Jira issue has been updated to Release Pending if relevant

@bocekm bocekm requested a review from a team as a code owner March 14, 2025 22:42
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.17%. Comparing base (3b44567) to head (8bafb75).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1460   +/-   ##
=======================================
  Coverage   96.17%   96.17%           
=======================================
  Files          73       73           
  Lines        5309     5312    +3     
  Branches      922      923    +1     
=======================================
+ Hits         5106     5109    +3     
  Misses        120      120           
  Partials       83       83           
Flag Coverage Δ
centos-linux-7 91.77% <50.00%> (-0.04%) ⬇️
centos-linux-8 92.60% <50.00%> (-0.04%) ⬇️
centos-linux-9 92.72% <50.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bocekm bocekm changed the title [RHELC-] Allow using % character in convert2rhel.ini [RHELC-1792] Allow using % character in convert2rhel.ini Mar 14, 2025
@Venefilyn Venefilyn added kind/bug-fix A bug has been fixed tests/sanity PR ready to run the sanity test suit. Equivalent to `/packit test --labels sanity`. labels Mar 15, 2025
@has-bot
Copy link
Copy Markdown
Member

has-bot commented Mar 15, 2025

/packit test --labels sanity


Comment generated by an automation.

@danmyway
Copy link
Copy Markdown
Member

/packit retest-failed

1 similar comment
@bocekm
Copy link
Copy Markdown
Member Author

bocekm commented Apr 23, 2025

/packit retest-failed

@bocekm
Copy link
Copy Markdown
Member Author

bocekm commented Apr 23, 2025

/packit copr-build

@bocekm
Copy link
Copy Markdown
Member Author

bocekm commented Apr 23, 2025

/packit test

@bocekm bocekm force-pushed the disable-interpolation-in-config-ini branch from 64c14d5 to 574a9dd Compare April 24, 2025 13:47
@bocekm
Copy link
Copy Markdown
Member Author

bocekm commented Apr 24, 2025

/packit test

@bocekm
Copy link
Copy Markdown
Member Author

bocekm commented Apr 24, 2025

/packit test --labels=sanity

@bocekm
Copy link
Copy Markdown
Member Author

bocekm commented Apr 24, 2025

/packit test --labels sanity

1 similar comment
@bocekm
Copy link
Copy Markdown
Member Author

bocekm commented Apr 29, 2025

/packit test --labels sanity

@bocekm bocekm force-pushed the disable-interpolation-in-config-ini branch from 574a9dd to 5af1c2f Compare May 5, 2026 16:38
@bocekm
Copy link
Copy Markdown
Member Author

bocekm commented May 5, 2026

/packit test --labels sanity

Whenever a user entered the % character in the convert2rhel.ini config
file, such as in the RHSM password, convert2rhel failed with an error:

configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: "%<STRING>"

The solution is to disable interpreting the % character as a sign for
string replacement.

Related: https://access.redhat.com/solutions/7107977
@bocekm bocekm force-pushed the disable-interpolation-in-config-ini branch from 5af1c2f to 8bafb75 Compare May 15, 2026 08:48
@bocekm
Copy link
Copy Markdown
Member Author

bocekm commented May 15, 2026

/packit test --labels sanity

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

Labels

kind/bug-fix A bug has been fixed tests/sanity PR ready to run the sanity test suit. Equivalent to `/packit test --labels sanity`.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants