Skip to content

Solve synchronization of KI's between KB and KER#13

Open
DaviddeBest-TNO wants to merge 4 commits intomainfrom
12-ki-synchronization
Open

Solve synchronization of KI's between KB and KER#13
DaviddeBest-TNO wants to merge 4 commits intomainfrom
12-ki-synchronization

Conversation

@DaviddeBest-TNO
Copy link
Copy Markdown
Contributor

Solves #12

Tests for various (incorrect) scenarios, like KI registration before KB registration, double registration, duplicate names, etc.

@DaviddeBest-TNO DaviddeBest-TNO linked an issue Mar 31, 2026 that may be closed by this pull request
3 tasks
@DaviddeBest-TNO DaviddeBest-TNO marked this pull request as ready for review March 31, 2026 09:15
"""
...

def get_knowledge_interactions(self, kb_id: str) -> list[KnowledgeInteractionInfo]:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Misschien get_all_knowledge_interactions noemen zodat de naming consistent is met de get_all_knowledge_bases

self.registered = True
self.register_deferred_kis()
self.client.register_kb(self.info, reregister=True)
self.state = KnowledgeBaseState.REGISTERED
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Wat gebeurt er als register_kb niet succeed/faalt met een exceptie? Wordt de state dan alsnog op REGISTERED gezet?

self.deferred_kis.clear()
def sync_knowledge_interactions(self) -> None:
"""Synchronize registration of knowledge interactions in this object's registry
with the interactions registered at the KE runtime, so all unregistered KIs in
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

it's not the KIs in the registry that are unregistered right, but the KIs that are unregistered will be added to the registry?
Perhaps slight rewording helps to clarify this: "so all unregistered KIs are registered in the registry"

the KE runtime.
UnexpectedHttpResponseError: If the KE runtime returns an unexpected HTTP
response.
Exception: If an unexpected poll result is returned.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Could this Exception be made more specific?

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.

Implement correct synchronization of KI's between KER and KB

2 participants