Skip to content

feat(specs): introduce multifeed composition behavior for beta release#5828

Merged
Fluf22 merged 4 commits intomainfrom
feat/compositions/multifeed-behavior-beta
Jan 20, 2026
Merged

feat(specs): introduce multifeed composition behavior for beta release#5828
Fluf22 merged 4 commits intomainfrom
feat/compositions/multifeed-behavior-beta

Conversation

@gavinwade12
Copy link
Copy Markdown
Contributor

@gavinwade12 gavinwade12 commented Jan 15, 2026

🧭 What and Why

This PR introduces the new multifeed composition behavior. It should currently be released in beta / privately / whatever we did prior to our GA launch.

🎟 JIRA Ticket: CMP-709 + Slack thread for more context

Changes included:

  • Add multifeed behavior schema
  • Add specific types for each case of behavior: compositionInjectionBehavior and compositionMultifeedBehavior
  • Change compositionBehavior to be oneOf the two preceding types, meaning the injection and multifeed fields within the behavior object are mutually exclusive

🧪 Test

  • Green CI
  • yarn cli generate javascript compositions yields valid results i.e. the new types exist + are correct and CompositionBehavior is now a union of the two specific behavior types (CompositionInjectionBehavior | CompositionMultifeedBehavior)

@gavinwade12 gavinwade12 requested a review from a team as a code owner January 15, 2026 20:51
@algolia-bot
Copy link
Copy Markdown
Collaborator

algolia-bot commented Jan 15, 2026

✔️ Code generated!

Name Link
🪓 Triggered by 74901440ac8b4a486a14d92c5e62ce6598c757a3
🍃 Generated commit a66724cfe98bb979118cd7c692776308c4b724c2
🌲 Generated branch generated/feat/compositions/multifeed-behavior-beta
📊 Benchmark results

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

Language Req/s
javascript 2447
go 2205
php 1890
csharp 1499
python 1362
java 1183
ruby 879
swift 637
scala 23

@gavinwade12 gavinwade12 changed the title feat(compositions): introduce multifeed behavior for beta release feat(specs): introduce multifeed composition behavior for beta release Jan 15, 2026
Copy link
Copy Markdown
Contributor

@ClaraMuller ClaraMuller left a comment

Choose a reason for hiding this comment

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

Small comment,
Not approving just because I believe we don't want to merge now but good for me 👍
Having a look why we have a breaking change 🤷‍♀️

description: A key-value store of Feed ID to Feed. Currently, the only supported Feed type is an Injection.
additionalProperties:
$ref: '../injection/Behaviour.yml#/injection'
feedsOrder:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you add an example ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I added one, but I couldn't figure out how to get the generated doc page, e.g. this, locally to see if it looked correct

@ClaraMuller
Copy link
Copy Markdown
Contributor

2026-01-15T20:56:49.1476928Z ***! MODIFIED INTERFACE (<- CLASS) : PUBLIC ABSTRACT (<- NON_ABSTRACT) com.algolia.model.composition.CompositionBehavior  (not serializable)
2026-01-15T20:56:49.1477709Z 	===  CLASS FILE FORMAT VERSION: 52.0 <- 52.0
2026-01-15T20:56:49.1478342Z 	===  UNCHANGED SUPERCLASS: java.lang.Object (<- java.lang.Object)
2026-01-15T20:56:49.1479291Z 	---! REMOVED CONSTRUCTOR: PUBLIC(-) CompositionBehavior()
2026-01-15T20:56:49.1480310Z 	---! REMOVED METHOD: PUBLIC(-) com.algolia.model.composition.Injection getInjection()
2026-01-15T20:56:49.1481951Z 	---! REMOVED METHOD: PUBLIC(-) com.algolia.model.composition.CompositionBehavior setInjection(com.algolia.model.composition.Injection)
2026-01-15T20:56:49.1483480Z +++  NEW CLASS: PUBLIC(+) FINAL(+) kotlin.collections.builders.SerializedCollection  (changed from Serializable to Externalizable)
2026-01-15T20:56:49.1484593Z 	+++  CLASS FILE FORMAT VERSION: 52.0 <- n.a.
2026-01-15T20:56:49.1485419Z 	+++  NEW SUPERCLASS: java.lang.Object
2026-01-15T20:56:49.1557087Z ##[group]Run rm -rf tests/output/java/src/test/java/com/algolia/client tests/output/java/src/test/java/com/algolia/requests tests/output/java/src/test/java/com/algolia/e2e tests/output/java/src/test/java/com/algolia/benchmark || true
2026-01-15T20:56:49.1559019Z �[36;1mrm -rf tests/output/java/src/test/java/com/algolia/client tests/output/java/src/test/java/com/algolia/requests```

@ClaraMuller ClaraMuller requested review from Fluf22 and e-krebs January 16, 2026 09:21
@ClaraMuller
Copy link
Copy Markdown
Contributor

ClaraMuller commented Jan 16, 2026

@Fluf22 How we can remove te breaking change ? Because this update will still be done when we will actually release the feature ?

@ClaraMuller ClaraMuller requested a review from a team January 16, 2026 09:21
@gavinwade12
Copy link
Copy Markdown
Contributor Author

gavinwade12 commented Jan 16, 2026

@Fluf22 How we can remove te breaking change ? Because this update will still be done when we will actually release the feature ?

There's a breaking change because I made the behaviors mutually exclusive using oneOf, which changes the types a bit.

If we don't want a breaking change, I can make it so, but it'll be possible to set both behaviors at once at the client level, which is invalid. I think it's only a breaking change for some languages, like Go, that can't handle oneOf as nicely as e.g. JavaScript.

@ClaraMuller
Copy link
Copy Markdown
Contributor

it'll be possible to set both behaviors at once at the client level, which is invalid.

In my mind this is not a good solution but I am not the expert on that topic so I'll let api client team choose what is the best solution.

@Fluf22
Copy link
Copy Markdown
Collaborator

Fluf22 commented Jan 16, 2026

Ultimately, it's your call: if the first feature is currently used, we shouldn't do a breaking change. If that's necessary, we will have to add a notice like I did last time
If the feature isn't used yet, I guess it's okay to make a BC then

@gavinwade12
Copy link
Copy Markdown
Contributor Author

gavinwade12 commented Jan 16, 2026

I just pushed a commit that changes to a less-strict typing, so there should be less breaking changes. There may still be some since injection is no longer required within a behavior, so Injection*Injection in some languages.

I noticed we have the same issue for the batch endpoint, where we could actually be even stricter with the types at the client level. I think we should open a separate PR for stricter typing, especially since this isn't meant to be released publicly yet.

ClaraMuller
ClaraMuller previously approved these changes Jan 19, 2026
@gavinwade12 gavinwade12 force-pushed the feat/compositions/multifeed-behavior-beta branch from 9f23ab7 to b74b391 Compare January 20, 2026 12:55
@Fluf22 Fluf22 force-pushed the feat/compositions/multifeed-behavior-beta branch from b74b391 to 827900a Compare January 20, 2026 15:57
@Fluf22 Fluf22 force-pushed the feat/compositions/multifeed-behavior-beta branch from 827900a to 91415cb Compare January 20, 2026 15:58
@Fluf22 Fluf22 force-pushed the feat/compositions/multifeed-behavior-beta branch from a81d3ff to ab3e5be Compare January 20, 2026 16:12
@Fluf22 Fluf22 requested a review from a team as a code owner January 20, 2026 16:12
@Fluf22 Fluf22 requested a review from eric-zaharia January 20, 2026 16:12
@Fluf22 Fluf22 merged commit f9ac3a7 into main Jan 20, 2026
37 checks passed
@Fluf22 Fluf22 deleted the feat/compositions/multifeed-behavior-beta branch January 20, 2026 16:40
algolia-bot added a commit that referenced this pull request Jan 20, 2026
#5828) (generated) [skip ci]

Co-authored-by: Gavin Wade <gavin.wade12@gmail.com>
algolia-bot added a commit to algolia/algoliasearch-client-csharp that referenced this pull request Jan 20, 2026
…e (generated)

algolia/api-clients-automation#5828

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Gavin Wade <gavin.wade12@gmail.com>
algolia-bot added a commit to algolia/algoliasearch-client-dart that referenced this pull request Jan 20, 2026
…e (generated)

algolia/api-clients-automation#5828

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Gavin Wade <gavin.wade12@gmail.com>
algolia-bot added a commit to algolia/algoliasearch-client-go that referenced this pull request Jan 20, 2026
…e (generated)

algolia/api-clients-automation#5828

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Gavin Wade <gavin.wade12@gmail.com>
algolia-bot added a commit to algolia/algoliasearch-client-java that referenced this pull request Jan 20, 2026
…e (generated)

algolia/api-clients-automation#5828

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Gavin Wade <gavin.wade12@gmail.com>
algolia-bot added a commit to algolia/algoliasearch-client-javascript that referenced this pull request Jan 20, 2026
…e (generated)

algolia/api-clients-automation#5828

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Gavin Wade <gavin.wade12@gmail.com>
algolia-bot added a commit to algolia/algoliasearch-client-kotlin that referenced this pull request Jan 20, 2026
…e (generated)

algolia/api-clients-automation#5828

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Gavin Wade <gavin.wade12@gmail.com>
algolia-bot added a commit to algolia/algoliasearch-client-php that referenced this pull request Jan 20, 2026
…e (generated)

algolia/api-clients-automation#5828

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Gavin Wade <gavin.wade12@gmail.com>
algolia-bot added a commit to algolia/algoliasearch-client-python that referenced this pull request Jan 20, 2026
…e (generated)

algolia/api-clients-automation#5828

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Gavin Wade <gavin.wade12@gmail.com>
algolia-bot added a commit to algolia/algoliasearch-client-ruby that referenced this pull request Jan 20, 2026
…e (generated)

algolia/api-clients-automation#5828

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Gavin Wade <gavin.wade12@gmail.com>
algolia-bot added a commit to algolia/algoliasearch-client-scala that referenced this pull request Jan 20, 2026
…e (generated)

algolia/api-clients-automation#5828

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Gavin Wade <gavin.wade12@gmail.com>
algolia-bot added a commit to algolia/algoliasearch-client-swift that referenced this pull request Jan 20, 2026
…e (generated)

algolia/api-clients-automation#5828

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Gavin Wade <gavin.wade12@gmail.com>
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.

4 participants