Skip to content

Conversation

hayotbisonai
Copy link
Contributor

@hayotbisonai hayotbisonai commented Oct 9, 2025

What does this PR do?

  • url check in Fetch to ensure baseURL is valid and prevent runtime errors
  • included tests with invalid baseURL

Why is it important?

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

Disruptive User Impact

How to test this PR locally

Related issues

Questions to ask yourself

  • How are we going to support this in production?
  • How are we going to measure its adoption?
  • How are we going to debug this?
  • What are the metrics I should take care of?
  • ...

Copy link
Contributor

mergify bot commented Oct 9, 2025

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

@hayotbisonai hayotbisonai changed the title [fix] url validation in HttpFetcher.Fetch [fix] Adding url validation in HttpFetcher.Fetch Oct 9, 2025
@hayotbisonai hayotbisonai changed the title [fix] Adding url validation in HttpFetcher.Fetch [fix] Add url validation in HttpFetcher.Fetch Oct 9, 2025
@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Oct 9, 2025
@blakerouse
Copy link
Contributor

@hayotbisonai Thanks for the contribution. Change looks good overall, thanks for the extra check. Once it shows a green CI, I will give an approval.

@blakerouse blakerouse added the backport-active-all Automated backport with mergify to all the active branches label Oct 9, 2025
@elasticmachine
Copy link
Collaborator

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

@pchila
Copy link
Member

pchila commented Oct 10, 2025

buildkite test this

Copy link
Member

@rubenruizdegauna rubenruizdegauna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rubenruizdegauna rubenruizdegauna merged commit ffcf093 into elastic:main Oct 14, 2025
22 of 23 checks passed
Copy link
Contributor

@Mergifyio backport 8.18 8.19 9.0 9.1 9.2

Copy link
Contributor

mergify bot commented Oct 14, 2025

mergify bot pushed a commit that referenced this pull request Oct 14, 2025
* feat: url parser error check

* feat: fetcher test with invalid url

* fix: remove error check

* fix: remove test case

* fix: move url validator check into httpFetcherResult method

* fix: test case

(cherry picked from commit ffcf093)
mergify bot pushed a commit that referenced this pull request Oct 14, 2025
* feat: url parser error check

* feat: fetcher test with invalid url

* fix: remove error check

* fix: remove test case

* fix: move url validator check into httpFetcherResult method

* fix: test case

(cherry picked from commit ffcf093)
mergify bot pushed a commit that referenced this pull request Oct 14, 2025
* feat: url parser error check

* feat: fetcher test with invalid url

* fix: remove error check

* fix: remove test case

* fix: move url validator check into httpFetcherResult method

* fix: test case

(cherry picked from commit ffcf093)
mergify bot pushed a commit that referenced this pull request Oct 14, 2025
* feat: url parser error check

* feat: fetcher test with invalid url

* fix: remove error check

* fix: remove test case

* fix: move url validator check into httpFetcherResult method

* fix: test case

(cherry picked from commit ffcf093)
mergify bot pushed a commit that referenced this pull request Oct 14, 2025
* feat: url parser error check

* feat: fetcher test with invalid url

* fix: remove error check

* fix: remove test case

* fix: move url validator check into httpFetcherResult method

* fix: test case

(cherry picked from commit ffcf093)
pierrehilbert pushed a commit that referenced this pull request Oct 14, 2025
* feat: url parser error check

* feat: fetcher test with invalid url

* fix: remove error check

* fix: remove test case

* fix: move url validator check into httpFetcherResult method

* fix: test case

(cherry picked from commit ffcf093)

Co-authored-by: Barkhayot <[email protected]>
rubenruizdegauna pushed a commit that referenced this pull request Oct 14, 2025
* feat: url parser error check

* feat: fetcher test with invalid url

* fix: remove error check

* fix: remove test case

* fix: move url validator check into httpFetcherResult method

* fix: test case

(cherry picked from commit ffcf093)

Co-authored-by: Barkhayot <[email protected]>
pierrehilbert pushed a commit that referenced this pull request Oct 14, 2025
* feat: url parser error check

* feat: fetcher test with invalid url

* fix: remove error check

* fix: remove test case

* fix: move url validator check into httpFetcherResult method

* fix: test case

(cherry picked from commit ffcf093)

Co-authored-by: Barkhayot <[email protected]>
pierrehilbert pushed a commit that referenced this pull request Oct 14, 2025
* feat: url parser error check

* feat: fetcher test with invalid url

* fix: remove error check

* fix: remove test case

* fix: move url validator check into httpFetcherResult method

* fix: test case

(cherry picked from commit ffcf093)

Co-authored-by: Barkhayot <[email protected]>
rubenruizdegauna pushed a commit that referenced this pull request Oct 16, 2025
* feat: url parser error check

* feat: fetcher test with invalid url

* fix: remove error check

* fix: remove test case

* fix: move url validator check into httpFetcherResult method

* fix: test case

(cherry picked from commit ffcf093)

Co-authored-by: Barkhayot <[email protected]>
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 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.

6 participants