Skip to content

Conversation

wprzytula
Copy link
Collaborator

@wprzytula wprzytula commented Aug 7, 2025

Based on: #359
Fixes: #351

Hello, Docs!

Base: CPP Driver

CPP Driver setup

  1. ScyllaDB CPP Driver had documentation set up based on DataStax CPP Driver's READMEs. We had used eval-rst command to transform those READMEs to sphinx-readable resource tree, similarly to what Rust Driver does.
  2. There also had been API docs set up, by configuring conf.py to transform Doxygen-generated files to sphinx.

Transfer

  1. Steps done with the non-API docs:
  • Imported the whole docs tree (organized in the Topics directory).
  • Renamed README.md -> index.md, as index is not displayed in the URL, which is desired (so it's futures/ instead of futures/README.md).
  • Replaced underscores in file names with hyphens. This is for URL parsers to correctly break it into words.
  • Replaced feature/index.md singleton pattern with feature.md to reduce needless directory nesting.
  • Replaced links to datastax resources with our resources. TODO(@dgarcia360): configure URL substitution rules to support versioning correctly. I've left a related TODO in the code.
  1. I took the API docs generation method as-is. I leave it for @dgarcia360 to refine it.

Further adjustments

Cleanup

  1. Steps done:
  • Deleted DSE-related topics, as we don't support DSE.
  • Deps:
    • Ditched zlib dependency, as it was only used for DSE support in CPP Driver, and never used in ScyllaDB CPP Driver.
    • Similarly, ditched Kerberos dependency, as it was only used for DSE support, and also we don't support custom authenticators.
      • As a bonus, deleted embedded_ads from Integration Tests, as it's related to DSE support using Kerberos.
    • Stated that libuv is a non-mandatory dependency, as it is not used by the core ScyllaDB CPP Driver, only by tests and examples.
  • Removed FAQ section, as it was empty anyway.
  • Removed mentions of ancient Cassandra versions, both from the docs and from the code.
  • Deleted description of setting up ccm in a VM.
  • Fixed timestamp-generation docs to correctly mention client-side timestamp generation as the default.

Restructuring

  • Improved structure, so that topics are better grouped and organized.
    • Extracted Getting Started guide.
    • Extracted Architecture Overview.
    • Split Configuration into separate topics.
    • Grouped related things into Observability topic.
    • Extracted Authentication topic.
    • Dissipated ScyllaDB Specific by moving Shard Awareness to Load Balancing topic.

Substantive changes

  • Described callbacks limitations regarding executing blocking code.
  • Adjusted load balancing and retries documentation to reflect the current state of the code,
    as it differs in some ways compared to the original DataStax CPP Driver.

Set up sphinx (the last few commits)

  • Extended conf.py to mimic CPP Driver's. This has been reviewed by @dgarcia360.
  • I replaced links to DataStax documentation with our links, which allowed removal of the link replacement trick.

Bonus

Found a typo in the RPM-generation script, which made it contain ${name} string instead of the actual name of the package. Fixed it in the process.

Pre-review checklist

  • I have split my patch into logically separate commits.
  • All commit messages clearly explain what they change and why.
  • PR description sums up the changes and reasons why they should be introduced.
  • [ ] I have implemented Rust unit tests for the features/changes introduced.
  • [ ] I have enabled appropriate tests in Makefile in {SCYLLA,CASSANDRA}_(NO_VALGRIND_)TEST_FILTER.
  • I added appropriate Fixes: annotations to PR description.

@wprzytula wprzytula added this to the 1.0.0 milestone Aug 7, 2025
@wprzytula wprzytula self-assigned this Aug 7, 2025
@wprzytula wprzytula added the documentation Improvements or additions to documentation label Aug 7, 2025
@wprzytula wprzytula requested review from Lorak-mmk and Copilot August 13, 2025 09:48
@wprzytula wprzytula marked this pull request as ready for review August 13, 2025 09:49
Copilot

This comment was marked as outdated.

@wprzytula wprzytula force-pushed the introduce-docs branch 2 times, most recently from 87570af to 10a19ad Compare August 13, 2025 10:42
Comment on lines +7 to +8
* ScyllaDB CPP Driver lessons - [part 1](https://university.scylladb.com/courses/using-scylla-drivers/lessons/cpp-driver-part-1/)
and [part 2](https://university.scylladb.com/courses/using-scylla-drivers/lessons/cpp-driver-part-2-prepared-statements/) at Scylla University.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Those lessons will need to be updated as well, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. But I'm not going to do this as part of this PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually, how do they need to be updated? They mostly refer to the driver's API and basic working, so no special adjustments are needed IMO.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I didn't look at the lessons, but don't they describe how to install the driver? This section will probably need to be updated (but of course not in this PR)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

don't they describe how to install the driver

No. They say:

To learn how to install it, see here.

So we need to update the link, that's it.

`${name}` is not a valid metavariable in the spec file - it was not
substituted. Instead, it should be `%{name}`.
This is to align with the convention of using "contents" as the main
table of contents file in documentation projects, as in the Rust Driver.
In its place, real documentation will be added later.
Let's name the Rust driver with its full name for clarity.
The `Doxyfile.in` file, which is used by the documentation generation
workflow, has been added to the project straight from the cpp-driver.
It's yet to be adjusted.
The `Doxyfile.in` file, which is used by the documentation generation
workflow, has been adjusted for this project.
Ancient Cassandra versions are not supported by the driver, so it makes
no sense to mention them in documentation and code.
docs/schema: fix typo

client-side-timestamps: fix typo

docs/schema_metadata: fix typo
We're not supporting DSE Cloud.
When 7 years ago the default timestamp generator was changed from
server-side to client-side, the documentation was improperly
updated to reflect that change. This commit corrects the documentation.
...and warn about possible pitfalls of not setting a serial consistency
before executing a Lightweight Transaction (LWT).
The implementation of CPP-Rust Driver has a limitation that callbacks
must not block, otherwise the driver will panic. This commit documents
this limitation in the documentation of futures, mentioning the notable
exception of calling (otherwise blocking) future functions on futures
that are guaranteed to be ready.
I believe the new name fits better.
The new name better reflects the semantics of this category.
This commit removes the Windows build instructions from the documentation.
The Windows build process is no longer verified and maintained, and
therefore the instructions are removed to avoid confusion.
zlib is not a dependency of the CPP Rust driver, as the underlying
Rust Driver has its own static dependencies.
As zlib is not used in the CPP-Rust Driver at all (it was used in
CPP Driver for DataStax Cloud functionalities), this commit removes all
references to zlib from the build system.
The driver does not support Kerberos authentication anymore, so the
documentation has been updated to remove references to Kerberos and its
installation instructions.
The embedded_ads code is related to Kerberos authentication to DSE
clusters, which is no longer supported in the CPP-Rust Driver.
As Kerberos is not used in the CPP-Rust Driver at all (it was used in
CPP Driver for custom authentication), this commit removes all
references to Kerberos from the build system.
libuv is used by the CPP-Rust Driver only for tests and some of
the examples, so let's state that clearly.
Also, let's remove exact build instructions for libuv, as they are prone
to change with new releases and it's better for the user to refer to
the libuv documentation.
sphinx is configured to build the docs. doxygen is used to generate
API documentation. The code is taken from the C++ Driver repo.
Doxygen outputs XML files to docs/source/api, and Sphinx converts them
to RST files in docs/api during the build. Both directories should be
ignored by git.
@wprzytula
Copy link
Collaborator Author

Changes:

Ready for re-review. @dgarcia360

@wprzytula wprzytula requested a review from dgarcia360 September 8, 2025 08:54
Copy link
Contributor

@dgarcia360 dgarcia360 left a comment

Choose a reason for hiding this comment

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

LGTM, one minor comment

All links in the docs are updated to point to ScyllaDB docs, not
DataStax. With this, we can remove the replacements-based workaround in
conf.py.
The docs should:
- list both `master` and at least the most recent stable tag;
- properly highlight which version is the latest stable one;
- highlight `master` as unstable.

This commit achieves that, bringing the configuration in line with
the Rust Driver's.
@wprzytula
Copy link
Collaborator Author

Changes:

  • addressed the last comment from @dgarcia360
  • added a commit that configures tags and categorizes versions as stable, unstable, and also chooses the latest one.

@wprzytula wprzytula merged commit 2d4f1bc into scylladb:master Sep 12, 2025
10 checks passed
@wprzytula wprzytula deleted the introduce-docs branch September 12, 2025 12:10
@wprzytula
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write documentation or include it from CPP Driver
3 participants