GoogleCloudPlatform / functions-framework-dart

FaaS (Function as a service) framework for writing portable Dart functions
https://pub.dev/packages/functions_framework
Apache License 2.0
533 stars 54 forks source link

feat: added support for IPv6 #455

Open CosmicPangolin opened 3 months ago

CosmicPangolin commented 3 months ago

@kevmoo Tagging you here 'cause I figure this repo doesn't get a lot of attention. This is a trivial patch that I needed to unlock some functionalities on the Fly.io subnet, which relies heavily on IPv6 for internal resolution and load balancing. Doubt it conflicts with any GCP needs?

google-cla[bot] commented 3 months ago

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).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

kevmoo commented 3 months ago

I think the convention on cloud run is to use IPv4 still.

I wonder if we'll have to just add a configuration option or something...

CosmicPangolin commented 3 months ago

My understanding is that the IPv6 option covers IPv4 addresses as well (this could be documented better in the dart:io api, methinks).

kevmoo commented 3 months ago

My understanding is that the IPv6 option covers IPv4 addresses as well (this could be documented better in the dart:io api, methinks).

It's the opposite. All ipV4 addresses are v6, but not the other way around!

CosmicPangolin commented 3 months ago

Agreed :) I just mean InternetAddress.anyIPv6 resolves both, wrt cloud run requiring v4.

kevmoo commented 2 months ago

it seems like tests still pass!

Would you add a changelog entry here!