containers / podman-desktop-extension-ai-lab

Work with LLMs on a local environment using containers
https://podman-desktop.io/extensions/ai-lab
Apache License 2.0
147 stars 23 forks source link

restart chatbot is notifying about git HEAD #1081

Open benoitf opened 1 month ago

benoitf commented 1 month ago

Is your enhancement related to a problem? Please describe

when restarting the chatbot app we're notified that the GitHub head is different than v1.1.1

image

Describe the solution you'd like

no notification, just restart as I'm using the tag and I didn't change the app

Describe alternatives you've considered

No response

Additional context

No response

axel7083 commented 1 month ago

Facing the same issue since we are using the git node implementation

cc @feloy

feloy commented 4 weeks ago

I cannot reproduce the problem on my machines (mac and Linux).

Could you please share some information of the state of the chatbot repository, by running the commands below?

$ cat .git/HEAD 
70c990bc21c70a145e46edd9cf84738d3607ecc1

$ cat .git/refs/tags/v1.1.2 
70c990bc21c70a145e46edd9cf84738d3607ecc1
axel7083 commented 4 weeks ago

Here is a video demonstration of the problem I have on my computer, which is not the same as @benoitf but still linked to the git logic.

https://github.com/containers/podman-desktop-extension-ai-lab/assets/42176370/315af323-e3c8-4848-8b9a-e57ff520d489

$ cat .git/refs/tags/v1.1.2
70c990bc21c70a145e46edd9cf84738d3607ecc1
$ cat .git/HEAD
70c990bc21c70a145e46edd9cf84738d3607ecc1
$ git status
Not currently on any branch.
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        deleted:    recipes/common/usr/lib/systemd/system/local-fs.target.wants/bootc-generic-growpart.service
        deleted:    recipes/natural_language_processing/chatbot/quadlet/chatbot.image
        deleted:    recipes/natural_language_processing/codegen/quadlet/codegen.image
        deleted:    recipes/natural_language_processing/rag/quadlet/rag.image
        deleted:    recipes/natural_language_processing/summarizer/quadlet/summarizer.image
        deleted:    training/common/usr/lib/systemd/system/local-fs.target.wants/bootc-generic-growpart.service
benoitf commented 4 weeks ago

I don't remember how I ran into this bug :-/

feloy commented 4 weeks ago

Here is a video demonstration of the problem I have on my computer, which is not the same as @benoitf but still linked to the git logic.

  • Start without chatbot cloned.
  • Latest main cloned and build

    long-git-error-reproductible.mp4

    $ cat .git/refs/tags/v1.1.2
    70c990bc21c70a145e46edd9cf84738d3607ecc1
    $ cat .git/HEAD
    70c990bc21c70a145e46edd9cf84738d3607ecc1
    $ git status
    Not currently on any branch.
    Changes to be committed:
    (use "git restore --staged <file>..." to unstage)
        deleted:    recipes/common/usr/lib/systemd/system/local-fs.target.wants/bootc-generic-growpart.service
        deleted:    recipes/natural_language_processing/chatbot/quadlet/chatbot.image
        deleted:    recipes/natural_language_processing/codegen/quadlet/codegen.image
        deleted:    recipes/natural_language_processing/rag/quadlet/rag.image
        deleted:    recipes/natural_language_processing/summarizer/quadlet/summarizer.image
        deleted:    training/common/usr/lib/systemd/system/local-fs.target.wants/bootc-generic-growpart.service

@jeffmaury has the same issue as this. These missing files are symlinks in the repository. The problem seems to be that isomorphic-git is not able to clone symlink files on Windows (but it is working correctly on Linux and Mac)

feloy commented 4 weeks ago

I don't remember how I ran into this bug :-/

The only reason I can imagine to have this issue would be that you cloned the repository manually without fetching the tags (git clone --no-tags ... or similar). Or it could have been cloned with a previous version of ai-lab using the git command? Is it possible?

benoitf commented 4 weeks ago

so no, I did not any manual steps but probably I had a previous version.

but I suppose that if you start once and then stop and start it again later if you didn't do any manual steps between, should it prompt again the message ?

feloy commented 4 weeks ago

so no, I did not any manual steps but probably I had a previous version.

but I suppose that if you start once and then stop and start it again later if you didn't do any manual steps between, should it prompt again the message ?

No, you should not have this message if you don't change the state of the local repository.

jeffmaury commented 3 weeks ago

Analysis: on Windows symlink requires admin access by default and thus this fails and even though I've hacked the fs implementation of act as git for windows (creates a file) the status is not reported as the tree is not in line with the git metadata:


$ git status
Not currently on any branch.
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        typechange: recipes/common/usr/lib/systemd/system/local-fs.target.wants/bootc-generic-growpart.service
        typechange: recipes/natural_language_processing/chatbot/quadlet/chatbot.image
        typechange: recipes/natural_language_processing/codegen/quadlet/codegen.image
        typechange: recipes/natural_language_processing/rag/quadlet/rag.image
        typechange: recipes/natural_language_processing/summarizer/quadlet/summarizer.image
        typechange: training/common/usr/lib/systemd/system/local-fs.target.wants/bootc-generic-growpart.service

Will update the patch by adding some sudo-like wrapper but afraid it will spawn a new UI for each symlink