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

[Framework] Correctly handle soft deleted connectors #3178

Merged
merged 4 commits into from
Feb 6, 2025

Conversation

jedrazb
Copy link
Member

@jedrazb jedrazb commented Feb 5, 2025

Closes #3118

Since we introduced soft-deletes in 9.0, make sure framework respects deleted flag.

Changes

Exclude any connectors with deleted: true when fetching supported connectors in a query (note, I added this to native connectors query for conssitency but this code should be deleted anyway #2991)

This is in line with how API handles soft-deleted connectors https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/ent-search/src/main/java/org/elasticsearch/xpack/application/connector/ConnectorIndexService.java#L410C12-L410C119

Checklists

Pre-Review Checklist

  • this PR does NOT contain credentials of any kind, such as API keys or username/passwords (double check config.yml.example)
  • this PR has a meaningful title
  • this PR links to all relevant github issues that it fixes or partially addresses
  • if there is no GH issue, please create it. Each PR should have a link to an issue
  • this PR has a thorough description
  • Covered the changes with automated tests
  • Tested the changes locally
  • Added a label for each target release version (example: v7.13.2, v7.14.0, v8.0.0)
  • Considered corresponding documentation changes
  • Contributed any configuration settings changes to the configuration reference

Verification

Ran this locally with debug log enabled with ES 9.0. Soft-deleted connector, and that was resulting output of the framework:

[content_sync_job_execution_service] There's no supported connectors found with native service types [] or connector ids [Fq4v1pQBjAGa8X_ervuC]         

Fq4v1pQBjAGa8X_ervuC was soft deleted so behaviour is correct

@jedrazb jedrazb enabled auto-merge (squash) February 5, 2025 13:40
@jedrazb jedrazb changed the title [Framework] Correctly detect soft deleted connectors [Framework] Correctly handle soft deleted connectors Feb 5, 2025
@jedrazb
Copy link
Member Author

jedrazb commented Feb 6, 2025

buildkite test this

@jedrazb jedrazb merged commit 4256f31 into main Feb 6, 2025
2 checks passed
@jedrazb jedrazb deleted the support-soft-deletes-in-the-framework branch February 6, 2025 14:22
Copy link

github-actions bot commented Feb 6, 2025

💚 Backport PR(s) successfully created

Status Branch Result
9.0 #3188

This backport PR will be merged automatically after passing CI.

jedrazb added a commit that referenced this pull request Feb 7, 2025
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.

Soft-deletes not respected by connector framework logic
2 participants