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

WIP: VMSplice/STDOUT consumer #148

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

WIP: VMSplice/STDOUT consumer #148

wants to merge 1 commit into from

Conversation

tempusfrangit
Copy link
Member

No description provided.

@tempusfrangit
Copy link
Member Author

tempusfrangit commented Jan 20, 2024

@technillogue see if this works for you, we should generally order the requests for slices.

io.copy also handles backpressure from full pipes elegantly (AFAICT). We also do have a greedy reader to capture wire data even if the consumer is blocking.

@@ -19,7 +19,7 @@ builds:
archives:
- format: binary
name_template: >-
{{ .ProjectName }}_{{ title .Os }}_
{{ .ProjectName }}_{{ tolower .Os }}_
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
{{ .ProjectName }}_{{ tolower .Os }}_
{{ .ProjectName }}_{{ title .Os }}_

Copy link
Member Author

Choose a reason for hiding this comment

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

this was not an intended change.

@technillogue
Copy link
Contributor

this could definitely work! would it work with multifile and writing multiple files to stdout in order?

@tempusfrangit
Copy link
Member Author

We can make that happen! Wouldn't be too hard. This was a first pass to see if it looked good.

@tempusfrangit
Copy link
Member Author

It turns out the only reason we don't order downloads which causes you the problem is a historical reason for using a map instead of a list.

Additionally there is the maximum concurrent files option already that could limit concurrency -- additionally we can set it to automatically use a max file concurrency of one for stdout/vmsplice modes.

@technillogue
Copy link
Contributor

technillogue commented Jan 23, 2024

how would I invoke this? (edit: -o stdout)

@tempusfrangit
Copy link
Member Author

tempusfrangit commented Feb 19, 2024

@technillogue Rebased. Download order is now guaranteed. You will want to make sure to use --max-concurrent-files=1 and -o stdout or -o vmsplice

Please let me know if this works. if so we can easily spin up this output consumer.

@tempusfrangit tempusfrangit force-pushed the vmsplice branch 4 times, most recently from 3671e7e to 1a95670 Compare March 1, 2024 18:49
@technillogue
Copy link
Contributor

this doesn't build

Error: pkg/consumer/linux_vmsplice.go:15:18: cannot use &VMSpliceConsumer{} (value of type *VMSpliceConsumer) as Consumer value in variable declaration: *VMSpliceConsumer does not implement Consumer (wrong type for method Consume)
		have Consume(io.Reader, string, int64) error
		want Consume(io.Reader, string) error
Error: pkg/consumer/stdout.go:9:18: cannot use &StdoutConsumer{} (value of type *StdoutConsumer) as Consumer value in variable declaration: *StdoutConsumer does not implement Consumer (wrong type for method Consume)
		have Consume(io.Reader, string, int64) error
		want Consume(io.Reader, string) error

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.

None yet

2 participants