Skip to content

Conversation

userid0x0
Copy link

Use the Proxy Environment http_proxy/HTTPS_PROXY/NO_PROXY to handle the http/https request.

What type of PR is this?

/kind bug

What this PR does / why we need it:

How to verify it

See instructions in initial error report. containers/podman#25220

Which issue(s) this PR fixes:

Fixes: https://github.com/containers/podman/issues/25220

Special notes for your reviewer:

Does this PR introduce a user-facing change?

@userid0x0
Copy link
Author

Hi,
I added a test as well - actually it's a negative test that expects that ADD <URL> fails with an invalid proxy configuration set.
The CI fails are timeouts - I am not sure if there are triggered by my patch.

@TomSweeneyRedHat
Copy link
Member

@userid0x0 thanks for the contribution. It looks like your test passed, but for some reason the overall tests timed out. I'll restart them to see if we have better luck at them.

On a quick look, the changes LGTM.

@TomSweeneyRedHat
Copy link
Member

@nalind @flouthoc @Luap99 PTAL

@flouthoc
Copy link
Collaborator

Changes in internal/mkcw/embed/entrypoint_amd64.gz should be dropped.

@userid0x0
Copy link
Author

I want to apologize for the change in internal/mkcw/embed/entrypoint_amd64.gz. I dropped the changes and did a force push.

tests/bud.bats Outdated
_prefetch alpine
target=alpine-image
fake_proxy="FTP_PROXY=http://invalid.localhost:8080 ftp_proxy=http://invalid.localhost:8080 http_proxy=http://invalid.localhost:8080 HTTPS_PROXY=http://invalid.localhost:8080"
eval $fake_proxy run_buildah 125 build $WITH_POLICY_JSON -t alpine-image -f $BUDFILES/add-checksum/Containerfile $BUDFILES/add-checksum
Copy link
Member

Choose a reason for hiding this comment

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

This is not testing much, you just check the exit code which might as well happen if you have a typo in the command or for any other reason.

It must check for the proper error message to check that it fails connecting to the proxy.

assert "$output" =~ "<expected error message here>" "connection to fake proxy must fail"

Also the use of eval feels unnecessary just do

FTP_PROXY=http://invalid.localhost:8080 ftp_proxy=http://invalid.localhost:8080 http_proxy=http://invalid.localhost:8080 HTTPS_PROXY=http://invalid.localhost:8080 \
run_buildah 125 build ...

And I guess drop the ftp proxy ones since they are not in play here in any case.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks to ipv6 localhost may result in ::1 or 127.0.0.1. I use now a fixed ipv4 ip 127.0.0.1 with a reserved port 47. Let me know if there is anything else I can do.

Use the Proxy Environment http_proxy/HTTPS_PROXY/NO_PROXY to handle the
http request.

Signed-off-by: Alexander Merkle <[email protected]>
@aeijdenberg
Copy link
Contributor

This is a useful patch. I've applied and tested it in my environment and it's helped me in a similar situation. Thanks @userid0x0 for your work on this.

@userid0x0
Copy link
Author

@aeijdenberg no problem. @Luap99 is there anything else todo?

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM, @nalind PTAL

Copy link

A friendly reminder that this PR had no activity for 30 days.

@userid0x0
Copy link
Author

Hi,
is there anything to do from my side?

@Luap99
Copy link
Member

Luap99 commented Sep 10, 2025

@nalind PTAL

Copy link
Collaborator

@flouthoc flouthoc left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

openshift-ci bot commented Sep 10, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flouthoc, Luap99, userid0x0

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

@github-actions github-actions bot removed the stale-pr label Sep 11, 2025
@userid0x0
Copy link
Author

@nalind @Luap99 Sorry to retrigger - may I ask for an update?

@Luap99
Copy link
Member

Luap99 commented Sep 30, 2025

LGTM on my end but I like to see an ack/lgtm from @nalind

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants