Coder Social home page Coder Social logo

Comments (6)

netshade avatar netshade commented on August 29, 2024

I should note, btw, that the differences in KAMAL_VERSION is the component after the uncommitted marker. That is to say, the docker tag looks like:

MY_IMAGE:H1_uncommitted_H2

and the KAMAL_VERSION passed to the hook looks like:

MY_IMAGE:H1_uncommitted_H3

from kamal.

netshade avatar netshade commented on August 29, 2024

After some further work on this, I should note that this appears to happen during the deploy that occurs during kamal setup. kamal deploy appears? to be stable.

from kamal.

yanguango avatar yanguango commented on August 29, 2024

I'm seeing the same issue, the KAMAL_VERSION is like xxx_uncommitted_xxx, my guess is the git directory has some changes are not committed, and kamal detects it and then adds it in the version tag. For my case, I see this message in the logs:

The following paths have uncommitted changes:
 ?? vendor/bundle/

say "The following paths have uncommitted changes:\n #{uncommitted_changes}", :yellow

from kamal.

netshade avatar netshade commented on August 29, 2024

I looked into this further, and it appears that when Kamal::Configuration encounters uncommitted changes, it tries to create a "random" hash via SecureRandom.hex(8). If the configuration was stable across the execution, this would probably be fine, but I think what appears to be happening during setup is that a different configuration is used to populate KAMAL_VERSION during the pre-deploy hook than what is used to actually push the image. I'm not sure the ordering on dependencies there, but that "feels" like what the bug probably is. :-p

Idk if it makes sense to fix the ordering problem here, or to change it such that the uncommitted hash is "honest"? Something like,

git status --porcelain | awk '{print $2}' | xargs -I{} md5sum {} | md5sum | awk '{print $1}' , computing a hash of hashes of all uncommitted files? It seems a bit heavyweight, but also, at least more true to what the intent is rather than a random number?

from kamal.

morgoth avatar morgoth commented on August 29, 2024

@netshade There was a change #700 that may solve your issue as there should no more be "uncommited" part in the version.
Can you please verify and eventually close the issue?

from kamal.

netshade avatar netshade commented on August 29, 2024

That change works for me, w/ the absence of the uncommitted portion. Thanks.

from kamal.

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.