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
Tag AGFI with sha of toplevel repo #1166
base: main
Are you sure you want to change the base?
Conversation
@Mergifyio rebase |
Similar to how we changed repo_state_summary.sh to create repo_state file from the toplevel git superproject, generate the commit tag for the AGFI from the toplevel repo. Add firesim_origin and top_origin tags to contain URL for those repos. Add ispushed tags to indicate whether the commit existed on respective origin at the time the AGFI was created.
✅ Branch has been successfully rebased |
85fabea
to
da2039b
Compare
@filipstamenkovic-sifive , I figured out that the pytests are faling because they are being run in a clone of a local directory, not the clone of the github repo: https://github.com/firesim/firesim/runs/7870074673?check_suite_focus=true#step:4:18. This breaks assumptions I was making about testing in something that was cloned from github (or at least from a server). I'll think some more about this. |
git's behavior has become more complex and it doesn't always have a ref/remotes/<name>/HEAD created for each remote Instead of resolving the tracking ref using rev-parse, use ls-remote.
between 2.24.4 and 2.37.2 git stopped paying attention to uploadpack.allowReachableSH1InWant for clones that have origin in the same local filesystem. Remove the logic that deals with setting uploadpack.allowReachableSHA1InWant in test_git_is_pushed
class TestGitAssumptions: | ||
"""Test git features that we depend on""" | ||
|
||
def test_git_fetch_pack_for_unadvertised_sha(self): |
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.
@abejgonzalez can you help me understand why we need to create a second-level of clone in the CI scripts.? See:
firesim/.github/scripts/initialize-repo.py
Lines 14 to 15 in 0552050
# copy ci version of the repo into the new globally accessible location | |
run("git clone {} {}".format(ci_workdir, manager_fsim_dir)) |
This test is checking that the behavior of github (or whatever server the project is using to host the repo) but it assumes that we're in a clone that has origin set to the server we care about.
The test currently passes but it isn't testing anything because the clone it is running in was cloned from another directory on the CI host and not the actual github repository. It actually doesn't pass because of a race condition that I introduced by looking at the remote for the default branch instead of at the local repo.
I'm thinking that removal of the is_pushed
part of this PR may be the best way forward.
Similar to how we changed repo_state_summary.sh to create repo_state file from
the toplevel git superproject, generate the commit tag for the AGFI from the toplevel
repo.
Add firesim_origin and top_origin tags to contain URL for those repos.
Add ispushed tags to indicate whether the commit existed on respective origin at the
time the AGFI was created.
Related PRs / Issues
Rewrite of #936. h/t @filipstamenkovic-sifive for doing the rewrite!
UI / API Impact
Adds tags to AGFIs to aid in reproducing builds where Firesim is not the toplevel repo (Chipyard-as-top, etc).
Also adds tags to indicate whether the hash was pushed to a remote named
origin
or not at the time of build.Adds
util.git
module to the firesim python for doing some of the tag introspection.Verilog / AGFI Compatibility
Doesn't
Contributor Checklist
changelog:<topic>
label?ci:fpga-deploy
label?Please Backport
label?Reviewer Checklist (only modified by reviewer)
changelog:<topic>
label?