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

ostree: fix proxy parsing (HMS-5018) #1050

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

lzap
Copy link
Contributor

@lzap lzap commented Nov 19, 2024

Finally found the ostree resolving problem - it was in proxy parsing. The configuration value is not in URL form, it is in hostname:port form. And url.Parse silently parses such URI setting a nonsense scheme to hostname. TIL that URL in Go actually is technically URI: https://pkg.go.dev/net/url

@ezr-ondrej ezr-ondrej changed the title ostree: fix proxy parsing ostree: fix proxy parsing (HMS-5018) Nov 19, 2024
@lzap
Copy link
Contributor Author

lzap commented Nov 19, 2024

I did split the OTK hunks into a separate PR: #1051

Copy link
Member

@croissanne croissanne left a comment

Choose a reason for hiding this comment

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

wow, nice find :)

Copy link
Contributor

@ezr-ondrej ezr-ondrej left a comment

Choose a reason for hiding this comment

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

Nice find! Thanks! 🎉

@ezr-ondrej ezr-ondrej enabled auto-merge November 19, 2024 12:08
@ezr-ondrej ezr-ondrej added this pull request to the merge queue Nov 19, 2024
@mvo5
Copy link
Contributor

mvo5 commented Nov 19, 2024

Would it make sense to add a regression test here? Also in the "test-as-documentation" sense this might be useful(?)

@ezr-ondrej
Copy link
Contributor

It would make sense to add test for sure... I'd prefer a follow-up tho, I wouldn't like to block this, unless someone disagrees.

@lzap
Copy link
Contributor Author

lzap commented Nov 19, 2024

Would it make sense to add a regression test here?

I can do a followup, I actually tried by running a tiny HTTP proxy via library but it was not great test to be honest.

@mvo5
Copy link
Contributor

mvo5 commented Nov 19, 2024

Would it make sense to add a regression test here?

I can do a followup, I actually tried by running a tiny HTTP proxy via library but it was not great test to be honest.

Cool, we don't need to block on this, I had a quick look and opened #1052 - it's not ideal as it's not a full integration test but OTOH I think the extraction of the helper is beneficial and it does check that the proxy is correctly set (but it does know a bit too much about the implementation details for my taste).

Merged via the queue into osbuild:main with commit 8a2c23c Nov 19, 2024
19 checks passed
@lzap lzap deleted the ostree-proxyparser branch November 19, 2024 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants