Skip to content

Fix "occured" typo in the Windows service install template - #17477

Merged
ebeahan merged 2 commits into
elastic:mainfrom
Anshuman-Prakash:fix/install-service-occured-17382
Oct 23, 2026
Merged

ebeahan merged 2 commits into
elastic:mainfrom
Anshuman-Prakash:fix/install-service-occured-17382

Conversation

@Anshuman-Prakash

Copy link
Copy Markdown
Contributor

Related issues

The three docs items from the same issue are in #17476. They're split so that PR stays docs-only and skips buildkite; dev-tools/ matches none of the skip_ci_on_only_changed patterns, so this one cannot. #17382 should stay open until both land.

Risk

  • Low: isolated change, no effect on Fleet connectivity, policy handling, or upgrades
  • Medium: changes existing behavior, but is feature flagged or a failure does not affect Fleet connectivity, policy handling, or upgrades
  • High: touches Fleet connectivity, policy application, upgrade/rollback, installation, or changes defaults for existing users

One word inside a double-quoted string passed to Write-Host. No control flow, no PowerShell syntax, and no template placeholder is touched.

Rationale

dev-tools/packaging/templates/windows/install-service.ps1.tmpl:20 is the Catch branch of the delayed-start configuration step:

Try {
  Start-Process -FilePath sc.exe -ArgumentList 'config {{.BeatName}} start= delayed-auto'
}
Catch { Write-Host -f red "An error occured setting the service to delayed start." }

occured → occurred. It is printed in red to the console on a real failure, so it's the line an operator reads while something is already going wrong.

Rollout and safety

N/A — a string literal in console output. The Try/Catch structure, the sc.exe invocation and the {{.BeatName}} placeholder are unchanged, so rendering and runtime behavior are identical. Nothing is persisted or parsed, so there is no downgrade or rollback concern.

Testing

No automated coverage exists for this message, and I could not render the template locally: go build ./internal/... fails here because the beats submodule is not initialized, so the ./beats replace directive cannot resolve. I'm not claiming a build.

What I did verify:

  • The edit is confined to the contents of one double-quoted string. The diff is a single line, and the surrounding Try/Catch and -f red arguments are byte-identical.
  • No Go template delimiters ({{/}}) appear in the changed string, so template rendering is unaffected.
  • Repository-wide search for other user-facing occured: this was the only hit outside Go identifiers. The remaining ones are LogWatcher.KeyOccured and keysOccured in pkg/testing/log_watcher.go:52-93 plus a call site in testing/integration/ess/otel_test.go:768. I left those alone deliberately — KeyOccured is exported, so renaming it is an API change rather than a text fix, and none of it is user-visible.
  • For reviewers wondering where the rendered script lands: the only in-repo reference to install-service.ps1 is specs/apm-server.spec.yml:4, which lists it as a component file. The template is rendered by the shared beats packaging machinery, which lives outside this repo, so I could not trace the render step here.

A one-word fix to an error message isn't release-note material, so I'd suggest the skip-changelog label rather than a changelog fragment — but happy to add a fragment instead if you'd rather have the entry.

🤖 Generated with Claude Code

Relates to elastic#17382 (item 4).

The delayed-start failure path in
dev-tools/packaging/templates/windows/install-service.ps1.tmpl printed
"An error occured setting the service to delayed start." Corrected to
"occurred".

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

mergify Bot commented Oct 23, 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.

@ebeahan

ebeahan commented Oct 23, 2026

Copy link
Copy Markdown
Member

/test

@ebeahan ebeahan added the backport-active-all Automated backport with mergify to all the active branches label Oct 23, 2026
@infra-vault-gh-plugin-prod

infra-vault-gh-plugin-prod Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

@mergify

mergify Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@ebeahan
ebeahan merged commit 0b131a6 into elastic:main Oct 23, 2026
25 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

ebeahan added a commit that referenced this pull request Oct 23, 2026
…17502)

Relates to #17382 (item 4).

The delayed-start failure path in
dev-tools/packaging/templates/windows/install-service.ps1.tmpl printed
"An error occured setting the service to delayed start." Corrected to
"occurred".




(cherry picked from commit 0b131a6)

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: Eric Beahan <eric.beahan@elastic.co>
ebeahan added a commit that referenced this pull request Oct 23, 2026
…17501)

Relates to #17382 (item 4).

The delayed-start failure path in
dev-tools/packaging/templates/windows/install-service.ps1.tmpl printed
"An error occured setting the service to delayed start." Corrected to
"occurred".




(cherry picked from commit 0b131a6)

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: Eric Beahan <eric.beahan@elastic.co>
ebeahan added a commit that referenced this pull request Oct 23, 2026
…17499)

Relates to #17382 (item 4).

The delayed-start failure path in
dev-tools/packaging/templates/windows/install-service.ps1.tmpl printed
"An error occured setting the service to delayed start." Corrected to
"occurred".




(cherry picked from commit 0b131a6)

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: Eric Beahan <eric.beahan@elastic.co>
ebeahan added a commit that referenced this pull request Oct 23, 2026
…17500)

Relates to #17382 (item 4).

The delayed-start failure path in
dev-tools/packaging/templates/windows/install-service.ps1.tmpl printed
"An error occured setting the service to delayed start." Corrected to
"occurred".




(cherry picked from commit 0b131a6)

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: Eric Beahan <eric.beahan@elastic.co>
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 skip-changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants