almostintuitive opened a new pull request, #4475:
URL: https://github.com/apache/iggy/pull/4475
## Which issue does this PR address?
Relates to #4473
## Rationale
This adds the test the feature should satisfy, so the change can be reviewed
against a concrete expectation. The implementation is left for discussion:
names, labels and whether per-partition series belong behind a flag.
## What changed?
`given_topic_with_messages_when_scraping_metrics_should_report_its_size_and_count`
(`core/integration/tests/server/topic_metrics_vsr.rs`) uses a 1-node harness.
It creates a 2-partition topic, sends 10 messages to each partition, and
checks
that GetTopic reports 20 messages and a non-zero size. That precondition
makes
sure the comparison below can't pass vacuously. It then scrapes `/metrics`
and
expects:
- `topic_size_bytes{stream="metrics-stream",topic="metrics-topic"}` equal to
GetTopic's `size`
- `topic_messages{...}` equal to GetTopic's `messages_count`
It is `#[ignore = "#4473: ..."]`, so default CI stays green, and it runs with
`--ignored`.
## Local Execution
- Not passed: on `master` @ `09420cf4d`,
`cargo test -p integration --test mod -- --ignored --exact
server::topic_metrics_vsr::given_topic_with_messages_when_scraping_metrics_should_report_its_size_and_count`
fails as intended at the first series:
`left: None, right: Some(1892)`. The precondition (20 messages, non-zero
size) held,
and the exposition holds only the cluster totals and per-shard series.
- `rustfmt --check` is clean on the new file. `cargo clippy -p integration
--tests -- -D warnings`
reports nothing for it. The only warning is a future-incompatibility
notice for the
dependency `proc-macro-error2`.
- Built and run in Docker (4 CPUs, 10 GB), without debug info.
- HawkEye and typos were not run locally. The license header is copied from
a sibling test.
## AI Usage
1. Claude Code (Claude Opus 5.5).
2. Reading `get_metrics` and the metrics registry, the test and the write-up.
3. The test was run on master as shown 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]