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

[Connector API] QA adapt handling null values in parser/toXContent #103107

Conversation

jedrazb
Copy link
Member

@jedrazb jedrazb commented Dec 7, 2023

Changes

  • I double checked with status quo, certain fields are expected to be nullable in the index. Changed the parser / toXContent logic to adapt to that
  • Tested by manually indexing a doc from a connector created by Kibana. After my changes the status quo connector doc can be parsed correctly.
  • Adapted tests
  • Also cleaned up parser a bit

@jedrazb jedrazb added >bug :EnterpriseSearch/Application Enterprise Search Team:Enterprise Search Meta label for Enterprise Search team v8.12.0 and removed v8.13.0 labels Dec 7, 2023
@jedrazb jedrazb marked this pull request as ready for review December 7, 2023 09:25
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/ent-search-eng (Team:Enterprise Search)

@jedrazb jedrazb requested a review from timgrein December 7, 2023 09:25
@jedrazb jedrazb added >non-issue and removed >bug labels Dec 7, 2023
Copy link
Contributor

@timgrein timgrein left a comment

Choose a reason for hiding this comment

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

LGTM. Just one question: do we've explicit unit tests for writing null values for all nullable fields? I see them being removed from ConnectorTestUtils.

@jedrazb jedrazb added the v8.13.0 label Dec 7, 2023
@jedrazb
Copy link
Member Author

jedrazb commented Dec 7, 2023

Just one question: do we've explicit unit tests for writing null values for all nullable fields? I see them being removed from ConnectorTestUtils.

Good point. I realized that certain fields are in fact non-nullable. I added corresponding changes to the Connector class along with explicit checks in the constructor.

@jedrazb jedrazb changed the title [Connector API] QA bugfix, adapt handling null values in parser/toXContent [Connector API] QA adapt handling null values in parser/toXContent Dec 7, 2023
@jedrazb jedrazb merged commit 6313275 into elastic:main Dec 7, 2023
15 checks passed
jedrazb added a commit to jedrazb/elasticsearch that referenced this pull request Dec 12, 2023
@jedrazb
Copy link
Member Author

jedrazb commented Dec 12, 2023

💚 All backports created successfully

Status Branch Result
8.12

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants