Skip to content

fix(specs): make fetchedIndex pending-task and build-time fields optional - #7223

Draft
Fluf22 wants to merge 1 commit into
mainfrom
cursor/fetched-index-optional-fields-fb33
Draft

Fluf22 wants to merge 1 commit into
mainfrom
cursor/fetched-index-optional-fields-fb33

Conversation

@Fluf22

@Fluf22 Fluf22 commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

What and Why

JIRA: CR-12396

GET /1/indexes on Metis does not return lastBuildTimeS, numberOfPendingTasks and pendingTask, so strict generated models (e.g. Python pydantic FetchedIndex) fail with a ValidationError on list_indices().

Changes included

  • Remove lastBuildTimeS, numberOfPendingTasks, pendingTask from required in fetchedIndex.
  • Mark numberOfPendingTasks and pendingTask as deprecated: true and drop their default values (defaults are handled by the engine).
  • Note on lastBuildTimeS that it is not returned by all infrastructures.

BREAKING CHANGES

Language What changed Who breaks
Go Fields become *int32 / *bool with omitempty. The NewFetchedIndex constructor loses three parameters. WithFetchedIndex… options are added. Everyone who reads or sets the fields directly. Callers of NewFetchedIndex(...) fail to compile because of the shorter signature.
Swift Properties become Int? / Bool?. Initializer parameters become = nil, and the properties are marked deprecated. Code that reads them as non-optional.
Kotlin Properties become Int? / Boolean? with = null, and the two pending-task fields are marked deprecated. Code that reads them as non-null. Constructor callers still compile, since all parameters now have defaults.
Scala Fields become Option[Int] / Option[Boolean] with = None. Code that reads them as plain values. Positional constructor calls also break.
C# Properties become int? / bool? and the constructor loses three parameters. The two pending-task properties get [Obsolete]. Code that reads them as non-nullable, and new FetchedIndex(...) callers. [Obsolete] also adds compiler warnings.
Dart Fields become nullable and constructor parameters are no longer required. Code that reads them as non-null.
TypeScript lastBuildTimeS?: number | undefined, and the same for the other two fields. Code that uses the values as definite types under strict mode.

Test

No CTS fixtures reference these fields. Generated clients and CTS are left to CI.

Open in Web Open in Cursor 

@algolia-api-clients-automation-bot

algolia-api-clients-automation-bot Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

✔️ Code generated!

Name Link
🪓 Triggered by d5f4cf0d69257167630f2697707dd871543790f0
🍃 Generated commit afd3ce363591dda9735f0c14787fcf8319fe5be7
🌲 Generated branch generated/cursor/fetched-index-optional-fields-fb33
📊 Benchmark results

Benchmarks performed on the method using a mock server, the results might not reflect the real-world performance.

Language Req/s
javascript 2344
csharp 1980
go 1956
php 1563
python 1328
ruby 1320
java 1107
scala 655
swift 496

…onal

Co-authored-by: Thomas Raffray <Fluf22@users.noreply.github.com>
@Fluf22
Fluf22 force-pushed the cursor/fetched-index-optional-fields-fb33 branch from a96adb7 to 817e255 Compare November 6, 2026 12:58

This branch has not been deployed

No deployments
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.

2 participants