Skip to content

[update] change Error: to Warning: for failed attempt to upgrade flake #1773

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

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

savil
Copy link
Collaborator

@savil savil commented Feb 1, 2024

Summary

When I modified the examples/flakes/php to omit ds extension and did devbox update, then the output alarmed me at first.

The Error made me think something drastic went wrong. But in this case, since its an "attempt", I think we should
make it a Warning or even an Info.

❯ devbox update
Info: Attempting to upgrade path:my-php-flake#php using `nix profile upgrade`
Error: Failed to upgrade path:my-php-flake#php using `nix profile upgrade`: php: package not found
Info: Attempting to upgrade path:my-php-flake#hello using `nix profile upgrade`
Error: Failed to upgrade path:my-php-flake#hello using `nix profile upgrade`: hello: package not found
Info: Already up-to-date ripgrep@latest 14.1.0
[1/2] php
[1/2] php: Success
[2/2] hello
[2/2] hello: Success
✓ Computed the Devbox environment.
Info: Removing [email protected]
Warning: Your shell environment may be out of date. Run `refresh` to update it.
Info: Running "nix flake update"
(devbox)

How was it tested?

❯ devbox update
Info: Attempting to upgrade path:my-php-flake#php using `nix profile upgrade`
Warning: Failed to upgrade path:my-php-flake#php using `nix profile upgrade`: php: package not found
Info: Attempting to upgrade path:my-php-flake#hello using `nix profile upgrade`
Warning: Failed to upgrade path:my-php-flake#hello using `nix profile upgrade`: hello: package not found
Info: Already up-to-date ripgrep@latest 14.1.0
[1/2] php
[1/2] php: Success
[2/2] hello
[2/2] hello: Success
✓ Computed the Devbox environment.
Info: Removing [email protected]
Warning: Your shell environment may be out of date. Run `refresh` to update it.
Info: Running "nix flake update"
(devbox)

Copy link
Collaborator Author

savil commented Feb 1, 2024

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@savil savil requested review from mikeland73 and Lagoja February 1, 2024 19:20
@Lagoja
Copy link
Contributor

Lagoja commented Feb 1, 2024

Why does the warning show at all if you're running devbox update?

@savil
Copy link
Collaborator Author

savil commented Feb 1, 2024

Why does the warning show at all if you're running devbox update?

its being transparent about what specifically we're trying to update and if it worked or didn't?

Copy link
Contributor

@mikeland73 mikeland73 left a comment

Choose a reason for hiding this comment

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

Did we decide this can be removed? We need to ensure nix build creates the latest version of a flake (I assume it does) in which case we no longer need to upgrade flakes.

Copy link
Contributor

@mikeland73 mikeland73 left a comment

Choose a reason for hiding this comment

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

.

@savil
Copy link
Collaborator Author

savil commented Feb 2, 2024

@mikeland73 lets not conflate two different discussions. I need to investigate whether this code is still needed. That will take some time given my other commitments. In the meantime, we should fix this misleading "Error:" message.

@savil savil requested a review from mikeland73 February 2, 2024 18:19
@savil savil merged commit 6d9ea74 into main Feb 2, 2024
@savil savil deleted the savil/attempt-flake-warning branch February 2, 2024 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants