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

attic-client/push: Add flag to read paths from stdin #176

Merged
merged 5 commits into from
Oct 4, 2024

Conversation

jzbor
Copy link
Contributor

@jzbor jzbor commented Sep 24, 2024

This adds a new flag (-i/--stdin) to the push subcommand of the attic client. This would resolve #175 .

Note that there is also #118 , which implements a similar behavior as a fallback for the push command.

@zhaofengli
Copy link
Owner

Thanks! Instead of consuming stdin all at once, I made it read line-and-line and batch the pushes like watch-store.

This makes long-running nix-build | attic push --stdin workflows work better.

@zhaofengli zhaofengli requested a review from cole-h October 4, 2024 15:39
Copy link
Collaborator

@cole-h cole-h left a comment

Choose a reason for hiding this comment

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

One minor nit, otherwise LGTM.

client/src/command/push.rs Outdated Show resolved Hide resolved
Instead of eagerly consuming stdin, read line-by-line and feed into
PushSession. This allows for a `nix-build | attic push` workflow.
@zhaofengli zhaofengli merged commit 61ebdef into zhaofengli:main Oct 4, 2024
17 checks passed
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.

attic push: option to read paths from stdin
3 participants