-
Notifications
You must be signed in to change notification settings - Fork 15
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
builtin support for "run as CI in a worktree" #6
Comments
Cool, I like the idea (especially the 😢 sad trombone 🎺 part)! Ideally, something like this would somehow be hooked into the
But really, the decision about whether to rerun the script "for real" is, to a good approximation, just
This could maybe be made into a A third alternative would be to teach
It would be nice to have a command like this anyway, so maybe the easiest alternative would be to run [1] Actually, it only does so for fresh failures. When failures are stored in notes, the error code is not recorded, so cached failures always result in retcode==1. I'd like to change that by storing something like |
Yeah, the polling is obviously gross. If the idea is for this to be started and running all the time in the background (which is my general conception), then it really wants to respond anytime the tip of Technically that does not cover the case where Regarding output of the cache, I would have thought that some variant of It seems like that's something that git could do better, and then you wouldn't need a special |
I'd prefer something more portable.
Yes, a definite disadvantage of attaching notes to trees, not commits, is that the likes of For now I'm not too squeamish about running Back to the topic of hook scripts, it would be unnecessarily awkward for I think Git should support hookdirs, like |
Fair enough. The nice thing about I did add
Yeah, I think I agree. There are some policy questions to figure out (like how one hook's outcome affects whether we run the others). You can just have a master hook script that calls the others, and implements whatever policy you want there. But the input-handling does get nasty. It would be a lot more convenient if Git just handled the details. |
inotifywait command copied from https://github.com/peff/git/blob/meta/ci mentioned in mhagger#6.
It seems like the main utility of this over a
rebase -x
method (besides the result caching) is to run it asynchronously. I wonder how hard it would be to have agit test ci
command that Just Works. I'm fooling with something like this in my Git scripts: Meta/ci.It's mostly generic, but the
config.mak
setup is specific to the Git project. I suppose that step could be shoved into the test command.I've also noticed that it gets annoying when you do have a failure, because it will play the sad trombone every 30 seconds. Perhaps it should just quit after a failure, but then that would force you to restart it manually. It might make sense for
git test
to give a different exit code for a cached failure, versus a case where it actually ran the tests and failed. I dunno.The text was updated successfully, but these errors were encountered: