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

fix(bigquery/storage/managedwriter/adapt): schema->protodescriptor #6267

Merged
merged 2 commits into from
Jun 29, 2022

Commits on Jun 27, 2022

  1. fix(bigquery/storage/managedwriter/adapt): schema->protodescriptor

    This PR addresses a transitive dependency loss when working with nested
    messages.  Previously, we only constructed a descriptor using the direct
    dependencies, and this changes the implementation to use the cache of
    all encountered descriptors rather than the local list of dependencies.
    
    There's still some opportunities for improvement with regards to
    proto3, in particular the wrapper types.  However, I'm deferring that
    until we have that sorted out in the backend a bit better.
    
    This also changes the testing slightly.  I've added a comment to the
    test as well, but our problem is evaluating the dependencies for
    correctness.  Due to the dynamic nature of how descriptors are created
    we can use something like proto.Equal.
    
    To address this, we make two comparisons.  In the first, we check the
    descriptor directly without its dependencies.  In the second, we
    call the normalizer to give us a self-contained descriptor proto, where
    we can validate everything is present.  The gap here of course is that
    a bug in the normalizer may mask a problem with the conversion, so
    consideration is warranted when we revisit this.
    
    Fixes: googleapis#6258
    shollyman committed Jun 27, 2022
    Configuration menu
    Copy the full SHA
    c76e553 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2022

  1. Configuration menu
    Copy the full SHA
    101a3e1 View commit details
    Browse the repository at this point in the history