Skip to content

BigQueryOption.Builder ignores host parameter (regression versus 2.35.0) #3125

Closed
@JiriOndrusek

Description

@JiriOndrusek

Thanks for stopping by to let us know something could be better!

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

Please run down the following list and make sure you've tried the usual "quick fixes":

If you are still having issues, please include as much information as possible:

Environment details

  1. Specify the API at the beginning of the title. For example, "BigQuery: ...").
    General, Core, and Other are also allowed as types
  2. OS type and version: linux (not related)
  3. Java version: Temurin-17.0.9+9 (not related)
  4. version(s): google-cloud-bigquerry:2.37.0 (worked in 2.35.0)

Steps to reproduce

Create a GoogleBigQueryConnectionFactory via builder and use 'setHost'

                BigQueryOptions.Builder builder = BigQueryOptions.newBuilder().setProjectId(projectId);

                if (host != null) {
                    builder.setHost(host)
                            .setLocation(host);
                }

...

                return builder.build()
                        .getService();

If client created by such service is used for execution of request. The host parameter is ignored.

Please look into the recent change b2814a2#diff-a5b2825562e3ffa23e5250337fa30f136c7ee6b3409b66f0da4fc78c8b9414d6L108

As you can see, the host parameter is ignored and method ServiceOptions.getResolvedApiaryHost used instead. This method does ignore host parameter as well.

Code example

I found the error during testing camel-quarkus from the camel-main branch. All of the tests are failing because of this issue - https://github.com/apache/camel-quarkus/blob/camel-main/integration-tests/google-bigquery/src/test/java/org/apache/camel/quarkus/component/google/bigquery/it/GoogleBigqueryTest.java

Stack trace

Any relevant stacktrace here.

External references such as API reference guides

  • ?

Any additional information below

Following these steps guarantees the quickest resolution possible.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: bigqueryIssues related to the googleapis/java-bigquery API.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions