googleapis / googleapis/google-cloud-rust

Discovery in-progress operation without name hits unreachable! panic in until_done

Open
#6,711 0 comments 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
Rust
Stars
955
Forks
144
Avg merge
1d 5h
Merged PRs (30d)
279

Description

Unconfirmed. This is the result of a search with Claude, may be a false positive.

In `src/lro/src/internal/discovery.rs`, `handle_polling_success` extracts the operation name:

https://github.com/googleapis/google-cloud-rust/blob/f02b42c2ac5720334cd2b5335824bd4166264527/src/lro/src/internal/discovery.rs#L249-L254

If `o.name()` returns `None`, `(None, PollingResult::InProgress(Some(o)))` is returned. In `poll()`, `self.operation = op` sets `self.operation = None`:

https://github.com/googleapis/google-cloud-rust/blob/f02b42c2ac5720334cd2b5335824bd4166264527/src/lro/src/internal/discovery.rs#L165-L175

On the subsequent iteration of `until_done`:

https://github.com/googleapis/google-cloud-rust/blob/f02b42c2ac5720334cd2b5335824bd4166264527/src/lro/src/lib.rs#L177-L186

Because `self.operation` is now `None`, `poll()` returns `None`. `until_done` hits the `None => unreachable!("loop should exit via the Completed branch vs. this line")` branch and panics, crashing the caller.

Contributor guide

Open the contributing guide

Research direction

Start with handle_polling_success and poll() in src/lro/src/internal/discovery.rs, then trace the until_done loop in src/lro/src/lib.rs at the cited lines. Reproduce or validate an in-progress operation without a name and confirm that until_done completes or returns an error without reaching the unreachable! panic.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
66/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.