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

Drop the commit progress spinner, instead everything is handled under "solve" #3459

Merged
merged 6 commits into from
Aug 22, 2024

Conversation

Naatan
Copy link
Member

@Naatan Naatan commented Aug 21, 2024

StoryDX-3016 We have a multi-spinner implementation

Note I had initially implemented the multi-spinner, you can still see it in the first commit. I ended up reverting this for a few reasons:

  • Handling multiple spinners adds a lot of complications
    • A lot of work to implement ourselves. Can use existing lib (mpb) but have to deal with its limitations.
    • Needs special non-interactive handling (example of something not handled by mpb).
    • Needs color-awareness; which works independently from our color mechanic.
    • Bridging the common use-cases of grouped spinners, single spinners and then non-interactive variants of those two adds a lot of architectural complexity.
  • The UI/UX for interactive spinners is a bit awkward. We are committing and resolving dependencies at the same time. This distinction makes little sense to end-users and will just raise eyebrows.
  • The UI/UX for non-interactive will be horribly handicapped, because we cannot show progress for two distinct indicators as it is non-interactive.

Add all this up and I figured we should just be avoiding this altogether at least for our current use-case. Instead I have gotten rid of the commit spinner. There is just the "Resolving Dependencies" spinner now, which also covers the commit stage.

Additionally, I noticed non-interactive was using "frames" which do not apply in non-interactive mode. So I fixed that.

@github-actions github-actions bot changed the base branch from master to version/0-46-0-RC1 August 21, 2024 21:51
@Naatan Naatan requested a review from MDrakos August 21, 2024 21:58
Copy link
Member

@MDrakos MDrakos left a comment

Choose a reason for hiding this comment

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

This looks good to me however the conflicting spinners in the original ticket are located in the import running starting here: https://github.com/ActiveState/cli/blob/version/0-46-0-RC1/internal/runners/packages/import.go#L138

I didn't realize that we also had this in the requirement operation function so it's good you caught that but we should also address the spinners in the import runner. This will likely affect the integration tests as the are relying on a Done message.

@Naatan Naatan requested a review from MDrakos August 22, 2024 16:44
MDrakos
MDrakos previously approved these changes Aug 22, 2024
Naatan added 2 commits August 22, 2024 10:09
# Conflicts:
#	internal/runbits/runtime/requirements/requirements.go
#	internal/runners/packages/import.go
@Naatan Naatan merged commit cd58629 into version/0-46-0-RC1 Aug 22, 2024
7 checks passed
@Naatan Naatan deleted the DX-3016 branch August 22, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants