You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iggy.apache.org by "p4rtridge (via GitHub)" <gi...@apache.org> on 2026/10/25 03:45:27 UTC
[PR] test(go): cover access token command serialization [iggy]
p4rtridge opened a new pull request, #4640:
URL: https://github.com/apache/iggy/pull/4640
## Which issue does this PR address?
Relates to #2883
## Rationale
The personal access token command encoders in the Go SDK had only partial
serialization coverage. The existing test checked the `CreatePersonalAccessToken`
expiry encoding with a single fixed name. It did not check the command code,
the name length prefix for other name lengths, or the other two access token
commands. Exact-byte assertions catch protocol compatibility regressions.
## What changed?
Reworked `access_token_test.go` into table-driven serialization tests for all
three commands in `access_token.go`. Each case checks the command code and the
complete request body.
- `CreatePersonalAccessToken` (code 42): the four existing expiry cases (server
default, little-endian layout, values past 32 bits, never expire), plus an
empty name and a longer name, to cover the `u8` length prefix.
- `GetPersonalAccessTokens` (code 41): the body is empty.
- `DeletePersonalAccessToken` (code 43): short, empty and longer names.
That is 10 cases. No production code changed.
## Local Execution
- Passed `go test -count=1 ./...`, `go test -race -count=1 ./...` and
`go vet ./...` from `foreign/go`.
- Passed the applicable prek pre-commit hooks for the changed file.
- Passed the prek pre-push Go lint hook.
## AI Usage
- Tool: Claude Code
- Scope: Assisted with reviewing my changes
- Verification: I ran the checks above and compared each expected byte layout
against the encoders in `access_token.go` and the server's protocol
definitions.
- I can explain each assertion and the wire layout it checks.
--
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: commits-unsubscribe@iggy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(go): cover access token command serialization [iggy]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #4640:
URL: https://github.com/apache/iggy/pull/4640#issuecomment-6416306437
## [Codecov](https://app.codecov.io/gh/apache/iggy/pull/4640?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 90.77%. Comparing base ([`6ce2f92`](https://app.codecov.io/gh/apache/iggy/commit/6ce2f92a9f9650242caf09997e7ec6c2b4c763df?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`0877902`](https://app.codecov.io/gh/apache/iggy/commit/08779026191d630fbf74c8cacbf1d9fc067f64ca?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #4640 +/- ##
=========================================
Coverage 90.77% 90.77%
Complexity 2989 2989
=========================================
Files 1459 1459
Lines 348165 348165
Branches 292747 292747
=========================================
+ Hits 316042 316049 +7
+ Misses 25485 25476 -9
- Partials 6638 6640 +2
```
| [Components](https://app.codecov.io/gh/apache/iggy/pull/4640/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [Rust Core](https://app.codecov.io/gh/apache/iggy/pull/4640/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `92.08% <ø> (ø)` | |
| [Java SDK](https://app.codecov.io/gh/apache/iggy/pull/4640/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `77.80% <ø> (ø)` | |
| [C# SDK](https://app.codecov.io/gh/apache/iggy/pull/4640/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `83.74% <ø> (ø)` | |
| [Python SDK](https://app.codecov.io/gh/apache/iggy/pull/4640/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `85.69% <ø> (ø)` | |
| [PHP SDK](https://app.codecov.io/gh/apache/iggy/pull/4640/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `90.67% <ø> (ø)` | |
| [Node SDK](https://app.codecov.io/gh/apache/iggy/pull/4640/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `96.44% <ø> (ø)` | |
| [Go SDK](https://app.codecov.io/gh/apache/iggy/pull/4640/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `70.04% <ø> (+0.07%)` | :arrow_up: |
| [C++ SDK](https://app.codecov.io/gh/apache/iggy/pull/4640/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `85.51% <ø> (ø)` | |
[see 5 files with indirect coverage changes](https://app.codecov.io/gh/apache/iggy/pull/4640/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
</details>
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: commits-unsubscribe@iggy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(go): cover access token command serialization [iggy]
Posted by "justinmclean (via GitHub)" <gi...@apache.org>.
justinmclean commented on PR #4640:
URL: https://github.com/apache/iggy/pull/4640#issuecomment-6402510378
Thanks @p4rtridge, and for picking up access_token.go from #2883. I checked the expected bytes against the three encoders in access_token.go and the command codes against core/binary_protocol/src/codes.rs (41, 42, 43), and they match. One small thing: the old failure message printed the bodies with `% x`, which is easier to read for byte layouts than `%v`. Could you keep `% x`?
--
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: commits-unsubscribe@iggy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(go): cover access token command serialization [iggy]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4640:
URL: https://github.com/apache/iggy/pull/4640#issuecomment-6393094386
<!-- iggy-pr-triage-welcome -->
Thanks for the PR. It is labeled `S-waiting-on-review` and queued for review.
If AI was used to create this PR, you must run the [`team-review` skill](https://github.com/apache/iggy/blob/master/.claude/skills/team-review/SKILL.md) before opening it.
Slash commands (own line, regular comment) move it around the queue:
- `/ready` - back to `S-waiting-on-review` after addressing feedback
- `/author` - flip to `S-waiting-on-author` while you finish changes
- `/request-review @user-or-team` - request a reviewer
- `/pin` - exempt the PR from the stale bot, `/unpin` to undo
See [CONTRIBUTING.md](https://github.com/apache/iggy/blob/master/CONTRIBUTING.md#pr-triage-commands) for details.
--
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: commits-unsubscribe@iggy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(go): cover access token command serialization [iggy]
Posted by "p4rtridge (via GitHub)" <gi...@apache.org>.
p4rtridge commented on PR #4640:
URL: https://github.com/apache/iggy/pull/4640#issuecomment-6407277436
> Thanks @p4rtridge, and for picking up access_token.go from #2883. I checked the expected bytes against the three encoders in access_token.go and the command codes against core/binary_protocol/src/codes.rs (41, 42, 43), and they match. One small thing: the old failure message printed the bodies with `% x`, which is easier to read for byte layouts than `%v`. Could you keep `% x`?
Thanks for reviewing! I’ve changed the failure message from `%v` to `%x`.
--
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: commits-unsubscribe@iggy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org