-
Notifications
You must be signed in to change notification settings - Fork 41
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
Graduate UI native mode (github detached mode) to stable feature. #412
Conversation
057b84a
to
4f5189d
Compare
*.* Refactor the code and move the experimental dashboard/knowledge/skill components of the native mode parallel to the github dashboard/knowledge/skill components. *.* Dev mode features (such as form auto fill) are now enabled using IL_ENABLE_DEV_MODE=true. *.* IL_UI_DEPLOYMENT flag is repurposed to define the deploment mode of the ui stack. It supports two values - github and native. *.* Based on the DEPLOYMENT type user set, UI will load the related dashboard, knowledge and skill forms. *.* Repository cloning page is removed. Native mode has it's own local taxonomy repository, where it maintains all the user contribution. UI will provide an option to publish these contribution to any other taxonomy if they want to test these contributions. This allows UI stack to have total control over it's own taxonomy instance and minimize the modification it needs to do the main taxonomy repo (for testing, merging contributions). *.* Updated the docs to provide details about native mode. Signed-off-by: Anil Vishnoi <[email protected]>
Signed-off-by: Anil Vishnoi <[email protected]>
989e381
to
1bf55ca
Compare
In Native mode, taxonomy-knowledge-docs repo is cloned in the $HOME/.instructlab-ui/ directory and the docs are committed to the main branch. Commit sha of that branch is used in the knowledge contribution. In knowledge yaml, document url points to the filepath location of the taxonomy-knowledge-docs. Signed-off-by: Anil Vishnoi <[email protected]>
1bf55ca
to
1f29e5f
Compare
fb7f9c2
to
f5ead4a
Compare
Signed-off-by: Anil Vishnoi <[email protected]>
f5ead4a
to
101419c
Compare
If user deploy UI in github mode, login page shows on github login option If user deploy UI in native mode, login page shows only user/pass If user enable the dev mode, it shows both the options to login. Signed-off-by: Anil Vishnoi <[email protected]>
@nerdalert Tested following scenario for the patch and works fine. Github mode:
Native mode:
Chat feature works fine in both the scenarios. |
Signed-off-by: Anil Vishnoi <[email protected]>
@vishnoianil fixup lint and will merge 🎉 |
30b8a3a
to
bb0cfd6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some small things I found, awesome job
|
||
Set the .env in the ui directory and make sure you uncomment the `IL_UI_DEPLOYMENT=dev`. Once .env file is setup, run the following: | ||
To enable the native mode, set the `IL_UI_DEPLOYMENT=native` in the .env file. Once the flag is set, the UI will not push the knowledge and skill contribution to the github repository. Instead, it will keep the contribution in the local machine. In the `native` mode, the UI login page will show username and password input box to authenticate the user. You can setup the username and password in the .env file through the `IL_UI_ADMIN_USERNAME` and `IL_UI_ADMIN_USERNAME` flags. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To enable the native mode, set the `IL_UI_DEPLOYMENT=native` in the .env file. Once the flag is set, the UI will not push the knowledge and skill contribution to the github repository. Instead, it will keep the contribution in the local machine. In the `native` mode, the UI login page will show username and password input box to authenticate the user. You can setup the username and password in the .env file through the `IL_UI_ADMIN_USERNAME` and `IL_UI_ADMIN_USERNAME` flags. | |
To enable the native mode, set the `IL_UI_DEPLOYMENT=native` in the .env file. Once the flag is set, the UI will not push the knowledge and skill contribution to the github repository. Instead, it will keep the contribution in the local machine. In the `native` mode, the UI login page will show username and password input box to authenticate the user. You can setup the username and password in the .env file through the `IL_UI_ADMIN_USERNAME` and `IL_UI_ADMIN_PASSWORD` flags. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Gregory-Pereira thanks for catching this, will fix it in follow-up PR.
|
||
async function handleDelete(branchName: string, localTaxonomyDir: string) { | ||
try { | ||
if (!branchName || branchName === 'main') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also check against other protected branches? Since im not sure if we care about this I will not repeat the comment for every instance in the file, but there are multiple
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UI workflows are triggered from the contributions, and all the contributions are created using it's own branch. Ideally branchName === 'main' condition should not even hit in UI case, so we can even remove this check, but kept it as a guardrails. In local taxonomy, main is the only protected branch at this point of time.
This PR addresses :
IL_ENABLE_DEV_MODE=true.
github
andnative
.Fixes #335
Fixes #325