diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..091794fc --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,33 @@ +--- +name: Bug report +about: Report a problem with Databricks SQL Kernel +title: "[BUG] " +labels: "" +assignees: "" +--- + +## Description + +Describe the problem and its impact. + +## Steps to reproduce + +Provide a minimal reproduction without credentials, customer data, or other +sensitive information. + +## Expected behavior + +Describe what you expected to happen. + +## Environment + +- Kernel version: +- Rust version: +- Operating system and architecture: +- Consuming driver or binding, if applicable: + +## Additional context + +Include redacted logs or other relevant details. For security vulnerabilities, +follow [SECURITY.md](https://github.com/databricks/databricks-sql-kernel/blob/main/SECURITY.md) +instead of opening a public issue. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..9c0a521d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,23 @@ +--- +name: Feature request +about: Suggest an improvement to Databricks SQL Kernel +title: "[FEATURE] " +labels: "" +assignees: "" +--- + +## Problem + +Describe the problem or use case. + +## Proposed solution + +Describe the behavior you would like. + +## Alternatives + +Describe alternatives or workarounds you have considered. + +## Additional context + +Add any other relevant details. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..f98b1766 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,11 @@ +## Description + + + +## Testing + + + +## Additional notes + + diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..8fb4d8f6 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,114 @@ +# Databricks Open Source Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or advances + of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email address, + without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to behavior that they deem inappropriate, threatening, offensive, or +harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official email address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +eng-oss-sql-driver@databricks.com. + +All complaints will be reviewed and investigated promptly and fairly. Community +leaders are obligated to respect the privacy and security of the reporter. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for actions they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning providing clarity about the behavior +and why it was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from community interaction or public +communication for a specified period of time. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violations, sustained +harassment, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from public interaction within the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at [the Contributor Covenant website][v2.0]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +[homepage]: https://www.contributor-covenant.org +[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..3bc9159b --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,61 @@ +# Contributing to Databricks SQL Kernel + +We welcome contributions to Databricks SQL Kernel. Use +[GitHub Issues](https://github.com/databricks/databricks-sql-kernel/issues) to +report bugs or discuss features, and +[GitHub Pull Requests](https://github.com/databricks/databricks-sql-kernel/pulls) +to propose changes. + +## Communication + +Before starting a major feature or a change to user-facing behavior, open an +issue or contact [eng-oss-sql-driver@databricks.com](mailto:eng-oss-sql-driver@databricks.com) +so that maintainers and contributors can align on the design. Small bug fixes +and documentation improvements can be submitted directly as pull requests. + +## Contribution workflow + +1. Fork and clone the repository. +2. Create a branch for your change. +3. Add tests for behavioral changes. +4. Run the checks described below. +5. Commit with a DCO sign-off: `git commit -s`. +6. Push your branch and open a pull request whose title follows + `type(scope): description` conventional-commit syntax. + +Maintainers will review the pull request. Please respond to feedback and keep +the change focused on the issue it addresses. + +## Build and test + +Install the stable Rust toolchain. The cross-platform minimum checks are: + +```bash +cargo fmt --all -- --check +cargo fmt --manifest-path adbc/Cargo.toml -- --check +cargo clippy --all-targets -- -D warnings +cargo clippy --manifest-path adbc/Cargo.toml --all-targets --features ffi -- -D warnings +cargo test +cargo test --manifest-path adbc/Cargo.toml --features ffi +``` + +On a Unix-like system with `make`, a POSIX shell, and a C compiler available as +`cc`, run `make check` instead. It includes the checks above plus native C ABI +smoke tests that use `LD_LIBRARY_PATH` or `DYLD_LIBRARY_PATH`; this target is not +native-Windows-compatible. + +End-to-end tests that require a live Databricks connection are ignored by +default. Do not include credentials, connection strings, customer data, or +unredacted logs in issues or pull requests. + +## Developer Certificate of Origin + +Contributors must sign off every commit to certify that they have the right to +submit the contribution under this project's license. The complete terms are +in [DCO](DCO). + +Configure your real name and email in Git, then sign commits with: + +```bash +git commit -s -m "Your commit message" +``` diff --git a/DCO b/DCO new file mode 100644 index 00000000..ac227b4a --- /dev/null +++ b/DCO @@ -0,0 +1,20 @@ +Developer's Certificate of Origin 1.1 +By making a contribution to this project, I certify that: +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or +(b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. diff --git a/README.md b/README.md index cae3f253..4f93164e 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,11 @@ not use FFI. ## Status -Early. Expect breaking changes. +The native Rust API is production-ready. Its public APIs continue to evolve, so +expect breaking changes. The custom C ABI remains under development. + +The Rust ADBC implementation under [`adbc/`](adbc/) is experimental, +unsupported, and not currently published or distributed. ## Building @@ -54,6 +58,14 @@ splitting, packaging, and binary-identity guidance. See [CONNECTION_PARAMETERS.md](CONNECTION_PARAMETERS.md) for every connection, auth, and session parameter the kernel accepts — its meaning, default value, and the config struct it lives on. +## Community and support + +See [CONTRIBUTING.md](CONTRIBUTING.md) to propose changes. Participation is +governed by the [Databricks Open Source Code of Conduct](CODE_OF_CONDUCT.md), +and security vulnerabilities should be reported according to +[SECURITY.md](SECURITY.md). For other project questions, contact +[eng-oss-sql-driver@databricks.com](mailto:eng-oss-sql-driver@databricks.com). + ## License Apache 2.0. See [LICENSE](LICENSE) and [NOTICE.txt](NOTICE.txt). diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..f70c7358 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,14 @@ +# Security Policy + +## Reporting a vulnerability + +If you discover a security vulnerability in this project, please report it +responsibly. Do not open a public GitHub issue for security vulnerabilities. + +Report security issues to [security@databricks.com](mailto:security@databricks.com) +and include a description, reproduction steps, and the potential impact. + +## Supported versions + +Security fixes are applied to the `main` branch and the latest published +release, if any. diff --git a/adbc/Cargo.toml b/adbc/Cargo.toml index a55b2321..546974a8 100644 --- a/adbc/Cargo.toml +++ b/adbc/Cargo.toml @@ -18,7 +18,8 @@ include = [ "/LICENSE", "/PACKAGING.md", ] -# Remove only after the public kernel crate and release process are available. +# Keep disabled while this implementation is experimental. Publication requires +# a separate product, support, security, and release-readiness decision. publish = false [dependencies] diff --git a/adbc/PACKAGING.md b/adbc/PACKAGING.md index de548db6..3b10d4d4 100644 --- a/adbc/PACKAGING.md +++ b/adbc/PACKAGING.md @@ -21,11 +21,12 @@ Repository CI must validate all of the following before release: ADBC dependency graph. 5. Platform-specific release jobs validate Linux, macOS, and Windows artifacts. -Publication remains disabled while the repository and kernel crate are not -publicly released. A release must publish `databricks-sql-kernel` first, then -publish `databricks-adbc` with the matching version requirement. Both crates -are built from the same repository source during development; no kernel FFI or -C ABI is involved in that dependency. +Publication remains disabled while the implementation is experimental. Any +future release requires a separate product, support, security, and +release-readiness decision. If publication is approved, release +`databricks-sql-kernel` first, then `databricks-adbc` with the matching version +requirement. Both crates are built from the same repository source during +development; no kernel FFI or C ABI is involved in that dependency. The declared MSRV is Rust 1.89. Cargo dependencies used by internal CI must resolve through the Databricks package proxy. Release artifacts must include diff --git a/adbc/README.md b/adbc/README.md index 7b5bac0f..db127353 100644 --- a/adbc/README.md +++ b/adbc/README.md @@ -1,5 +1,9 @@ # Databricks ADBC Driver for Rust +> [!WARNING] +> This implementation is experimental, unsupported, and not currently published +> or distributed. Its API and behavior may change without notice. + This crate implements ADBC 1.1 for Databricks. It calls the Databricks SQL Kernel through its native Rust API and returns Arrow 59 record batches without an IPC or C-ABI conversion between the driver and kernel.