Skip to content

Fix typos in install help, enroll error and Helm values comments - #17403

Merged
swiatekm merged 2 commits into
elastic:mainfrom
Anshuman-Prakash:fix/text-auditor-14578-cli
Oct 23, 2026
Merged

swiatekm merged 2 commits into
elastic:mainfrom
Anshuman-Prakash:fix/text-auditor-14578-cli

Conversation

@Anshuman-Prakash

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes the remaining items of #14578 — items 1, 2 and 5. The documentation and changelog half (items 3 and 4) is in #17400.

Item 1 — internal/pkg/agent/cmd/install.go, the install command's long help:

Before After
Unless all the require command-line parameters are provided or -f is used ... Unless all the required command-line parameters are provided or -f is used ...

Item 2 — internal/pkg/agent/cmd/enroll_cmd.go, the error wrapped when enrollment options fail to serialise:

-   "failed to marshall enrollment options",
+   "failed to marshal enrollment options",

Item 5 — the exlude comment in the EDOT kube-stack Helm values. The issue lists two occurrences; there is a third in the same chart that it missed, so I fixed all three to keep the chart consistent:

File Line Comment
deploy/helm/edot-collector/kube-stack/values.yaml 380 # exlude collector logs → # exclude collector logs
deploy/helm/edot-collector/kube-stack/managed_otlp/values.yaml 379 # exlude collector logs → # exclude collector logs
deploy/helm/edot-collector/kube-stack/managed_otlp/logs-values.yaml 200 # exlude opentelemetry-kube-stack pod logs → # exclude opentelemetry-kube-stack pod logs

(The issue cites lines 353 and 352 for the first two; they have since moved to 380 and 379.)

Deliberately out of scope: one more exlude remains in the repository, as the policy field name "exlude_files" in testing/integration/ess/escaping_secrets_in_policy_test.go:91. That is test input constructing a policy document rather than user-facing text, and renaming a key inside an integration test's fixture risks changing what the test actually exercises, so I left it alone. Worth a separate look by someone who knows whether that key is meant to mirror exclude_files.

Why is it important?

install.go's long help is what elastic-agent install --help prints, and it is the first thing a reader sees when deciding whether they can run the command non-interactively. The exlude comments are in the values files operators copy and edit when configuring log collection for the EDOT collector.

Checklist

  • My code follows the style guidelines of this project
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool
  • I have added an integration test or an E2E test

No changelog fragment: all three changes are help text, an error message wording, and YAML comments, with no behaviour change, so this should carry skip-changelog. (The one item in this issue family that did warrant a fragment is in #17402, which fixes an error message that named the wrong mode.)

No test is added: the two Go changes are a cobra Long string and an error-wrapping message, and nothing asserts on either — searching *_test.go for marshall enrollment and the require command-line returns no matches.

Disruptive User Impact

None functionally. The failed to marshall enrollment options string changes, so anything grepping logs for that exact spelling would need updating; it is a wrapped error on an internal serialisation failure, so matching on it is unlikely.

How to test this PR locally

elastic-agent install --help   # "Unless all the required command-line parameters"

gofmt -l reports no changes needed on either Go file. A repository-wide search for exlude collector logs, exlude opentelemetry-kube-stack, marshall enrollment and the require command-line now returns no matches, and the only remaining exlude is the test fixture key noted above. The three YAML files keep their existing CRLF line endings.

I was not able to compile the packages locally: this checkout's beats submodule is not initialised, so the ./beats replace directive makes go build ./internal/... fail before reaching these files. Both edits are string-literal only, so I have left compilation and the unit suite to CI rather than claiming a local build.

Related issues

🤖 Generated with Claude Code

Correct "all the require command-line parameters" in the install
command's long help, "marshall" in the enrollment error message, and
three "exlude" comments in the EDOT kube-stack values files.

Relates to elastic#14578

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mergify

mergify Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

This pull request does not have a backport label. Could you fix it @Anshuman-Prakash? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-./d./d is the label that automatically backports to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

@swiatekm

Copy link
Copy Markdown
Member

buildkite test this

@swiatekm swiatekm added documentation Improvements or additions to documentation Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team skip-changelog backport-active-all Automated backport with mergify to all the active branches labels Oct 23, 2026
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@Anshuman-Prakash

Copy link
Copy Markdown
Contributor Author

Thanks for the trigger @swiatekm. The red lint and build / check jobs on this run are not caused by this PR — they're both the elastic org's GitHub App installation hitting its REST rate limit at the moment the run started:

  • lint logs: failed to fetch pull request patch: RequestError [HttpError]: API rate limit exceeded for installation (ubuntu/default, 11:50:21Z). The workflow sets only-new-issues: true, so when that patch fetch fails the action can't scope results to the diff and falls back to reporting every pre-existing issue in the whole files. All 56 reported issues (gosec: 21, noctx: 24, staticcheck: 11) are in files this PR never touches — internal/pkg/agent/install/user_linux.go, pkg/component/runtime/conn_info_server*.go, pkg/ipc/listener.go, internal/pkg/remote/round_trippers.go, pkg/testing/*, testing/fleetservertest/fleetserver.go.
  • build / check failed the same way at 11:50:05Z: API rate limit exceeded for installation inside the changed-files step.

This PR only touches internal/pkg/agent/cmd/install.go, internal/pkg/agent/cmd/enroll_cmd.go and the three deploy/helm/edot-collector/kube-stack values files. .golangci.yml and .golangci-lint-version (2.12.2) haven't changed since July, and your own #17463 shows the identical 6/6 lint failure on a run from today, while PRs from earlier in the week (#17451, #17436) pass — so this is today's org-wide condition, not a regression here.

Could you re-run lint and build / check once the installation quota resets? Happy to rebase if you'd prefer a fresh build.

@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

@swiatekm
swiatekm merged commit 75e2c2f into elastic:main Oct 23, 2026
24 of 37 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

@Mergifyio backport 9.6 9.5 9.4 8.19

@mergify

mergify Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

backport 9.6 9.5 9.4 8.19

✅ Backports have been created

Details

Cherry-pick of 75e2c2f has failed:

On branch mergify/bp/8.19/pr-17403
Your branch is up to date with 'origin/8.19'.

You are currently cherry-picking commit 75e2c2f.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   deploy/helm/edot-collector/kube-stack/managed_otlp/values.yaml
	modified:   deploy/helm/edot-collector/kube-stack/values.yaml
	modified:   internal/pkg/agent/cmd/enroll_cmd.go
	modified:   internal/pkg/agent/cmd/install.go

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	deleted by us:   deploy/helm/edot-collector/kube-stack/managed_otlp/logs-values.yaml

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

swiatekm added a commit that referenced this pull request Oct 23, 2026
…Helm values comments (#17490)

* Fix typos in install help, enroll error and Helm values comments (#17403)

Correct "all the require command-line parameters" in the install
command's long help, "marshall" in the enrollment error message, and
three "exlude" comments in the EDOT kube-stack values files.

Relates to #14578

Co-authored-by: Anshuman-Prakash <199287261+Anshuman-Prakash@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Mikołaj Świątek <mail@mikolajswiatek.com>
(cherry picked from commit 75e2c2f)

# Conflicts:
#	deploy/helm/edot-collector/kube-stack/managed_otlp/logs-values.yaml

* Delete deploy/helm/edot-collector/kube-stack/managed_otlp/logs-values.yaml

---------

Co-authored-by: Anshuman Prakash <nakulsrivastava2004@gmail.com>
Co-authored-by: Mikołaj Świątek <mail@mikolajswiatek.com>
swiatekm added a commit that referenced this pull request Oct 23, 2026
) (#17487)

Correct "all the require command-line parameters" in the install
command's long help, "marshall" in the enrollment error message, and
three "exlude" comments in the EDOT kube-stack values files.

Relates to #14578




(cherry picked from commit 75e2c2f)

Co-authored-by: Anshuman Prakash <nakulsrivastava2004@gmail.com>
Co-authored-by: Anshuman-Prakash <199287261+Anshuman-Prakash@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Mikołaj Świątek <mail@mikolajswiatek.com>
swiatekm added a commit that referenced this pull request Oct 28, 2026
) (#17489)

Correct "all the require command-line parameters" in the install
command's long help, "marshall" in the enrollment error message, and
three "exlude" comments in the EDOT kube-stack values files.

Relates to #14578




(cherry picked from commit 75e2c2f)

Co-authored-by: Anshuman Prakash <nakulsrivastava2004@gmail.com>
Co-authored-by: Anshuman-Prakash <199287261+Anshuman-Prakash@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Mikołaj Świątek <mail@mikolajswiatek.com>
swiatekm added a commit that referenced this pull request Oct 28, 2026
) (#17488)

Correct "all the require command-line parameters" in the install
command's long help, "marshall" in the enrollment error message, and
three "exlude" comments in the EDOT kube-stack values files.

Relates to #14578




(cherry picked from commit 75e2c2f)

Co-authored-by: Anshuman Prakash <nakulsrivastava2004@gmail.com>
Co-authored-by: Anshuman-Prakash <199287261+Anshuman-Prakash@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Mikołaj Świątek <mail@mikolajswiatek.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-active-all Automated backport with mergify to all the active branches documentation Improvements or additions to documentation skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants