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

Don't log EOF error when using podman --remote build with an empty context directory. #19419

Conversation

Romain-Geissler-1A
Copy link
Contributor

Closes #15921.

I am not sure if you want to add a new test for this.

Does this PR introduce a user-facing change?

`None`

@Romain-Geissler-1A Romain-Geissler-1A force-pushed the remove-EOF-error-empty-context-with-podman-remote branch from d20d210 to 3294fa1 Compare July 29, 2023 10:51
@rhatdan
Copy link
Member

rhatdan commented Jul 29, 2023

LGTM
A simple test for this in podman system would be to just make sure the ERROR line does not appear.

@rhatdan
Copy link
Member

rhatdan commented Jul 29, 2023

/approve

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

rhatdan commented Jul 30, 2023

Add this patch for testing or something like it.
test.patch

@Romain-Geissler-1A Romain-Geissler-1A force-pushed the remove-EOF-error-empty-context-with-podman-remote branch 2 times, most recently from b9711af to f1af436 Compare July 31, 2023 10:56
@Romain-Geissler-1A
Copy link
Contributor Author

Add this patch for testing or something like it. test.patch

Thanks, I didn't go back to this pull request until today. I applied your patch, and removed the "rand_content" variable which was unused.

Copy link
Member

@edsantiago edsantiago left a comment

Choose a reason for hiding this comment

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

Two non-blockers. Thanks for your PR!

@@ -1097,6 +1097,18 @@ EOF
run_podman rmi -f build_test
}

@test "podman build empty context dir" {
tmpdir=$PODMAN_TMPDIR/emptydir
Copy link
Member

Choose a reason for hiding this comment

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

tmpdir is such a dangerous variable name; something like emptydir or contextdir would be more intuitive to a maintainer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree. However tmpdir is used everywhere in this file. Do you want me to change only this newly added tmpdir or all of them in this file ? I am asking because different maintainers have different rules, for example in my projects usually I require these changes of names to be done separately, while others are ok to have it done in one commit.

Copy link
Member

Choose a reason for hiding this comment

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

Ugh, you're right, and several of those are mine. So, in the interests of consistency, you're welcome to leave it as tmpdir and I'll do a cleanup PR later. Or you're welcome to improve the code base by setting a better example in your added test (but no, please don't clean up the others, that is far beyond the scope of this PR). Your choice, and either is fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I have chosen the name contextdir, hope this is ok.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah I jsut saw there is already PODMAN_contextdir (which is the parent folder of contextdir). So this name might be confusing too. Maybe I will change to buildcontextdir instead.

test/system/070-build.bats Outdated Show resolved Hide resolved
@Romain-Geissler-1A Romain-Geissler-1A force-pushed the remove-EOF-error-empty-context-with-podman-remote branch 2 times, most recently from 2e4c25e to 4498e8e Compare July 31, 2023 11:41
Copy link
Member

@edsantiago edsantiago left a comment

Choose a reason for hiding this comment

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

Global search/replace caused serious breakage

@@ -1097,6 +1097,18 @@ EOF
run_podman rmi -f build_test
}

@test "podman build empty context dir" {
buildcontextdir=$PODMAN_contextdir/emptydir
Copy link
Member

Choose a reason for hiding this comment

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

You seem to have done a global search/replace. There is no such thing as PODMAN_contextdir. This should be PODMAN_TMPDIR, same as line 1103 below.

@Romain-Geissler-1A Romain-Geissler-1A force-pushed the remove-EOF-error-empty-context-with-podman-remote branch from 4498e8e to 4ee31dc Compare July 31, 2023 12:00
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 31, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: edsantiago, rhatdan, Romain-Geissler-1A

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

@edsantiago
Copy link
Member

LGTM and tests are green. @containers/podman-maintainers PTAL.

@rhatdan
Copy link
Member

rhatdan commented Jul 31, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 31, 2023
@openshift-merge-robot openshift-merge-robot merged commit 0d21f89 into containers:main Jul 31, 2023
@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 Oct 30, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 30, 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. release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

podman remote logs "EOF" error when building from an empty directory
4 participants