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

local server bind address #202

Merged
merged 1 commit into from
Aug 12, 2022
Merged

Conversation

gilesknap
Copy link
Contributor

This PR adds the bind_addr parameter to run_local_server. When using localhost inside of a container this is needed to allow the redirect server to bind to an address to which response will return. In a container this address is not the same as the host address of localhost.

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #201 🦕

@gilesknap gilesknap requested a review from a team as a code owner May 21, 2022 08:23
@product-auto-label product-auto-label bot added the size: s Pull request size is small. label May 21, 2022
@google-cla
Copy link

google-cla bot commented May 21, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

For more information, open the CLA check for this pull request.

@gilesknap
Copy link
Contributor Author

This should also fix #87

@gilesknap gilesknap changed the title Bind host local server bind address May 21, 2022
@gilesknap
Copy link
Contributor Author

Hi @arithmetic1728 do I need to do anything else to get this PR approved? Thanks.

@petethegreat
Copy link

hi @gilesknap,
Was just wondering if anything is happening with this - we run jupyterlab out of a docker container, so I believe this PR would allow us to solve some of the issues we're facing.
Thanks!

@gilesknap
Copy link
Contributor Author

gilesknap commented Aug 12, 2022

@petethegreat, sorry but nobody from Google is responding to this PR.

However the good news is I have released a container with this fix in it by building it against my fork of this repo. I just can't release that to Pypi as non-pypi dependencies are not allowed there.

Try out docker pull gilesknap/gphotos-sync:3.04

Drop me an issue here if this does not work for you https://github.com/gilesknap/gphotos-sync/issues

EDIT: @petethegreat I just realised that the above is not good news for you since you need the fix here, not my project! But it now looks like the PR is progressing.

@clundin25
Copy link
Contributor

@gilesknap sorry for the delay in responding to this. This change looks great, I have a few nits and after that we can get this merged.

@clundin25
Copy link
Contributor

Can you you squash your commits and rebase to main in order to get past the conventional commits check?

@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Aug 12, 2022
@product-auto-label product-auto-label bot added size: s Pull request size is small. and removed size: m Pull request size is medium. labels Aug 12, 2022
@gilesknap gilesknap force-pushed the bind_host branch 4 times, most recently from 5fee404 to b94f155 Compare August 12, 2022 19:39
@gilesknap
Copy link
Contributor Author

Thanks @clundin25 I believe everything is in order now,

@clundin25
Copy link
Contributor

@gilesknap looks like the linter is complaining. Do you mind running nox -s blacken?

@gilesknap
Copy link
Contributor Author

sorry about that. The commit is now black verified.

@clundin25
Copy link
Contributor

clundin25 commented Aug 12, 2022

@gilesknap Seems your re-format may not have pushed. Can you try rebasing and running the formatter again?

Sorry for the inconvenience

@gilesknap gilesknap requested a review from a team as a code owner August 12, 2022 21:55
@gilesknap
Copy link
Contributor Author

That was my bad. I have now confirmed that the reformat is showing in the commit.

@clundin25 clundin25 added the owlbot:run Add this label to trigger the Owlbot post processor. label Aug 12, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Aug 12, 2022
@clundin25 clundin25 added the automerge Merge the pull request once unit tests and other checks pass. label Aug 12, 2022
@gcf-merge-on-green gcf-merge-on-green bot merged commit b081043 into googleapis:main Aug 12, 2022
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Aug 12, 2022
@clundin25
Copy link
Contributor

Thank you for the contribution Giles!

@petethegreat
Copy link

Excellent! Thanks @gilesknap and @clundin25 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow a separate bind address for the the local redirect server
3 participants