Skip to content

Conversation

@nhz2
Copy link
Member

@nhz2 nhz2 commented Aug 26, 2024

This PR replaces the artifact download progress bar with a status message if an installation step takes over half a second.

Here the unpacking step for Qt6Base takes over half a second.

This is required for #4001, where installing may take up to 60 seconds on some systems.

screencast.mp4

print_lock = Base.ReentrantLock() # for non-fancyprint printing

# name -> (state, bar) where state is :ready, :running, :done, or :failed
download_states = Dict{String, DownloadState}()
Copy link
Member Author

Choose a reason for hiding this comment

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

Artifact names are not globally unique, so I changed the key to the artifact tree hash.

@nhz2
Copy link
Member Author

nhz2 commented Aug 26, 2024

This is what I get on my Windows laptop, where installing and unpacking are much slower.

status.messages.-.Made.with.Clipchamp.mp4

@nhz2 nhz2 marked this pull request as ready for review August 26, 2024 02:11
@nhz2 nhz2 requested a review from IanButterworth August 26, 2024 02:11
Copy link
Member

@IanButterworth IanButterworth left a comment

Choose a reason for hiding this comment

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

Looks great

Comment on lines +893 to +894
dstate.state = :failed
rethrow()
Copy link
Member

Choose a reason for hiding this comment

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

Should we set progress status to failed here and keep failed jobs around in the list until all complete/failed?

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried this but got strange formatting when many artifacts failed to install.

 Installing artifacts ╸━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/83
  XML2                     failed
  Qt6Wayland               failed
  Gettext                  failed
  Xorg_xcb_util_wm         failed
  Libuuid                  failed
  EarCut                   failed
  Xorg_xcb_util            failed
  Vulkan_Loader            failed
 Installing artifacts ╸━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/83
  XML2                     failed
  Qt6Wayland               failed
  Gettext                  failed
 Installing artifacts ╸━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/83
 Installing artifacts ╸━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/83
  XML2                     failed
 Installing artifacts ╸━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/83
  XML2                     failed
 Installing artifacts ╸━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/83

Copy link
Member

Choose a reason for hiding this comment

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

Just need to change the counting of rows to include to include :failed

Copy link
Member Author

Choose a reason for hiding this comment

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

Is it an issue if more rows than can fit in the terminal are printed?

@KristofferC
Copy link
Member

It's unclear to me what "installing" refers to here. The whole process of downloading, unpacking etc is installing to me. Could that be made more precise?

@KristofferC
Copy link
Member

Maybe the "Downloading artifacts" should be changed to "Installing artifacts" to show that it encompasses the whole procedure.

@nhz2
Copy link
Member Author

nhz2 commented Aug 28, 2024

Here is what the new version looks like.

screencast.-.Made.with.Clipchamp.mp4

@IanButterworth IanButterworth merged commit 621740f into JuliaLang:master Aug 30, 2024
@nhz2 nhz2 deleted the nz/artifact-status-messages branch August 31, 2024 01:21
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.

3 participants