Giter Site home page Giter Site logo

Comments (3)

talex5 avatar talex5 commented on June 9, 2024

It used to work, but maybe something changed. Maybe it's the same read-only :ro problem as before?

When it's working correctly, you should see https://github.com/moby/datakit/blob/master/bridge/local/sync.ml#L26 logging a message when something changes, followed by https://github.com/moby/datakit/blob/master/bridge/local/sync.ml#L38.

That will wake https://github.com/moby/datakit/blob/master/bridge/local/sync.ml#L105 and you should see https://github.com/moby/datakit/blob/master/bridge/local/sync.ml#L81. You should then see a new commit appear in the DataKit Git repository with the new head. The CI monitors this and should rebuild.

If on_change isn't being called, maybe something went wrong setting up the watch at https://github.com/moby/datakit/blob/master/bridge/local/sync.ml#L48.

from datakit.

Thegaram avatar Thegaram commented on June 9, 2024

I tried again with local-bridge compiled and run directly (without docker) and it works this way. It seems to be a docker related issue, my container was not picking up the changes from the mounted volumes. This might be related.

from datakit.

Thegaram avatar Thegaram commented on June 9, 2024

Okay it seems like docker does in fact correctly mount volumes. I created a simple container:

FROM alpine:3.5
ENTRYPOINT ["watch", "-n1", "tail /data/.git/logs/refs/heads/master"]

And then ran it, mounting my git repo:

$ docker build -t testvolume -f MyDockerfile .
$ docker run -it --rm -v /path/to/my/repo:/data:ro testvolume

And it correctly picked up any new commit messages. @talex5 do you have any ideas why picking up changes works natively (Mac) but does not work in a container for the local bridge?

Command to run natively:

$ ./main.exe --metadata-store tcp:127.0.0.1:5640 -v me/myproject:/path/to/my/repo

Command to run in a container:

$ docker run -it --rm --network host -v /path/to/my/repo/.git:/data/repos/myproject/.git datakit/local-bridge --metadata-store tcp:127.0.0.1:5640 -v me/myproject:/data/repos/myproject

from datakit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.