Skip to content

docs: Generate QuickStart samples#4844

Merged
amanda-tarafa merged 1 commit intogoogleapis:mainfrom
amanda-tarafa:quickstart
Mar 2, 2026
Merged

docs: Generate QuickStart samples#4844
amanda-tarafa merged 1 commit intogoogleapis:mainfrom
amanda-tarafa:quickstart

Conversation

@amanda-tarafa
Copy link
Copy Markdown
Collaborator

No description provided.

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Feb 28, 2026
@amanda-tarafa
Copy link
Copy Markdown
Collaborator Author

These are still being tested (through a temporary hijack of the semver-checks), but early feedback is appreciated.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.59%. Comparing base (8868009) to head (4561060).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4844   +/-   ##
=======================================
  Coverage   94.59%   94.59%           
=======================================
  Files         208      208           
  Lines        8166     8166           
=======================================
  Hits         7725     7725           
  Misses        441      441           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@amanda-tarafa
Copy link
Copy Markdown
Collaborator Author

Note: The integration tests failure seems to be because an internal service error:

Step #1 - "Run integration tests": ---- driver::run_check_code_for_grpc stdout ----
Step #1 - "Run integration tests": 
Step #1 - "Run integration tests": thread 'driver::run_check_code_for_grpc' (43738) panicked at tests/integration/src/error_details.rs:98:17:
Step #1 - "Run integration tests": assertion `left == right` failed: Error { kind: Service(ServiceDetails { status_code: None, headers: Some({"content-type": "application/grpc", "date": "Sat, 28 Feb 2026 03:34:55 GMT", "content-length": "0", "endpoint-load-metrics-bin": "MWDKmO102lhASdomhGcudOY/", "grpc-server-stats-bin": "AABAcxFXAgAAAA"}), status: Status { code: Internal, message: "We encountered an internal error. Please try again. Internal details: ABbQ7FZd0mJW4p3yDUC2mDrx2C8qt065gZ3DdabS9s+VkKgufqx6IQ1yYQRIlNs2dwCsHCKoSlhtf/AmcEWpcEGqcvlj8SSlxMOCNYWNAWuRmEUSq/XwJZA=", details: [] } }), source: Some(Status { code: Internal, message: "We encountered an internal error. Please try again. Internal details: ABbQ7FZd0mJW4p3yDUC2mDrx2C8qt065gZ3DdabS9s+VkKgufqx6IQ1yYQRIlNs2dwCsHCKoSlhtf/AmcEWpcEGqcvlj8SSlxMOCNYWNAWuRmEUSq/XwJZA=", metadata: MetadataMap { headers: {"content-type": "application/grpc", "date": "Sat, 28 Feb 2026 03:34:55 GMT", "content-length": "0", "endpoint-load-metrics-bin": "MWDKmO102lhASdomhGcudOY/", "grpc-server-stats-bin": "AABAcxFXAgAAAA"} }, source: None }) }
Step #1 - "Run integration tests":   left: Internal
Step #1 - "Run integration tests":  right: NotFound

@amanda-tarafa amanda-tarafa force-pushed the quickstart branch 2 times, most recently from a674821 to f89c445 Compare February 28, 2026 07:48
@amanda-tarafa
Copy link
Copy Markdown
Collaborator Author

This was all tested with:

# We use `--all-features` which triggers the Tonic+Prost code generation.
echo "==== Install protoc ===="
curl -fsSL --retry 5 --retry-delay 15 -o /tmp/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v28.3/protoc-28.3-linux-x86_64.zip
sha256sum -c <(echo 0ad949f04a6a174da83cdcbdb36dee0a4925272a5b6d83f79a6bf9852076d53f  /tmp/protoc.zip)
env -C /usr/local unzip -x /tmp/protoc.zip
protoc --version

rustup component add clippy
cargo version
rustup show active-toolchain -v

echo "RUSTFLAGS in test-ignored-samples: ${RUSTFLAGS:-}"
echo "RUSTDOCFLAGS in test-ignored-samples: ${RUSTDOCFLAGS:-}"

cargo test --workspace --doc --all-features

Copy link
Copy Markdown
Collaborator

@coryan coryan 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 possible improvement for the future.

@amanda-tarafa
Copy link
Copy Markdown
Collaborator Author

The failures are now because of googleapis/librarian#4276

Generates QuickStart samples per service client and per package.

Additionally, removes the `veneer` property from librarian.yaml

squash
@amanda-tarafa amanda-tarafa marked this pull request as ready for review March 2, 2026 21:39
@amanda-tarafa amanda-tarafa requested a review from a team as a code owner March 2, 2026 21:39
@amanda-tarafa
Copy link
Copy Markdown
Collaborator Author

This is now ready for review, and includes removing veneer: true from librarian yaml.

/// use google_cloud_gax::paginator::ItemPaginator as _;
/// # async fn sample() -> Result<(), Box<dyn std::error::Error>> {
/// let client = SchemaService::builder().build().await?;
/// let parent = "parent_value";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I know these are going to get better pretty soon, but maybe we should have used:

Suggested change
/// let parent = "parent_value";
/// let parent = " -- read the service docs for the format of this field --";

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I'll do this as well, even when we get resource names formatted, it's possible that for some we won't be able to identify the format and something like this as a fallback should be better.

@amanda-tarafa amanda-tarafa merged commit 1012f4d into googleapis:main Mar 2, 2026
35 checks passed
@amanda-tarafa amanda-tarafa deleted the quickstart branch March 2, 2026 22:18
coryan added a commit that referenced this pull request Mar 3, 2026
coryan added a commit that referenced this pull request Mar 3, 2026
Reverts #4844

We can roll forward once we figure out the problem with some quickstarts not compiling because the client is not enabled in the default features of the library.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants