You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iggy.apache.org by "almostintuitive (via GitHub)" <gi...@apache.org> on 2026/10/09 05:22:47 UTC
[PR] test(go): fail when NewIggyMessage accepts headers no reader can decode [iggy]
almostintuitive opened a new pull request, #4472:
URL: https://github.com/apache/iggy/pull/4472
## Which issue does this PR address?
Relates to #4471
## Rationale
New bugs should come with a failing test, so this PR adds only that test. The
fix (validate header entries in `NewIggyMessage`, the way Rust, Java and Node
already do when a header is built) is left for discussion.
## What changed?
`TestNewIggyMessage_HeadersItAcceptsAreDecodable` in `foreign/go/contracts` pins
one invariant: any user header `NewIggyMessage` accepts must round-trip through
`DeserializeHeaders`. The server stores header bytes as sent (they may be
client-side encrypted), so a header the SDK lets through reaches every reader,
and the Rust reader then drops all headers of that message.
- Well-formed cases pass today: a 1-byte string, a 255-byte raw value, a 4-byte `Int32`.
- These malformed cases must be refused with `ErrInvalidHeaderKey` or `ErrInvalidHeaderValue`:
- an empty value
- a nil value
- a 256-byte value
- a 3-byte `Int32`
- an empty key
- a 256-byte key
The malformed cases skip unless `IGGY_RUN_KNOWN_FAILURES=1` is set, so default CI
stays green. The fix PR should drop the skip.
## Local Execution
- Default (`go test ./contracts`): passes. The malformed cases are skipped.
- `IGGY_RUN_KNOWN_FAILURES=1 go test ./contracts -run TestNewIggyMessage`: all 6
malformed cases fail on `master` @ `09420cf4d`, for example
`NewIggyMessage accepted a header no reader can decode (DeserializeHeaders: invalid header value length)`.
- With a one-line check in `NewIggyMessage` (run `DeserializeHeaders` on the
encoded headers, return `ErrInvalidHeaderValue`), every case passes. That
check is not part of this PR.
- `gofmt`, `go vet` and `golangci-lint` v2.13.2 (the CI version) report 0 issues on `./contracts/...`.
- The trailing-whitespace, trailing-newline and binary-artifacts hooks pass.
- HawkEye and typos were not run locally. The license header is copied from a
sibling test file.
- End-to-end, against `apache/iggy:edge` with the Go SDK from the same commit: a
message with an empty header value is accepted and stored, and
`iggy message poll --show-headers` shows its header as empty. Details are in #4471.
## AI Usage
1. Claude Code (Claude Opus 5.5).
2. It wrote the test and the issue text, and ran the end-to-end reproduction in Docker.
3. Verified by running the test on master (fails), with a local fix (passes), and the end-to-end repro above.
4. Yes.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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): fail when NewIggyMessage accepts headers no reader can decode [iggy]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4472:
URL: https://github.com/apache/iggy/pull/4472#issuecomment-6074854376
<!-- iggy-pr-triage-welcome -->
Thanks for the PR. It is labeled `S-waiting-on-review` and queued for review.
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): fail when NewIggyMessage accepts headers no reader can decode [iggy]
Posted by "spetz (via GitHub)" <gi...@apache.org>.
spetz commented on PR #4472:
URL: https://github.com/apache/iggy/pull/4472#issuecomment-6386906085
Closing as superseded by #4481, which closes #4471. It adds `validateUserHeaders` to `NewIggyMessage` and carries this test as `TestNewIggyMessage_HeadersItAcceptsAreDecodable` with the same cases plus an 8-byte `Double`, without the `IGGY_RUN_KNOWN_FAILURES` skip.
--
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): fail when NewIggyMessage accepts headers no reader can decode [iggy]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #4472:
URL: https://github.com/apache/iggy/pull/4472#issuecomment-6074952384
## [Codecov](https://app.codecov.io/gh/apache/iggy/pull/4472?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 87.82%. Comparing base ([`09420cf`](https://app.codecov.io/gh/apache/iggy/commit/09420cf4dc7b5d9cfe77dd71a63db365216b733e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`6226029`](https://app.codecov.io/gh/apache/iggy/commit/622602956ca924dd93ed14db2b58169f6539c709?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 #4472 +/- ##
=========================================
Coverage 87.82% 87.82%
Complexity 1607 1607
=========================================
Files 1302 1302
Lines 252088 252088
Branches 212381 212381
=========================================
+ Hits 221394 221398 +4
+ Misses 25408 25405 -3
+ Partials 5286 5285 -1
```
| [Components](https://app.codecov.io/gh/apache/iggy/pull/4472/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/4472/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `89.63% <ø> (ø)` | |
| [Java SDK](https://app.codecov.io/gh/apache/iggy/pull/4472/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `68.81% <ø> (ø)` | |
| [C# SDK](https://app.codecov.io/gh/apache/iggy/pull/4472/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `61.43% <ø> (ø)` | |
| [Python SDK](https://app.codecov.io/gh/apache/iggy/pull/4472/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `91.25% <ø> (ø)` | |
| [PHP SDK](https://app.codecov.io/gh/apache/iggy/pull/4472/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `85.67% <ø> (ø)` | |
| [Node SDK](https://app.codecov.io/gh/apache/iggy/pull/4472/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `94.98% <ø> (ø)` | |
| [Go SDK](https://app.codecov.io/gh/apache/iggy/pull/4472/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `70.27% <ø> (+0.05%)` | :arrow_up: |
| [C++ SDK](https://app.codecov.io/gh/apache/iggy/pull/4472/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `86.60% <ø> (ø)` | |
[see 1 file with indirect coverage changes](https://app.codecov.io/gh/apache/iggy/pull/4472/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): fail when NewIggyMessage accepts headers no reader can decode [iggy]
Posted by "spetz (via GitHub)" <gi...@apache.org>.
spetz closed pull request #4472: test(go): fail when NewIggyMessage accepts headers no reader can decode
URL: https://github.com/apache/iggy/pull/4472
--
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