[bug-hunter] AWS billing stream template misspells latency condition and ignores configured latency

Open Beginner friendly
#18,582 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
90/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
aws, handlebars
Domain
cloud

Research direction

Start with packages/aws/data_stream/billing/agent/stream/stream.yml.hbs:33-35 and compare its condition with the latency variable in packages/aws/data_stream/billing/manifest.yml:19-24. Correct the condition so configured latency is rendered, then run the reproduction script from the issue and confirm its assertion passes.

Written by the indexing model from the issue text.

Description

Impact

Users who set the latency setting for AWS Billing metrics do not get that setting applied in the rendered stream config. This can cause delayed CloudWatch billing metrics to be skipped, producing incomplete billing data.

Reproduction Steps

  1. Run this minimal reproduction script from the repo root:
python - <<'PY'
from pathlib import Path
manifest = Path('packages/aws/data_stream/billing/manifest.yml').read_text()
template = Path('packages/aws/data_stream/billing/agent/stream/stream.yml.hbs').read_text()

assert 'name: latency' in manifest, 'precondition failed: latency var missing in manifest'
assert '\{\\{\#if latency}}' in template, 'BUG: stream template checks `lantency` instead of `latency`, so configured latency is ignored'
print('ok')
PY
  1. Observe the assertion failure.

Expected vs Actual

Expected: The stream template condition should use \{\\{\#if latency}}, so setting latency in policy renders latency: ....

Actual: The template uses \{\\{\#if lantency}} (misspelled), so the latency field is never rendered even when configured.

Observed output:

Traceback (most recent call last):
  File "<stdin>", line 6, in <module>
AssertionError: BUG: stream template checks `lantency` instead of `latency`, so configured latency is ignored

Failing Test

from pathlib import Path
manifest = Path('packages/aws/data_stream/billing/manifest.yml').read_text()
template = Path('packages/aws/data_stream/billing/agent/stream/stream.yml.hbs').read_text()

assert 'name: latency' in manifest, 'precondition failed: latency var missing in manifest'
assert '\{\\{\#if latency}}' in template, 'BUG: stream template checks `lantency` instead of `latency`, so configured latency is ignored'

Evidence

  • packages/aws/data_stream/billing/manifest.yml:19-24 defines latency as a valid stream variable.
  • packages/aws/data_stream/billing/agent/stream/stream.yml.hbs:33-35 checks \{\\{\#if lantency}} and then outputs latency: \{\{latency}}.
  • Because the condition key is misspelled, configured latency does not pass the guard and is dropped from rendered config.

[!NOTE]

🔒 Integrity filter blocked 14 items

The following items were blocked because they don't meet the GitHub integrity level.

  • #14705 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #9106 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #8403 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #564 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #17771 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #16425 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #11328 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #18289 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #12390 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #10494 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #14000 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #17283 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #10104 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #13580 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
  github:
    min-integrity: approved  # merged | approved | unapproved | none

What is this? | From workflow: Bug Hunter

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

  • expires on Apr 29, 2026, 11:39 AM UTC
Dominant language
Handlebars
Stars
334
Forks
652
Avg merge
1d 22h
Merged PRs (30d)
241

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from elastic/integrations

All issues in elastic/integrations

Similar issues

More Cloud issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.