Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(clients): add Kotlin API client #1400

Merged
merged 14 commits into from
May 4, 2023
Merged

feat(clients): add Kotlin API client #1400

merged 14 commits into from
May 4, 2023

Conversation

aallam
Copy link
Member

@aallam aallam commented Mar 14, 2023

🧭 What and Why

Generation of Kotlin API Client with the following specification:

  • Using Kotlin Multiplatform. First targets are JVM and iOS.
  • kotlinx.serialization for serialization.
  • Ktor client as HTTP client.

🎟 JIRA Ticket:

APIC-651
APIC-652

Changes included:

  • Clients generation
    • Abtesting
    • Analytics
    • Ingestion
    • Insights
    • Personalization
    • Predict
    • QuerySuggestions
    • Recommend
    • Search
  • Playgound
  • CTS

@netlify
Copy link

netlify bot commented Mar 14, 2023

Deploy Preview for api-clients-automation ready!

Name Link
🔨 Latest commit 36013ca
🔍 Latest deploy log https://app.netlify.com/sites/api-clients-automation/deploys/6453c18b7790570008a87940
😎 Deploy Preview https://deploy-preview-1400--api-clients-automation.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@algolia-bot
Copy link
Collaborator

algolia-bot commented Mar 14, 2023

✗ The generated branch has been deleted.

If the PR has been merged, you can check the generated code on the main branch.
You can still access the code generated on main via this commit.

@aallam aallam force-pushed the feat/kotlin branch 3 times, most recently from a1b05fa to ae4ae98 Compare March 14, 2023 11:20
@aallam aallam changed the title feat: add Kotlin API client feat(clients): add Kotlin API client Mar 14, 2023
@aallam aallam force-pushed the feat/kotlin branch 3 times, most recently from d5d1dc6 to 899db6e Compare March 14, 2023 14:46
Copy link
Collaborator

@millotp millotp left a comment

Choose a reason for hiding this comment

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

looks really nice ! First pass on the form of the PR, there is too much to look at everything ahah, GG !

@aallam aallam force-pushed the feat/kotlin branch 5 times, most recently from e0cc2a1 to a68c7a3 Compare March 27, 2023 20:59
@aallam aallam force-pushed the feat/kotlin branch 2 times, most recently from 47d7508 to fe26fa4 Compare April 13, 2023 12:33
@aallam aallam marked this pull request as ready for review April 13, 2023 12:33
@aallam aallam requested a review from a team as a code owner April 13, 2023 12:33
Copy link
Collaborator

@millotp millotp left a comment

Choose a reason for hiding this comment

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

amazing work !

@aallam aallam force-pushed the feat/kotlin branch 7 times, most recently from 4edd2c9 to f95ce1b Compare April 20, 2023 14:07
@aallam aallam added the Kotlin Issue related to Kotlin client label May 2, 2023
Copy link
Collaborator

@millotp millotp left a comment

Choose a reason for hiding this comment

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

Nice !
I think there is an issue with the CI, there is no code generated, can you try to bump the cache key pls ?

@millotp
Copy link
Collaborator

millotp commented May 2, 2023

ah maybe it's not a cache key issue but a artifacts issue, we use them to pass file from jobs to jobs in the CI, you need to add one for kotlin in .github/actions/restore-artifacts/action.yml

Copy link
Contributor

@Fluf22 Fluf22 left a comment

Choose a reason for hiding this comment

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

Just a question following up @millotp remarks about versioning!

Otherwise, it looks really great!! Amazing work 🙌🏻

config/clients.config.json Show resolved Hide resolved
Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

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

This looks super clean, gg!

@aallam aallam requested review from shortcuts and millotp May 4, 2023 10:09
Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

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

Nothing to add on my side, SHIP IT!!

Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

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

actually can you bump this value? https://github.com/algolia/api-clients-automation/blob/main/.github/.cache_version

so we get a full CI run

@aallam aallam requested a review from shortcuts May 4, 2023 12:05

# Kotlin
- name: Download clients-kotlin artifact
if: ${{ inputs.kotlin == 'true' && inputs.type == 'all' }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you add kotlin: true in main.yml where we call restore-artifacts pls ? otherwise this is ignored

Copy link
Member Author

Choose a reason for hiding this comment

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

Done!

millotp
millotp previously approved these changes May 4, 2023
Copy link
Collaborator

@millotp millotp left a comment

Choose a reason for hiding this comment

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

i'm sorry I didn't except the CI to be that complicated, maybe it's easier if you make it work in another PR, this one is already huge and awesome, let's start with that !

To make the CI push the generated code you need to edit the setRunVariables.ts file to export a RUN_GEN_KOTLIN var

@aallam
Copy link
Member Author

aallam commented May 4, 2023

@millotp Hopefully this time is the one 😅 otherwise I will make another PR for the CI

Copy link
Collaborator

@millotp millotp left a comment

Choose a reason for hiding this comment

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

looks like there is still something missing, but I'm not sure what

@aallam aallam enabled auto-merge (squash) May 4, 2023 14:55
@aallam aallam merged commit 558b8fb into main May 4, 2023
@aallam aallam deleted the feat/kotlin branch May 4, 2023 14:56
algolia-bot added a commit to algolia/algoliasearch-client-kotlin that referenced this pull request May 4, 2023
algolia/api-clients-automation#1400

Co-authored-by: Mouaad Aallam <Mouaad@Aallam.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Kotlin Issue related to Kotlin client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants