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

Fixed connectivity to Google PubSub over proxy #1555

Merged
merged 7 commits into from Aug 31, 2020

Commits on Aug 29, 2020

  1. Fixed connectivity to Google PubSub over proxy

    Latest version has caused @google-cloud/pubsub fail to connect over a proxy connection.
    
    
    Snapshot of error:
    
    2020-08-29T10:52:45.340Z | proxy | Successfully connected to pubsub.googleapis.c
    om:443 through proxy 172.16.52.252:443
    2020-08-29T10:52:45.370Z | subchannel | 172.16.52.252:443 CONNECTING -> TRANSIEN
    T_FAILURE
    2020-08-29T10:52:45.372Z | pick_first | CONNECTING -> TRANSIENT_FAILURE
    2020-08-29T10:52:45.373Z | resolving_load_balancer | dns:172.16.52.252:443 CONNE
    CTING -> TRANSIENT_FAILURE
    2020-08-29T10:52:45.375Z | channel | Pick result: TRANSIENT_FAILURE subchannel:
    undefined status: 14 No connection established
    2020-08-29T10:52:45.377Z | call_stream | [11] cancelWithStatus code: 14 details:
     "No connection established"
    2020-08-29T10:52:45.379Z | call_stream | [11] ended with status: code=14 details
    ="No connection established"
    2020-08-29T10:52:45.381Z | connectivity_state | dns:172.16.52.252:443 CONNECTING
     -> TRANSIENT_FAILURE
    
    
    Before proposed fix:
    
        static getDefaultAuthority(target) {
            return target.path;  // this returns "pubsub.googleapis.com:443"
        }
    
    After proposed fix:
    
        static getDefaultAuthority(target) {
            const hostPort = uri_parser_1.splitHostPort(target.path);  // target.path is "pubsub.googleapis.com:443"
            if (hostPort !== null) {
                return hostPort.host; // this returns "pubsub.googleapis.com"
            }
            else {
                throw new Error(`Failed to parse target ${uri_parser_1.uriToString(target)}`);
            }
        }
    wkchee committed Aug 29, 2020
    Configuration menu
    Copy the full SHA
    c536178 View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2020

  1. Update http_proxy.ts

    wkchee committed Aug 30, 2020
    Configuration menu
    Copy the full SHA
    6f3db6f View commit details
    Browse the repository at this point in the history
  2. Update subchannel.ts

    wkchee committed Aug 30, 2020
    Configuration menu
    Copy the full SHA
    08350ec View commit details
    Browse the repository at this point in the history
  3. Undo changes.

    wkchee committed Aug 30, 2020
    Configuration menu
    Copy the full SHA
    6a99983 View commit details
    Browse the repository at this point in the history

Commits on Aug 31, 2020

  1. Update http_proxy.ts

    wkchee committed Aug 31, 2020
    Configuration menu
    Copy the full SHA
    148b273 View commit details
    Browse the repository at this point in the history
  2. Update subchannel.ts

    wkchee committed Aug 31, 2020
    Configuration menu
    Copy the full SHA
    7fc0035 View commit details
    Browse the repository at this point in the history
  3. Update subchannel.ts

    wkchee committed Aug 31, 2020
    Configuration menu
    Copy the full SHA
    158d0dd View commit details
    Browse the repository at this point in the history