elastic / elastic/beats

[text-auditor] Fix three clear runtime text issues in user-facing validation errors

Open
#49,572 1 comment 0 reactions 0 assignees View on GitHub
needs_team
Dominant language
Go
Stars
12.7k
Forks
5k
Avg merge
2d 2h
Merged PRs (30d)
364

Description

## Text Improvements

The following user-facing text issues were found in the repository. Each is a low-effort fix.

### 1. Malformed bracket in S3 input validation error

**File:** `x-pack/filebeat/input/awss3/config.go` (line 124)
**Current text:** `api_timeout <%v> must be greater than the sqs.wait_time <%v`
**Suggested fix:** `api_timeout <%v> must be greater than the sqs.wait_time <%v>`
**Why:** The missing closing `>` makes the error message look broken and less readable.

### 2. Grammar error in Metricbeat module validation error

**File:** `metricbeat/helper/elastic/elastic.go` (line 150)
**Current text:** `configured metricsets are not an slice for module %s: %v`
**Suggested fix:** `configured metricsets are not a slice for module %s: %v`
**Why:** Clear grammar error (`an slice`) in user-facing error output.

### 3. Awkward/unclear Google OAuth validation message (same text in two inputs)

**Files:**
- `x-pack/filebeat/input/httpjson/config_auth.go` (line 331)
- `x-pack/filebeat/input/cel/config_auth.go` (line 384)

**Current text:** `none of token_url and client credentials can be used, use google.credentials_file, google.jwt_file, google.credentials_json or ADC instead`
**Suggested fix:** `token_url and client credentials cannot be used with the Google provider; use google.credentials_file, google.jwt_file, google.credentials_json, or ADC instead`
**Why:** Current phrasing is grammatically awkward and ambiguous (`none of X and Y`).

## Completeness Check

Explicit searches were run for each problem pattern:

- `api_timeout <%v> must be greater than the sqs.wait_time <%v` → one runtime occurrence (`awss3/config.go:124`).
- `configured metricsets are not an slice for module %s: %v` / `an slice` → one runtime occurrence (`elastic.go:150`), plus one internal code comment (excluded as non-user-facing).
- `none of token_url and client credentials can be used...` → two runtime occurrences (`httpjson/config_auth.go:331`, `cel/config_auth.go:384`) plus corresponding test expectations.

## Suggested Actions

- [ ] Add the missing `>` in the `api_timeout` validation error in `x-pack/filebeat/input/awss3/config.go`.
- [ ] Change `an slice` to `a slice` in `metricbeat/helper/elastic/elastic.go`.
- [ ] Replace the Google OAuth validation text in both `httpjson` and `cel` inputs with clearer phrasing, then update matching tests accordingly.

## Duplicate Check

Checked:
- `/tmp/previous-findings.json`
- currently open `[text-auditor]` issues in `elastic/beats`

These three runtime text problems were not already tracked in open text-auditor issues.

---
[What is this?](https://ela.st/github-ai-tools) | [From workflow: Text Auditor](https://github.com/elastic/beats/actions/runs/23297465591)

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
> - [x] expires on Mar 26, 2026, 1:43 PM UTC

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.