Skip to content

[Connectors API] Fix advanced snippet value type #3025

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

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

jedrazb
Copy link
Member

@jedrazb jedrazb commented Oct 17, 2024

Changes

Fix type mismatch between definition in ES, in ES we define the advancedSnippet value as Object, see code reference

This is because this can be either object or array of objects. Changing

Dictionary<string, UserDefinedValue> to UserDefinedValue

Shoutout to @l-trotta for spotting the issue! 🏅

Copy link
Contributor

Following you can find the validation results for the APIs you have changed.

API Status Request Response
connector.check_in 🟢 3/3 3/3
connector.delete 🟢 9/9 9/9
connector.get 🟢 59/59 59/59
connector.last_sync 🟢 7/7 7/7
connector.list 🟢 19/19 19/19
connector.post 🟢 7/7 7/7
connector.put 🟢 13/13 13/13
connector.secret_delete 🟠 Missing type Missing type
connector.secret_get 🟠 Missing type Missing type
connector.secret_post 🟠 Missing type Missing type
connector.secret_put 🟠 Missing type Missing type
connector.sync_job_cancel 🟢 3/3 3/3
connector.sync_job_check_in 🟠 Missing type Missing type
connector.sync_job_claim 🟠 Missing type Missing type
connector.sync_job_delete 🟢 4/4 4/4
connector.sync_job_error 🟠 Missing type Missing type
connector.sync_job_get 🟢 22/22 22/22
connector.sync_job_list 🟢 12/12 12/12
connector.sync_job_post 🟢 50/50 50/50
connector.sync_job_update_stats 🟠 Missing type Missing type
connector.update_active_filtering 🟢 1/1 1/1
connector.update_api_key_id 🟢 4/4 4/4
connector.update_configuration 🟢 8/8 8/8
connector.update_error 🟢 4/4 4/4
connector.update_features 🟠 Missing type Missing type
connector.update_filtering_validation 🟢 3/3 3/3
connector.update_filtering 🟢 12/12 12/12
connector.update_index_name 🟢 4/4 4/4
connector.update_name 🟢 4/4 4/4
connector.update_native 🟢 3/3 3/3
connector.update_pipeline 🟢 3/3 3/3
connector.update_scheduling 🟢 3/3 3/3
connector.update_service_type 🟢 2/2 2/2
connector.update_status 🟢 3/3 3/3

You can validate these APIs yourself by using the make validate target.

Copy link
Contributor

@l-trotta l-trotta left a comment

Choose a reason for hiding this comment

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

LGTM (to be fair it was originally spotted by @Anaethelion)

@jedrazb jedrazb merged commit 82461cc into main Oct 17, 2024
10 checks passed
@jedrazb jedrazb deleted the fix-connectors-api-update-advanced-sync-rules-types branch October 17, 2024 14:46
Copy link
Contributor

The backport to 8.15 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.15 8.15
# Navigate to the new working tree
cd .worktrees/backport-8.15
# Create a new branch
git switch --create backport-3025-to-8.15
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 82461ccded3b202c4c24aed47ef79057bc41c0fc
# Push it to GitHub
git push --set-upstream origin backport-3025-to-8.15
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.15

Then, create a pull request where the base branch is 8.15 and the compare/head branch is backport-3025-to-8.15.

github-actions bot pushed a commit that referenced this pull request Oct 17, 2024
github-actions bot pushed a commit that referenced this pull request Oct 17, 2024
l-trotta pushed a commit that referenced this pull request Oct 17, 2024
(cherry picked from commit 82461cc)

Co-authored-by: Jedr Blaszyk <[email protected]>
l-trotta pushed a commit that referenced this pull request Oct 17, 2024
(cherry picked from commit 82461cc)

Co-authored-by: Jedr Blaszyk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants