Skip to content

Conversation

@straistaru
Copy link
Contributor

@straistaru straistaru commented Sep 30, 2025

What does this PR do?

Ensure the docs URL in the troubleshoot message matches the correct release version.
The docs for 9.0+ don't refer to a specific version anymore: https://www.elastic.co/docs/troubleshoot/ingest/fleet/common-problems, so the URL returned to the user in the error output is invalid.

Checklist

  • I have read and understood the pull request guidelines of this project.
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • [ ] 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

Related issues

@straistaru straistaru linked an issue Sep 30, 2025 that may be closed by this pull request
@mergify
Copy link
Contributor

mergify bot commented Sep 30, 2025

This pull request does not have a backport label. Could you fix it @straistaru? 🙏
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.

@straistaru
Copy link
Contributor Author

straistaru commented Sep 30, 2025

Noticed that release.Version() will try to use the version from the package.version file instead of just a hard-coded value in the agent binary.

Is it a supported scenario for an elastic-agent build above 9.x to read a package.version file with a version different from its build version? Would a user ever be expected to encounter this, or is it considered unsupported?
If it's not, the function can be simplified to a const with the new docs URL, and we wouldn’t backport the fix to pre-9.x branches.

EDIT: Answer below from Paolo.

@straistaru straistaru added backport-active-9 Automated backport with mergify to all the active 9.[0-9]+ branches bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team labels Oct 2, 2025
@mergify
Copy link
Contributor

mergify bot commented Oct 2, 2025

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b gh-issue-10119 upstream/gh-issue-10119
git merge upstream/main
git push upstream gh-issue-10119

@straistaru straistaru marked this pull request as ready for review October 6, 2025 06:43
@straistaru straistaru requested a review from a team as a code owner October 6, 2025 06:43
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

elasticmachine commented Oct 6, 2025

💛 Build succeeded, but was flaky

Failed CI Steps

History

cc @straistaru

@straistaru straistaru requested a review from pchila October 9, 2025 06:14
@straistaru straistaru merged commit b74942a into elastic:main Oct 10, 2025
21 checks passed
@github-actions
Copy link
Contributor

@Mergifyio backport 9.0 9.1 9.2

@mergify
Copy link
Contributor

mergify bot commented Oct 10, 2025

backport 9.0 9.1 9.2

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Oct 10, 2025
* Fix troubleshooting message URL for versions after 9.x

* Add changelog fragment

* Change troubleshoot message to a const variable

* Fix build issue created by the merge

* Fix linter issue

* Revert linter fix and add nolint comment

(cherry picked from commit b74942a)

# Conflicts:
#	internal/pkg/agent/cmd/diagnostics_otel.go
#	internal/pkg/agent/cmd/enroll.go
mergify bot pushed a commit that referenced this pull request Oct 10, 2025
* Fix troubleshooting message URL for versions after 9.x

* Add changelog fragment

* Change troubleshoot message to a const variable

* Fix build issue created by the merge

* Fix linter issue

* Revert linter fix and add nolint comment

(cherry picked from commit b74942a)

# Conflicts:
#	internal/pkg/agent/cmd/diagnostics_otel.go
#	internal/pkg/agent/cmd/enroll.go
mergify bot pushed a commit that referenced this pull request Oct 10, 2025
* Fix troubleshooting message URL for versions after 9.x

* Add changelog fragment

* Change troubleshoot message to a const variable

* Fix build issue created by the merge

* Fix linter issue

* Revert linter fix and add nolint comment

(cherry picked from commit b74942a)
hayotbisonai pushed a commit to hayotbisonai/elastic-agent that referenced this pull request Oct 10, 2025
* Fix troubleshooting message URL for versions after 9.x

* Add changelog fragment

* Change troubleshoot message to a const variable

* Fix build issue created by the merge

* Fix linter issue

* Revert linter fix and add nolint comment
straistaru added a commit that referenced this pull request Oct 10, 2025
* Fix troubleshooting message URL for versions after 9.x

* Add changelog fragment

* Change troubleshoot message to a const variable

* Fix build issue created by the merge

* Fix linter issue

* Revert linter fix and add nolint comment

(cherry picked from commit b74942a)

Co-authored-by: Stefan Traistaru <[email protected]>
straistaru added a commit that referenced this pull request Oct 13, 2025
…after 9.x (#10478)

* Fix troubleshooting message URL for versions after 9.x (#10218)

* Fix troubleshooting message URL for versions after 9.x

* Add changelog fragment

* Change troubleshoot message to a const variable

* Fix build issue created by the merge

* Fix linter issue

* Revert linter fix and add nolint comment

(cherry picked from commit b74942a)

# Conflicts:
#	internal/pkg/agent/cmd/diagnostics_otel.go
#	internal/pkg/agent/cmd/enroll.go

* Solve conflicts

---------

Co-authored-by: Stefan Traistaru <[email protected]>
straistaru added a commit that referenced this pull request Oct 13, 2025
…after 9.x (#10477)

* Fix troubleshooting message URL for versions after 9.x (#10218)

* Fix troubleshooting message URL for versions after 9.x

* Add changelog fragment

* Change troubleshoot message to a const variable

* Fix build issue created by the merge

* Fix linter issue

* Revert linter fix and add nolint comment

(cherry picked from commit b74942a)

# Conflicts:
#	internal/pkg/agent/cmd/diagnostics_otel.go
#	internal/pkg/agent/cmd/enroll.go

* Solve conflicts

* Solve lint issues

---------

Co-authored-by: Stefan Traistaru <[email protected]>
hayotbisonai pushed a commit to hayotbisonai/elastic-agent that referenced this pull request Nov 23, 2025
* Fix troubleshooting message URL for versions after 9.x

* Add changelog fragment

* Change troubleshoot message to a const variable

* Fix build issue created by the merge

* Fix linter issue

* Revert linter fix and add nolint comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-active-9 Automated backport with mergify to all the active 9.[0-9]+ branches bug Something isn't working 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.

Troubleshooting message generates invalid URL in 9.x

3 participants