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: unify environment variables referenced by Databricks docs #1673

Merged
merged 2 commits into from
Oct 3, 2023

Conversation

rtyler
Copy link
Member

@rtyler rtyler commented Sep 27, 2023

Long-term fix will be for Databricks to release a Rust SDK for Unity 😄

Fixes #1627

@github-actions github-actions bot added binding/python Issues for the Python package binding/rust Issues for the Rust crate documentation Improvements or additions to documentation rust labels Sep 27, 2023
@rtyler rtyler marked this pull request as ready for review September 27, 2023 14:23
Copy link
Collaborator

@wjones127 wjones127 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's deprecate the old ones before we make the breaking change.

python/docs/source/usage.rst Outdated Show resolved Hide resolved
rust/src/data_catalog/unity/mod.rs Outdated Show resolved Hide resolved
Comment on lines 172 to 170
"access_token" | "unity_access_token" | "databricks_access_token" => {
Ok(UnityCatalogConfigKey::AccessToken)
}
"unity_token" | "databricks_token" => Ok(UnityCatalogConfigKey::Token),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm can we leave the old ones in but emit a deprecation warning? Something like:

// TODO: Remove these variables
"access_token" | "unity_access_token" | "databricks_access_token" => {
    log::warn!("Environment variable '{}' is deprecated and will be remove in a future veresion. Please use UNITY_TOKEN or DATABRICKS_TOKEN instead.");
    Ok(UnityCatalogConfigKey::Token)
}

This will just save us some work answering questions about why their environment variables suddenly don't work anymore.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't disagree but don't feel like doing that work today, so I'm going to drop this out of the milestone and release 0.16

"workspace_url" | "unity_workspace_url" | "databricks_workspace_url" => {
Ok(UnityCatalogConfigKey::WorkspaceUrl)
}
"unity_host" | "databricks_host" => Ok(UnityCatalogConfigKey::Host),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing here, would prefer to provide a deprecation warning first.

rust/src/data_catalog/unity/mod.rs Outdated Show resolved Hide resolved
@rtyler rtyler added this to the Rust v0.17 milestone Sep 27, 2023
@rtyler rtyler force-pushed the databricks-env-variables-1627 branch from 4f9d885 to edd1837 Compare September 29, 2023 00:55
@github-actions github-actions bot removed documentation Improvements or additions to documentation binding/python Issues for the Python package labels Sep 29, 2023
@rtyler rtyler enabled auto-merge September 29, 2023 00:56
Long-term fix will be for Databricks to release a Rust SDK for Unity 😄

Fixes delta-io#1627
@rtyler rtyler force-pushed the databricks-env-variables-1627 branch from edd1837 to 13e8be1 Compare September 29, 2023 00:57
@rtyler rtyler merged commit fac7fdb into delta-io:main Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binding/rust Issues for the Rust crate rust
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Standardize Databricks environment variable names
2 participants