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

Allow use of "http://" prefix in HTTPS Proxy config #139

Merged
merged 1 commit into from
May 22, 2020

Conversation

dsbibby
Copy link
Contributor

@dsbibby dsbibby commented May 13, 2020

If a http(s):// prefix is specified for either HTTP or HTTPS Proxy OVF properties, then use that rather than assuming either.

@vmwclabot
Copy link

@dsbibby, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding Signed-off-by: John Doe <john.doe@email.org> to the last line of each Git commit message. The e-mail address used to sign must match the e-mail address of the Git author. Click here to view the Developer Certificate of Origin agreement.

@vmwclabot
Copy link

@dsbibby, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding Signed-off-by: John Doe <john.doe@email.org> to the last line of each Git commit message. The e-mail address used to sign must match the e-mail address of the Git author. Click here to view the Developer Certificate of Origin agreement.

1 similar comment
@vmwclabot
Copy link

@dsbibby, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding Signed-off-by: John Doe <john.doe@email.org> to the last line of each Git commit message. The e-mail address used to sign must match the e-mail address of the Git author. Click here to view the Developer Certificate of Origin agreement.

@vmwclabot
Copy link

@dsbibby, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding Signed-off-by: John Doe <john.doe@email.org> to the last line of each Git commit message. The e-mail address used to sign must match the e-mail address of the Git author. Click here to view the Developer Certificate of Origin agreement.

@dsbibby
Copy link
Contributor Author

dsbibby commented May 14, 2020

Apologies - I've tried to sign my commits to this PR as described but my github email privacy settings have messed things up I think. I've fixed that now but I'm not sure how resolve commit 29128ea

@pksrc
Copy link
Contributor

pksrc commented May 14, 2020

@dsbibby one way is to rebase and amend the commit that is not signed. https://www.digitalocean.com/community/tutorials/how-to-rebase-and-update-a-pull-request

@vmwclabot
Copy link

@dsbibby, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding Signed-off-by: John Doe <john.doe@email.org> to the last line of each Git commit message. The e-mail address used to sign must match the e-mail address of the Git author. Click here to view the Developer Certificate of Origin agreement.

@dsbibby
Copy link
Contributor Author

dsbibby commented May 14, 2020

@pksrc, thank you - I'm still getting to grips with git!

I think I've succeeded - dco-required label is removed at least an both my commits rebased in to one now.

files/setup-02-proxy.sh Outdated Show resolved Hide resolved
files/setup-02-proxy.sh Outdated Show resolved Hide resolved
manual/photon.xml.template Outdated Show resolved Hide resolved
manual/photon.xml.template Outdated Show resolved Hide resolved
Copy link
Contributor

@lamw lamw left a comment

Choose a reason for hiding this comment

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

@dsbibby Please see comments and changes requested. This should make the support for HTTP(s) proxy much simpler

@vmwclabot
Copy link

@dsbibby, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding Signed-off-by: John Doe <john.doe@email.org> to the last line of each Git commit message. The e-mail address used to sign must match the e-mail address of the Git author. Click here to view the Developer Certificate of Origin agreement.

@lamw
Copy link
Contributor

lamw commented May 15, 2020

@dsbibby You can ensure your commits are always signed by using git commit -s when you commit a new change :)

@dsbibby
Copy link
Contributor Author

dsbibby commented May 16, 2020

@lamw - good tip, thank you! 🙂

@dsbibby dsbibby requested a review from lamw May 16, 2020 23:45
@dsbibby
Copy link
Contributor Author

dsbibby commented May 16, 2020

@lamw - I think this is good for review again now. I'm not sure if the error handling is the best way approach? It certainly works, but is easily missed.

files/setup-02-proxy.sh Outdated Show resolved Hide resolved
files/setup-02-proxy.sh Outdated Show resolved Hide resolved
files/setup-02-proxy.sh Outdated Show resolved Hide resolved
files/setup-02-proxy.sh Outdated Show resolved Hide resolved
files/setup-02-proxy.sh Outdated Show resolved Hide resolved
files/setup-02-proxy.sh Outdated Show resolved Hide resolved
files/setup-02-proxy.sh Outdated Show resolved Hide resolved
files/setup-02-proxy.sh Outdated Show resolved Hide resolved
Copy link
Contributor

@lamw lamw left a comment

Choose a reason for hiding this comment

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

Couple of minor updates

@lamw
Copy link
Contributor

lamw commented May 17, 2020

@dsbibby Once you've addressed the latest changes, feel free to squash all commits into one and we should be good to merge.

@dsbibby dsbibby force-pushed the patch-1 branch 2 times, most recently from f1eb4ee to a810b4f Compare May 18, 2020 16:02
@dsbibby dsbibby requested a review from lamw May 18, 2020 16:03
Updated OVF properties to suit previous commit

Signed-off-by: David Bibby <17053612+dsbibby@users.noreply.github.com>

Changed logic to require "http(s)://" on proxy URLs rather than make it optional.

Signed-off-by: David Bibby <davidsbibby@gmail.com>

Cleaned up formatting

Signed-off-by: David Bibby <davidsbibby@gmail.com>

Fixed logic around error handling of malformed proxy URLs

Signed-off-by: David Bibby <davidsbibby@gmail.com>

Fixed proxy error messages not appearing on console output

Signed-off-by: David Bibby <davidsbibby@gmail.com>

Improved readability with better variable naming

Signed-off-by: David Bibby <davidsbibby@gmail.com>
@dsbibby
Copy link
Contributor Author

dsbibby commented May 18, 2020

@lamw - all sensible suggestions - I renamed the HTTP_PROXY_PREFIX variables to HTTP_PROXY_PROTOCOL also as it's more descriptive I think.

@lamw
Copy link
Contributor

lamw commented May 18, 2020

@dsbibby The updates looks good, thanks!

One final question, did you build the appliance to make sure all changes worked as expected? We normally use this a final confirmation as part of the PR.

@lamw lamw linked an issue May 21, 2020 that may be closed by this pull request
@dsbibby
Copy link
Contributor Author

dsbibby commented May 22, 2020

@lamw I hadn't (I'd just tested in place in an exisitng appliance) but building properly is the correct thing to do, and sounded fun, so I have now!

All seems to work as expected. I've deployed in to an environment that needs proxies and one that doesn't and both work as expected. Also, passing a malformed URI as a proxy field logs an error during first boot of the appliance.

Copy link
Contributor

@lamw lamw left a comment

Choose a reason for hiding this comment

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

LGTM!

@lamw lamw merged commit 5f8d8fb into vmware-samples:master May 22, 2020
@lamw
Copy link
Contributor

lamw commented May 24, 2020

@dsbibby We just realized this PR was against master rather than development which is the normal process. We'll need to revert the merge but wanted to ensure you still have your branch to resubmit. Please ACK and we'll handle the revert and you can submit a new PR against the development branch

@dsbibby
Copy link
Contributor Author

dsbibby commented May 26, 2020

@lamw Yes, I still have the branch. Go ahead and revert and I'll submit a new PR when you're ready.

@lamw
Copy link
Contributor

lamw commented May 26, 2020

@dsbibby Thanks. We've reverted, go ahead and submit a new PR against development branch and we'll get that merged up.

@dsbibby
Copy link
Contributor Author

dsbibby commented May 26, 2020

@lamw all done. I've submitted a new PR #161

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

Successfully merging this pull request may close these issues.

HTTPS Proxy config assumes "https://" prefix
4 participants