Skip to content

docs: Generate RPC samples for all APIs#4720

Merged
amanda-tarafa merged 2 commits intogoogleapis:mainfrom
amanda-tarafa:enable-rpc-samples-for-all
Feb 19, 2026
Merged

docs: Generate RPC samples for all APIs#4720
amanda-tarafa merged 2 commits intogoogleapis:mainfrom
amanda-tarafa:enable-rpc-samples-for-all

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 18, 2026
@amanda-tarafa amanda-tarafa force-pushed the enable-rpc-samples-for-all branch from d49a8c7 to 0979cbb Compare February 18, 2026 20:58
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 18, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4720      +/-   ##
==========================================
- Coverage   95.07%   95.06%   -0.02%     
==========================================
  Files         198      198              
  Lines        7596     7596              
==========================================
- Hits         7222     7221       -1     
- Misses        374      375       +1     

☔ 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 amanda-tarafa force-pushed the enable-rpc-samples-for-all branch 7 times, most recently from b120dbc to 501b983 Compare February 19, 2026 01:06
@amanda-tarafa
Copy link
Copy Markdown
Collaborator Author

The gcb-pr-showcase check is green, and it's really running the following code (i.e. testing all doc samples):

set -ev

# 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

echo "==== DONE ===="

/workspace/.bin/sccache --show-stats

All other checks are green. I'll clean up the PR and push. It's still possible that the actual showcase check fails at that point, in which case we'll temporarily skip RPC sample generation for showcase.

@amanda-tarafa amanda-tarafa force-pushed the enable-rpc-samples-for-all branch from 501b983 to 24cdc4a Compare February 19, 2026 03:49
@amanda-tarafa amanda-tarafa marked this pull request as ready for review February 19, 2026 04:10
@amanda-tarafa amanda-tarafa requested a review from a team as a code owner February 19, 2026 04:10
@amanda-tarafa
Copy link
Copy Markdown
Collaborator Author

This is ready for review. I've created #4729 for tracking the fixes for the few APIs that we are skipping here. And we also have #4018 for Pub/Sub.

See #4720 (comment) for how these were tested.

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.

I left a few comments as FYIs, things to consider in the future.

An interesting question: how many RPCs follow the AIPs vs. how many don't? You could modify librarian to log "AIP: YES" and "AIP: NO" and then count the results.

Comment on lines +1255 to +1257
/// let mut list = client.list_users()
/// /* set fields */
/// .by_item();
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.

FYI. Several cases in showcase have these empty list of fields for list_* operations.

/// use google_cloud_lro::Poller;
/// use google_cloud_workflows_v1::Result;
/// async fn sample(
/// client: &Workflows, resource_name: &str
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.

nit: resource_name is not any more helpful than name and probably gets people wondering, "what is a resource".

Comment on lines +192 to +197
/// let response = client.create_workflow()
/// .set_parent(parent).set_workflow_id("workflow_id_value")
/// .set_workflow(
/// Workflow::new()/* set fields */
/// )
/// .poller().until_done().await?;
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.

FYI, this is close to ideal...

Copy link
Copy Markdown
Collaborator Author

@amanda-tarafa amanda-tarafa left a comment

Choose a reason for hiding this comment

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

Acked all the comments, I've added them to my TODO.

An interesting question: how many RPCs follow the AIPs vs. how many don't? You could modify librarian to log "AIP: YES" and "AIP: NO" and then count the results.

Yes, I like this.

@amanda-tarafa amanda-tarafa merged commit 8e336e1 into googleapis:main Feb 19, 2026
35 checks passed
@amanda-tarafa amanda-tarafa deleted the enable-rpc-samples-for-all branch February 19, 2026 04:54
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