Repository navigation
Conversation
jat255
added this pull request to stack #432
October 20, 2026 21:02
jat255
force-pushed
the
jat255/whhh-live-warehouse-r
branch
2 times, most recently
from
October 20, 2026 21:27
4ec8fe6 to
6857489
Compare
Contributor
|
Preview deployed to Connect ( Deployed from commit 8b095ae. |
Contributor
|
Preview deployed to Connect ( Deployed from commit 8b095ae. |
jat255
removed this pull request from stack #432
October 20, 2026 22:54
jat255
force-pushed
the
jat255/whhh-live-warehouse-r
branch
from
October 20, 2026 22:54
6857489 to
4b65054
Compare
jat255
changed the base branch from
jat255/whhh-live-warehouse-python
to
main
October 20, 2026 22:54
jat255
changed the base branch from
main
to
jat255/whhh-live-warehouse-python
October 20, 2026 22:55
jat255
added this pull request to stack #435
October 20, 2026 22:55
jat255
force-pushed
the
jat255/whhh-live-warehouse-r
branch
4 times, most recently
from
October 21, 2026 03:33
223a343 to
dce7070
Compare
This was referenced Oct 21, 2026
…act, and run them in CI The R live tests read R options naming each object. They now read the variables in tests/shared/live-warehouse-env.json, the same ones the Python suite reads, and use the orders table that provision-live-warehouse.py creates in the configured schema. The contract gains a parameterized model and its JSON arguments for each backend, which the R semantic-model tests need; the Databricks metric_view entry becomes parameterized_model. Snowflake connects with the key pair from SNOWFLAKE_PRIVATE_KEY_FILE. The helper passes the account and host explicitly, though odbc reads both from the same variables by default, so every contract variable it relies on is visible at the call. Databricks connects through odbc::databricks(), which finds a token, a client secret, or a federated OIDC token in the environment, so the DSN named Databricks is no longer needed. R-live-warehouse.yaml installs each vendor's ODBC driver where odbc looks for it and runs the tests from the same GitHub environments as the Python job. For GitHub OIDC it fetches the token just before the tests, with the audience the Databricks SDK uses, so one federation policy serves both languages. The check for a configured backend moves to a script both workflows call. Checked in a linux/amd64 container: both drivers install and load, Snowflake rejects the not-yet-created service user's JWT, and Databricks rejects a dummy token with a 403.
…missing Snowflake leaves a relation the role holds no privilege on out of the listing, and the shared access-precedence contract reports a name the listing never returned as missing ahead of any refusal. The probe still classifies the query failure as an authorization refusal.
jat255
force-pushed
the
jat255/whhh-live-warehouse-r
branch
from
October 21, 2026 22:02
dce7070 to
ed8e840
Compare
The provisioning script now creates two semantic views over the orders table: ORDERS_MODEL, with a metric and a verified query, and ORDERS_PARAM_MODEL, with a variable. It grants them to the test role and prints the exports for the semantic view, verified query view, and parameterized model fixtures, with the arguments to call the model with. Variable names come from the env contract.
Snowflake folds a semantic view's member names to upper case, and commons reports the parameter as MIN_TOTAL, so the arguments the live test passes have to use that spelling.
The script quotes every other identifier it writes, but put the database and schema into the semantic view YAML, its verified query, and the procedure's schema argument bare, so a lowercase namespace would resolve to an upper-case one.
Doubling apostrophes is right for the YAML scalars but changed the identifiers inside the verified query's SQL, which named a different database for a namespace with an apostrophe.
Contributor
|
Preview root: https://posit-dev.github.io/commons/pr-431/ Python site preview: https://posit-dev.github.io/commons/pr-431/py/ Built from the latest commit on this branch. The R links in it point at the published R site, which no pull request rebuilds. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a CI workflow for the R live warehouse tests, and configures them with the same environment variables as the Python suite (#434). Before this, they ran only on a machine with hand-set R options and a hand-made ODBC data source.
Refs #303
Review notes
odbcsearches by default. The Snowflake 4.x driver installs to a path thatodbcdoes not search, so the workflow uses 3.x.odbcexchanges it on every connection. If the token expires during a run, the fix isodbc's file-based OIDC option with a file that is refreshed during the run. This applies only if the Databricks service principal uses OIDC rather than a client secret.Testing
In a linux/amd64 container, both drivers install and load. Snowflake rejects the CI key only because its user does not exist yet, and Databricks rejects a dummy token with a 403. Locally, all 20 R live tests skip with a message that names the missing variable.
R CMD checkwas not run, because only the test helper, the test README, and CI files changed.For the R reviewer
The live tests used to read one
commons.test.*R option per object and to connect to Databricks through a DSN namedDatabricks. Now the helper reads the environment variables intests/shared/live-warehouse-env.json, connects withodbc::snowflake()(key pair) andodbc::databricks()(credentials from the environment), and uses theorderstable that the provisioning script creates. The assertions intest-live-warehouses.Rare unchanged. The old options no longer have an effect, so a local setup must move to the variables in the README. The contract gains a parameterized model and its JSON arguments for each warehouse, which replace the Databricksmetric_viewentry.Agent-written notes
kata: whhh (milestone M10). Live runs wait on the same access as #434.