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

Automate file uploading to a common knowledge documents repo #6

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

nerdalert
Copy link
Member

@nerdalert nerdalert commented Jun 17, 2024

  • Adds a drag-and-drop file upload (PDF, Markdown)
  • Creates a signed PR with user uploaded documents into a forked upstream template docs repo and captures the commit SHA that is maintained with a merge commit. The SHA and file names are then populated back into the knowledge submission form.

Tracked by #4

  • Workflow diagram:

Knowledge-Submission-v2

- Adds a drag-and-drop file upload (PDF, Markdown)
- Creates a signed PR with uploaded documents in the dedicated knowledge
docs repo and captures the commit SHA that is maintained with a
merge commit. The SHA and file names are then populated back into
the knowledge submission form.

Signed-off-by: Brent Salisbury <bsalisbu@redhat.com>
@nerdalert nerdalert marked this pull request as draft June 17, 2024 04:57
@nerdalert
Copy link
Member Author

nerdalert commented Jun 17, 2024

WIP PoC demo video:

file-upload-demo-720p.mp4

The test repos in the demo:

Signed-off-by: Brent Salisbury <bsalisbu@redhat.com>
@nerdalert
Copy link
Member Author

nerdalert commented Jun 19, 2024

  • adjust the knowledge doc fork files to be timestamped for uniqueness in the case the user re-uploads the docs so the commit diff will show the file.
  • docs dir forks a central repo template from instructlab. This maintains some consistency but avoids instructlab repos from storing knowledge docs in ilab repos.
  • resolve the scenario where a user uses ssh keys for commits
  • resolve the race condition that occurs on the first run where the upstream repos need to be forked. Added a delay before retrieving the base SHA.
  • schema version missing from the submission

@nerdalert nerdalert marked this pull request as ready for review June 20, 2024 00:13
Copy link
Member

@vishnoianil vishnoianil left a comment

Choose a reason for hiding this comment

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

LGTM

@vishnoianil vishnoianil merged commit d90b384 into instructlab:main Jun 20, 2024
4 checks passed
candyhy pushed a commit to candyhy/ui that referenced this pull request Sep 22, 2024
…ml-import-knowledge

[Hotfix] Types in the contribute yaml import knowledge
# 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.

2 participants