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 - remote build: fix streaming and error handling #11046

Closed
wants to merge 2 commits into from

Conversation

vrothberg
Copy link
Member

@vrothberg vrothberg commented Jul 26, 2021

Address a number of issues in the streaming logic in remote build, most
importantly an error in using buffered channels on the server side.

The pattern below does not guarantee that the channel is entirely read
before the context fires.

for {
        select {
                case <- bufferedChannel:
                ...
                case <- ctx.Done():
                ...
        }
}

Fixes: #10154
Signed-off-by: Valentin Rothberg [email protected]

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 26, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 26, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vrothberg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 26, 2021
@vrothberg
Copy link
Member Author

@edsantiago, it looks like we were masking errors before. I think this will help but it's hard to reproduce.

@vrothberg vrothberg changed the title WIP - remote build: fix streaming and error handling remote build: fix streaming and error handling Jul 26, 2021
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 26, 2021
@edsantiago
Copy link
Member

"Hard to reproduce"? Hold my beer. I rebased #9887 on top of this PR and ran it through CI. It failed. Looks like exactly the same failure pattern, except the error message is now "server probably quit" instead of "stream dropped".

@vrothberg vrothberg changed the title remote build: fix streaming and error handling WIP - remote build: fix streaming and error handling Jul 26, 2021
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 26, 2021
@vrothberg
Copy link
Member Author

"Hard to reproduce"? Hold my beer. I rebased #9887 on top of this PR and ran it through CI. It failed. Looks like exactly the same failure pattern, except the error message is now "server probably quit" instead of "stream dropped".

Thanks, Ed! I will give it another shot tomorrow.

A huge ton of skips: podman-remote build just doesn't
really work at all. Lots of issues filed, a few more
left to go. Submitting this just to see how it does in CI.

Signed-off-by: Ed Santiago <[email protected]>
@vrothberg vrothberg force-pushed the fix-10154 branch 2 times, most recently from 2c7f6bb to a3ffc22 Compare July 28, 2021 09:52
@vrothberg
Copy link
Member Author

@edsantiago one round without flakes. Let's try another time.

I noticed that we need to distinguish between EOF and unexpected EOF. Not yet sure if that's the key or not.

@edsantiago
Copy link
Member

edsantiago commented Jul 28, 2021

Ah, you rebased on my buildah-bud PR, clever. Why do you say "without flakes" though? I see the same old same old

@vrothberg
Copy link
Member Author

Ah, you rebased on my buildah-bud PR, clever. Why do you say "without flakes" though? I see the same old same old

I think this one happened in "another time". First run went fine. The hunt continues...

Address a number of issues in the streaming logic in remote build, most
importantly an error in using buffered channels on the server side.

The pattern below does not guarantee that the channel is entirely read
before the context fires.

for {
	select {
		case <- bufferedChannel:
		...
		case <- ctx.Done():
		...
	}
}

Fixes: containers#10154
Signed-off-by: Valentin Rothberg <[email protected]>
@vrothberg
Copy link
Member Author

Ed will cherry-pick my commit here into his PR, so I am closing.

@vrothberg vrothberg closed this Jul 28, 2021
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

podman build: stream dropped, unexpected failure
2 participants