Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Knowledge and Skill contribution fails if the initial #170

Merged
merged 1 commit into from
Sep 14, 2024

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
5 checks passed
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

# for free to join this conversation on GitHub. Already have an account? # 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