-
Notifications
You must be signed in to change notification settings - Fork 565
scripts: Add a script to run commands on a range of commits #7148
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
Conversation
fa133a8 to
feb2705
Compare
Signed-off-by: Wei Liu <[email protected]>
feb2705 to
fb62e3e
Compare
Signed-off-by: Wei Liu <[email protected]>
| make sure each commit builds. You can use the in-tree helper script to do that. | ||
|
|
||
| ```sh | ||
| ./scripts/run_on_commits.sh $BASE_COMMIT $TIP_COMMIT $BUILD_COMMAND |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's wrong with git rebase -ix "$BUILD_COMMAND" origin/main? It doesn't seem right to implement this in the Cloud Hypervisor repo when it's not specific to Cloud Hypervisor at all…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git rebase -ix stops where there is a failure. This script does a bit more house keeping and sanity check than that.
I want to integrate this check into the upstream CI system. This script will be useful in that scenario. It is easier to script, and makes it easy for contributor to run the exact same commands that GitHub CI uses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That might have been useful to note in the commit message then!
With the exception of continuing after failure, which could be achieved by appending || :, I'm still not seeing a huge benefit of this script compared to git rebase --autostash -ix…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with keeping the script to myself.
I do think we should put in a check in the GitHub CI to enforce bisection is not broken.
|
Has there been any discussion within the project about the acceptability of LLM-authored code? QEMU looks set to ban it, and I'm wondering whether Cloud Hypervisor's circumstances are any different to theirs… It should probably be figured out before the ship leaves the harbor, as it were. |
Yeah this is a fair point. That's something the community should decide. I wanted to be upfront about where the code came from. In a lot of cases, you won't be able to distinguish LLM generated code from human written code. At the end of the day, there are only a few ways to use git to bisect the tree, or to implement a binary search algorithm, or do some other random things in computer science. |
At least for smaller code snippets, agree.
IMHO (as an external contributor and not an project owner): It's hard to draw the line. In fact, I also used LLM code to do my changes in #7066; However, I used a small LLM-generated script helping me to automate my changes and I didn't commit LLM-generated code. See commit message for reference. |
|
Closing this until we come to a conclusion about AI generated code. |
This script is written by an AI agent. I checked the code to ensure that's something I would have written myself. I ran some tests to make sure it is not obviously broken.
Developers can use this script to check if their changes break bisection.