Skip to content

Knowledge and Skill contribution fails if the initial#170

Merged
nerdalert merged 1 commit intoinstructlab:mainfrom
vishnoianil:issue-52
Sep 14, 2024
Merged

Knowledge and Skill contribution fails if the initial#170
nerdalert merged 1 commit intoinstructlab:mainfrom
vishnoianil:issue-52

Conversation

@vishnoianil
Copy link
Member

taxonomy clone is not present in user github account.

UI attempts to create the clone, but the clone can take some time to finish. When UI attempts to get the base sha of the repo's main branch it fails because the repository is empty.

Add retry logic to check the bash sha every 5 seconds and make 10 attempts. If clone takes more than 50 seconds it fails.

In this specific scenario, when user creates it's first contribution, it can take a bit longer because of the repo cloning. Without any notification, this wait time might look like a no-op to the user. To address this added a spinner with an alter message that notifies user that the submission is in progress.

Patch also includes refactoring of duplicate code present across api/skill and api/knowledge.

Fixes #52

taxonomy clone is not present in user github account.

UI attempts to create the clone, but the clone can
take some time to finish. When UI attempts to get the
base sha of the repo's main branch it fails because
the repository is empty.

Add retry logic to check the bash sha every 5 seconds
and make 10 attempts. If clone takes more than 50 seconds
it fails.

In this specific scenario, when user creates it's first
contribution, it can take a bit longer because of the
repo cloning. Without any notification, this wait time
might look like a no-op to the user. To address this
added a spinner with an alter message that notifies
user that the submission is in progress.

Patch also includes refactoring of duplicate code present
across api/skill and api/knowledge.

Signed-off-by: Anil Vishnoi <vishnoianil@gmail.com>
@vishnoianil
Copy link
Member Author

Screenshot 2024-09-13 at 4 48 03 PM

@nerdalert nerdalert merged commit 2a2cc23 into instructlab:main Sep 14, 2024
Copy link
Member

@nerdalert nerdalert left a comment

Choose a reason for hiding this comment

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

LGTM

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.

Pull creation request fails if the taxonomy repo fork doesn't exist in user account

2 participants