-
Notifications
You must be signed in to change notification settings - Fork 80
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
[Connector APIs] Update existing endpoints #2675
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Hey @l-trotta 👋 I see you assigned yourself to the issue. I tried addressing the concerns we discussed in the last call. Happy to answer any questions and address any other concerns! EDIT: I see there are some failing tests, let me address it first |
This comment has been minimized.
This comment has been minimized.
Hey @jedrazb, this is good timing because we just managed to add Connectors YAML tests to the flight recorder, so I reran validation and you can see the results in the above comment. I can report that compared to the current state, this pull requests:
The rest is unchanged. I can open an issue listing the failures to not block this pull request which definitely improves things. |
Hey @pquentin ! The changes that fix remaining issues should be minimal, I'm having issues running |
This comment was marked as outdated.
This comment was marked as outdated.
Now it looks better! Two issues:
I think we can address those issues as a followup. |
does this field exist only in the connector response? https://github.com/elastic/elasticsearch/blob/e1a091f1a2a7444873a1887c686186af580649e3/x-pack/plugin/ent-search/src/main/java/org/elasticsearch/xpack/application/connector/Connector.java#L211 |
I'm starting to consider mapping the connector request and response in two different classes, as you can see from the validator: |
This comment was marked as outdated.
This comment was marked as outdated.
Hey @l-trotta 👋 As we discussed in the call, I'm updating the spec to address main issues:
I had to put I marked There are just 2 failing test cases related to crawler state (in connector doc!). Due to historical reasons, some parts of the crawler state were, and still are, stored in the connector index. However, it was agreed that the connector API should not interact with the crawler, so those tests should be removed from ES. I don’t think these failures should block us in this PR, as this is a quirky edge case. Can explain more if needed :) |
Hey @jedrazb, got it we'll wait for the yaml tests to be fixed! Also: |
|
Okok I see, let me get rid of those tests from the server first. |
This comment was marked as outdated.
This comment was marked as outdated.
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
@l-trotta addressed your feedback around |
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
The backport to
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-2675-to-8.15
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 4b67d9a824878e54a250d4c9c333474a9a06a141
# Push it to GitHub
git push --set-upstream origin backport-2675-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 |
Co-authored-by: Jedr Blaszyk <[email protected]>
Hey 👋
As discussed, I reviewed the existing Connector API endpoints and added patches to update them to the
8.15
state.Changes
index_name
anderror
(includinglast_sync_error
andlast_access_control_sync_error
) are the only properties that use semantic null.index_name
can be set to null to detach the connector, error can be reset tonull
to indicate healthy state again. We are using optional for everything else.sync_cursor
field in the Connector definition (we missed it before) and add this as an arg to_last_sync
endpoint (new payload field added in 8.15)ConnectorFeatures
representation as it included long-deprecated feature names (filtering_advanced_config
andfiltering_rules
), add missingnative_connector_api_keys
Note
We have this open issue with
_last_sync
endpoint (confusion between semantic null and optional when updatinglast_sync_*_error
). We are looking into fixing this.Also, this PR should address existing endpoints, there are couple of endpoints that are still missing. Let's work on this patch first. :)