Skip to content

Conversation

@shortcuts
Copy link
Member

@shortcuts shortcuts commented Nov 18, 2024

🧭 What and Why

🎟 JIRA Ticket: https://algolia.atlassian.net/browse/DI-3199

Changes included:

add a simple push snippet for the end of the setup on the dashboard

  • javascript
  • csharp
  • go
  • php
  • python
  • scala
  • swift
  • kotlin
  • ruby
  • java

@shortcuts shortcuts self-assigned this Nov 18, 2024
@algolia-bot
Copy link
Collaborator

algolia-bot commented Nov 18, 2024

✔️ Code generated!

Name Link
🪓 Triggered by c989d3b3692a48328cc2b79613a6ec293b8ed7f5
🍃 Generated commit 5633f81371fcca186f399c6383a4c4cd8e89b693
🌲 Generated branch generated/feat/guides-for-push
📊 Benchmark results

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

Language Req/s
go 1650
javascript 1639
php 1536
csharp 1459
java 1103
python 1095
ruby 820
swift 731

@shortcuts shortcuts changed the title feat(guides): add pushSetup for ingestion API guides: add pushSetup for ingestion API Nov 18, 2024
@shortcuts shortcuts marked this pull request as ready for review November 18, 2024 14:23
@shortcuts shortcuts requested a review from a team as a code owner November 18, 2024 14:23
"pushSetup": {
"method": "pushTask",
"parameters": {
"taskID": "YOUR_TASK_ID",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I hope this will be replaced by the correct taskID on the dashboard ! cc @morganleroi

Copy link
Member Author

Choose a reason for hiding this comment

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

same!!

@shortcuts shortcuts force-pushed the feat/guides-for-push branch from 649d298 to af6612a Compare November 18, 2024 15:47
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.

sorry

// special lambda for dynamic templates
bundle.put("dynamicTemplate", new DynamicTemplateLambda(this));
bundle.put("dynamicSnippet", new DynamicSnippetLambda(this, models, operations, language, client));
if (new File("tests/CTS/guides/" + client + ".json").exists()) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this be done inside of the lambda directly to avoid leaking the internal logic here ?

Copy link
Member Author

Choose a reason for hiding this comment

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

since it's always called I wanted to avoid no-op as it's less explicit when looking at this file, idk what you prefer

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this files makes it harder since now the path is in multiple files rather than just the lambda, this file should be more generic IMO

}

// use runID in the Observability debugger
fmt.Println("run", run.RunID)
Copy link
Collaborator

Choose a reason for hiding this comment

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

or main run id soon !

Copy link
Member Author

Choose a reason for hiding this comment

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

😶 shhhhh

@shortcuts shortcuts requested a review from millotp November 19, 2024 10:09
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.

gg !

{{> snippets/import}}

using Action = Algolia.Search.Models.Ingestion.Action;
using PushTaskRecords = Algolia.Search.Models.Ingestion.PushTaskRecords;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
using PushTaskRecords = Algolia.Search.Models.Ingestion.PushTaskRecords;
using Algolia.Search.Models.Ingestion.PushTaskRecords;

Copy link
Member Author

Choose a reason for hiding this comment

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

this aliases automatically? nice

millotp
millotp previously approved these changes Nov 19, 2024
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.

beautiful !

@shortcuts shortcuts enabled auto-merge (squash) November 19, 2024 10:42
@shortcuts shortcuts merged commit e199125 into main Nov 19, 2024
28 checks passed
@shortcuts shortcuts deleted the feat/guides-for-push branch November 19, 2024 13:05
algolia-bot added a commit that referenced this pull request Nov 19, 2024
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