Abhiiishek44 opened a new pull request, #41975:
URL: https://github.com/apache/superset/pull/41975

   ### SUMMARY
   
   Fixes BigQuery metadata operations resolving datasets against the 
Application Default Credentials project instead of the project configured in 
the connection URI.
   
   `BigQueryEngineSpec._get_client` previously created `bigquery.Client` 
without specifying a project. When the credentials project differed from the 
project in a connection such as `bigquery://data-project`, unqualified BigQuery 
table references were resolved against the credentials project and could return 
a dataset-not-found error.
   
   This change:
   
   - Reads the project from `engine.url.host`.
   - Passes that project to `bigquery.Client` for both service-account 
credentials and Application Default Credentials.
   - Adds focused unit coverage for both authentication paths.
   
   Fixes #41906
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Not applicable. This is a backend-only change.
   
   ### TESTING INSTRUCTIONS
   
   Automated tests:
   
   ```bash
   python -m pytest \
     tests/unit_tests/db_engine_specs/test_bigquery.py \
     -k "get_client_uses_uri_project" \
     -vv
   ```
   
   Result:
   
   ```text
   2 passed, 38 deselected
   ```
   
   Code-quality checks:
   
   ```bash
   python -m pre_commit run --files \
     superset/db_engine_specs/bigquery.py \
     tests/unit_tests/db_engine_specs/test_bigquery.py
   ```
   
   Result:
   
   ```text
   All applicable hooks passed.
   ```
   
   ### ADDITIONAL INFORMATION
   
   - [x] Has associated issue: #41906
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to