-
Notifications
You must be signed in to change notification settings - Fork 77
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
auto-bless tests/formatting on rust-lang/rust #760
Comments
@lcnr you expressed interested in working on this, so pinging you. |
We shouldn't need to merge the files, just overwrite them with the new ones, right? |
Right, yes, I just mean that the downloaded zipfile contains a subset of the files rather than all of them. |
We already save these files to |
Well, no, not particularly - that should be fine. It might be a bit more annoying to construct that path on different builders, but probably not too hard - we really only need 1 or 2 builders for pretty complete coverage anyway. |
Looks like this is slightly too complex for me to implement with my current time budget, so if someone else in interested in picking this up, please do! 😬 |
This is intended to be somewhat compatible with other repositories wishing to do the same, but for now it is reasonable to hardcode assumptions that can be made for rust-lang/rust.
I believe these are reasonable steps to making this work:
Adjust compiletest to have a
--bless-into $DIR
flag which acts like--bless
but writes new files at a different root (e.g., if editingsrc/test/ui/issue-3433.stderr
, we'd instead save to$DIR/src/test/ui/issue-3433.stderr
). It should not change the status reported by tests, merely write new files (i.e., it is safe to always pass this on CI).We will want to do the same for rustfmt blessing; it is not entirely clear what the best way to do this is though. We wouldn't want to write all files to the new directory, just those that have changed when rustfmt is applied.
Once both of these are done, we will want to fetch this directory from CI somehow. I suspect we want this to be in the PR CI job so that everyone can use it (vs. waiting for bors to fail, which seems suboptimal). Eventually we'll want to add to the bors builders as well, so that all bless-able failures can be resolved via this bot.
This is somewhat hard -- we can't readily grant PR CI keys to write into an S3 bucket or anything like that. I suspect that a good way to do this might be GitHub Action's artifacts. AFAICT, we get a unique location guaranteed by GitHub via these artifacts so they should be safe to use.
Once all of that is done, we will already have a manual way to bless without building Rust: download the zip file from GHA, and "merge" in the new files locally, and push up a commit. This step can be automated via triagebot as well without too much trouble (though identifying the workflow ID is IIRC annoying).
The text was updated successfully, but these errors were encountered: