Giter Club home page Giter Club logo

Comments (4)

lsf37 avatar lsf37 commented on July 1, 2024

It looks like a simple

git fetch <remote> <ref-sha>

does this in modern git versions, so for the price of an additional fetch, this should work fine.

from ci-actions.

axel-h avatar axel-h commented on July 1, 2024

I think it could also be an acceptable that if one force-pushes a commit, the old one is just gone and any testing would stop with an error. Rationale is, that if somebody force-pushes, this is either a clear statement "my prev commit is to be discarded" or a bad commit accident. Pulling commits from the GIT database, which are not referenced by a branch seem a delicate thing to me. because it yields the danger that you are working in commit that may get purged eventually anyway. Default is 30 day I think. So whatever the tests do there is not reproducible.
I have to blame myself for opening this issues, because I did a force-push there, then forgot that I did this and than complained about some strange messages about invalid commit IDs. So maybe the most simple solution here is, that we just have better messages that say this this might come from a force push. In addition we would dig into the GIT database to see if the commit is there and print another message that says this. So there is a clear differentiation between this well understood issues and some more obscure error that we yet have to understand.

from ci-actions.

lsf37 avatar lsf37 commented on July 1, 2024

True, this could indeed lead to an even more difficult to diagnose error.

I'll experiment a little -- maybe we can actually use this command to figure out if the ref still exists on GitHub: basically you'd first check if the ref exists in the clone (as opposed to relying on it as we do now), then if it isn't there, you try to fetch it, and if that fail, you can give an error message that says "ref XXX not found, possibly lost in a force push or rebase", or something like that.

Will treat this as lower priority, though, so it might take a while.

from ci-actions.

lsf37 avatar lsf37 commented on July 1, 2024

I think I'll abandon this one. It's been working fairly reliably so far.

Happy to reopen if it becomes a more pressing issue again.

from ci-actions.

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.