Skip to content

Conversation

@mallendem
Copy link
Contributor

This pull request updates the source URL used to fetch Elasticsearch release data across multiple implementations in the codebase. The main change is switching from the legacy https://artifacts.elastic.co/releases/stack.json endpoint to the new https://ela.st/past-stack-releases endpoint, ensuring consistent and up-to-date data retrieval for Elasticsearch versions.

Endpoint update for Elasticsearch release data:

  • Python (main.py): Changed the fetch URL in get_latest_elasticsearch_version to use the new endpoint.
  • .NET (Program.cs): Updated the HTTP request in GetLatestVersion to use the new URL.
  • Java (ElasticsearchTools.java): Modified the WebClient request to point to the new endpoint.
  • JavaScript (index.js): Updated the fetch call in getLatestElasticsearchVersion to use the new URL.

Test and cassette updates:

  • YAML cassette (test_main.yaml): Updated both the request URI and the returned manifest field to reflect the new endpoint, ensuring test coverage matches the production change. [1] [2]

Copilot AI review requested due to automatic review settings December 3, 2025 11:44
@mallendem mallendem requested a review from anuraaga as a code owner December 3, 2025 11:44
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the Elasticsearch release data source from the legacy https://artifacts.elastic.co/releases/stack.json endpoint to the new https://ela.st/past-stack-releases endpoint across multiple language implementations (Python, .NET, Java, JavaScript) of the same Elasticsearch version lookup functionality.

Key changes:

  • Updated the fetch URL in all four language implementations to use the new endpoint
  • Updated the Python test cassette to reflect the new endpoint in the recorded HTTP interactions

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
genai-function-calling/vercel-ai/index.js Updated fetch URL in getLatestElasticsearchVersion function
genai-function-calling/spring-ai/src/main/java/example/ElasticsearchTools.java Updated WebClient URI in getLatestElasticsearchVersion method; comment about old endpoint needs updating
genai-function-calling/semantic-kernel-dotnet/Program.cs Updated HttpClient request URL in GetLatestVersion method
genai-function-calling/openai-agents/main.py Updated HTTP GET request URL in get_latest_elasticsearch_version function
genai-function-calling/openai-agents/cassettes/test_main.yaml Updated request URI and manifest field; manifest field contains incorrect value for one release entry

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"is_retired": false,
"retired_date": null,
"manifest": "https://artifacts.elastic.co/releases/stack.json"
"manifest": "https://ela.st/past-stack-releases"
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

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

The manifest field for this release entry is incorrectly set to https://ela.st/past-stack-releases. Based on the pattern used for all other release entries in this file, this should be https://artifacts.elastic.co/downloads/8.18.8.json (a version-specific download manifest, not the releases list endpoint). Note that there's also a duplicate entry for version "8.18.8" at lines 2425-2433 with the correct manifest value.

Copilot uses AI. Check for mistakes.
ReleasesResponse response = WebClient.create().get().uri("https://artifacts.elastic.co/releases/stack.json")
ReleasesResponse response = WebClient.create().get().uri("https://ela.st/past-stack-releases")
.exchangeToMono(res -> res.mutate()
// Fix incorrect content-type from artifacts.elastic.co
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

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

The comment references the old endpoint artifacts.elastic.co but the code now uses https://ela.st/past-stack-releases. The comment should be updated to reflect the current endpoint being used.

Suggested change
// Fix incorrect content-type from artifacts.elastic.co
// Fix incorrect content-type from ela.st/past-stack-releases

Copilot uses AI. Check for mistakes.
@mallendem mallendem merged commit d67d36e into main Dec 4, 2025
12 checks passed
@mallendem mallendem deleted the migrate-release-endpoint branch December 4, 2025 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants