Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

offline transactions: Keep user informed about scriptlet execution #2087

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

m-blaha
Copy link
Member

@m-blaha m-blaha commented Feb 25, 2025

Scriptlet execution can take a significant amount of time. Inform the user when
it starts.

Resolves: #1667

@m-blaha m-blaha force-pushed the mblaha/system-upgrade-scriptlets branch 7 times, most recently from e7b05ad to f1d20bf Compare February 27, 2025 13:16
@m-blaha m-blaha marked this pull request as ready for review February 27, 2025 13:18
@m-blaha m-blaha requested a review from a team as a code owner February 27, 2025 13:18
@m-blaha m-blaha requested review from pkratoch and removed request for a team February 27, 2025 13:18
@evan-goode evan-goode self-requested a review February 27, 2025 14:09
@evan-goode
Copy link
Member

I believe this will resolve https://bugzilla.redhat.com/show_bug.cgi?id=2345905.

@m-blaha m-blaha force-pushed the mblaha/system-upgrade-scriptlets branch 2 times, most recently from 85e855f to 969d19a Compare February 28, 2025 12:53
It's '--ping', not 'ping'.
The `amount` parameter counts transaction items starting from 0, but for
humans, it's more natural to start from 1.
Scriptlet execution can take a significant amount of time. Inform the
user when it starts.

Fixes: #1667
The mode is set to "system-upgrade" for upgrading to the next
distribution version, and to "updates" for general offline transaction
execution.
Also the plymouth message is adjusted according to the mode.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2345905
@m-blaha m-blaha force-pushed the mblaha/system-upgrade-scriptlets branch from 969d19a to 034e867 Compare February 28, 2025 13:53
Copy link
Member

@evan-goode evan-goode left a comment

Choose a reason for hiding this comment

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

LGTM. Though personally, I would rather have the progress bar just hang at 95% than try to guess progress using the hardcoded estimated scriptlet count. A typical system-upgrade might have 40 scriptlets but a smaller offline transaction might have only a couple. I guess a progress bar that is incrementing steadily and then jumps to 100% is better than a progress bar that hangs at 95%... but to me it still feels like a hack that's not really worth it. Users at this point are pretty used to progress bars hanging and jumping around.

I tested a F41->F42 upgrade and the post-transaction scriptlets took ~40 seconds out of the ~7min total.

There is no reliable way to estimate the number of post-transaction
scriptlets that will be executed.
The progress bar will now remain at 95% during scriptlet execution and
then jump to 100% once the transaction completes.
@m-blaha m-blaha force-pushed the mblaha/system-upgrade-scriptlets branch from 034e867 to 73f8a9a Compare March 5, 2025 06:22
@m-blaha
Copy link
Member Author

m-blaha commented Mar 5, 2025

Sure, it was just an idea worth trying. You are right that this hack is unnecessary and unreliable. I've replaced it with reserving the last 5% of the progress bar for the scriptlets execution.

@m-blaha
Copy link
Member Author

m-blaha commented Mar 5, 2025

We send to plymouth messages like "Running post transaction scriptlet: PKG...". I'll file an RFE issue with the plymouth whether it would be possible to adjust the default Fedora theme to show both - the progress bar, and also the messages (which are currently hidden).

@m-blaha
Copy link
Member Author

m-blaha commented Mar 5, 2025

RFE for the plymouth: https://bugzilla.redhat.com/show_bug.cgi?id=2350048

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.

system-upgrade download provides confusing output and stuck at some point
2 participants