Xuanwo opened a new pull request, #9437:
URL: https://github.com/apache/opendal/pull/9437

   # Which issue does this PR close?
   
   Part of apache/reqsign#685. Builds on #9271.
   
   # Rationale for this change
   
   `reqsign-github` 1.0.0 supports both explicit bearer tokens and anonymous 
requests. The GitHub storage service can now delegate authorization header 
handling to Reqsign.
   
   # What changes are included in this PR?
   
   The GitHub service uses the same Reqsign signer for ordinary requests and 
streaming reads. It uses only the configured token and sends anonymous requests 
when the token is absent. This requires no new credential loader or lookup in 
the environment or GitHub CLI.
   
   All checks on `9c0acec776` ran offline. A replay through the public Rust 
`Operator` API used synthetic tokens and scripted HTTP responses. All 61 
normalized requests matched the parent `0f43aa4fb9` at the recording transport 
(24 anonymous, 30 with an explicit token, and seven covering builder, typed 
config, iterator, and URI construction). Bounded and suffix reads returned the 
expected bytes for both partial (206) and full (200) responses, including 
during incremental stream consumption. A conditional 304 mapped to 
`ConditionNotMatch`, an unconditional 304 and a 412 mapped to `Unexpected`, and 
a 404 mapped to `NotFound`.
   
   The parent constructed operators for all nine malformed `GithubConfig.token` 
values tested. Three failed when building a request and six reached the 
recording transport. The candidate rejected all nine at construction with a 
non-retryable `ConfigInvalid` and omitted the token from the error message.
   
   # Are there any user-facing changes?
   
   The GitHub service now rejects malformed explicit tokens when the operator 
is constructed. Valid tokens and anonymous configurations continue to work. The 
Rust builder's `.token("")` call still has no effect, including after a 
nonempty token has been set.
   
   The Python binding routes `opendal.Operator` and `opendal.AsyncOperator` 
through Rust's `Operator::via_iter` and maps `ConfigInvalid` to 
`opendal.exceptions.ConfigInvalid`. Offline wheel tests on Python 3.12.3 
exercised both constructors. Each accepted anonymous access and a raw token on 
both revisions. With a `Bearer`-prefixed token, each constructed successfully 
on the parent and raised the redacted exception on the candidate.
   
   # Breaking changes
   
   Affected packages: core, bindings/python
   
   Migration:
   - If your GitHub configuration supplies a malformed token, omit the token 
for anonymous access or pass the raw token without whitespace or a `Bearer` 
prefix for authenticated access.
   
   # AI Usage Statement
   
   - Pi, `magpie/codex/gpt-6.2-astra`, high — checked the released signer API 
and request paths, helped design the migration, and wrote the PR description.
   - Pi, `magpie/codex/gpt-6.2-sol`, max — implemented the migration, rebased 
it onto main after #9271 landed, validated both revisions through the public 
`Operator` API, and prepared the change for publication.
   - Pi, `magpie/kimi-code-cn/k3.1-pro`, high — independently reviewed private 
commit `2a62d313c4`, reproduced its request comparison, and checked 
malformed-token behavior. The rebase preserved the reviewed GitHub service 
files byte for byte.
   - Pi, `magpie/codex/gpt-6.2-astra`, xhigh — coordinated implementation, 
review, validation, and publication.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to