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

Fix building from http or '-' options #7121

Merged
merged 1 commit into from
Jul 29, 2020

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Jul 28, 2020

When copying from a URL, podman will download and create a context
directory in a temporary file. The problem was that this directory
was being removed as soon as the function that created it was returned.

Later the build code would look for content in the temporary directory
and fail to find it, blowing up the build.

By pulling the extraction code back into the build function, we keep the
temporary directory around until the build completes.

Signed-off-by: Daniel J Walsh [email protected]

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhatdan

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-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 28, 2020
@rhatdan
Copy link
Member Author

rhatdan commented Jul 28, 2020

An alternative to #7113

@rhatdan
Copy link
Member Author

rhatdan commented Jul 28, 2020

fixes #7107

fi

PODMAN_TIMEOUT=240 run_podman build -t build_test - << EOF
FROM alpine
Copy link
Member

Choose a reason for hiding this comment

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

Could you make this $IMAGE (instead of alpine), to avoid hitting a registry?

Copy link
Member Author

Choose a reason for hiding this comment

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

If that works, sure.

RUN /bin/echo 'Test'
EOF
is "$output" ".*STEP 3: COMMIT" "COMMIT seen in log"

Copy link
Member

Choose a reason for hiding this comment

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

Why not add a podman run test? Verify that is "$output" "Test" "blah blah"? Costs nothing, and could (maybe??) catch some weird future error.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added

When copying from a URL, podman will download and create a context
directory in a temporary file.  The problem was that this directory
was being removed as soon as the function that created it was returned.

Later the build code would look for content in the temporary directory
and fail to find it, blowing up the build.

By pulling the extraction code back into the build function, we keep the
temporary directory around until the build completes.

Signed-off-by: Daniel J Walsh <[email protected]>
@TomSweeneyRedHat
Copy link
Member

Looks like a panic in one of the tests, I don't know if it's a known issue or not:

[+0535s]   /usr/lib/golang/src/runtime/panic.go:969
[+0535s] 
[+0535s]   Full Stack Trace
[+0535s]   panic(0x1043c20, 0x135acf0)
[+0535s]   	/usr/lib/golang/src/runtime/panic.go:969 +0x166
[+0535s]   github.com/containers/podman/v2/pkg/bindings/test.glob..func5.20.2(0xc0001228f8, 0xc0001effa0, 0xc000bd61f8, 0xc000df0950)
[+0535s]   	/var/tmp/go/src/github.com/containers/podman/pkg/bindings/test/containers_test.go:308 +0xc8
[+0535s]   created by github.com/containers/podman/v2/pkg/bindings/test.glob..func5.20
[+0535s]   	/var/tmp/go/src/github.com/containers/podman/pkg/bindings/test/containers_test.go:304 +0x6cc

@edsantiago
Copy link
Member

It's a known flake, #6518. It is really hammering us hard lately. I've restarted the bindings test.

@rhatdan
Copy link
Member Author

rhatdan commented Jul 29, 2020

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 29, 2020
@openshift-merge-robot openshift-merge-robot merged commit 83166a9 into containers:master Jul 29, 2020
@QiWang19
Copy link
Contributor

This patch also fixes https://bugzilla.redhat.com/show_bug.cgi?id=1858862

@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 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 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. lgtm Indicates that a PR is ready to be merged. 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.

7 participants