Skip to content

Conversation

@BruceForstall
Copy link
Contributor

When uploading a JIT rolling build, use the git hash of the most recent
JIT change, not the git hash that was actually built. This handles the case
where a JIT change kicked off an AzDO pipeline, but the pipeline didn't start
until after one or more additional changes were merged.

The AzDO pipelines appear to fetch with -depth=20, which should provide
enough history for almost any case.

Fixes #64392

When uploading a JIT rolling build, use the git hash of the most recent
JIT change, not the git hash that was actually built. This handles the case
where a JIT change kicked off an AzDO pipeline, but the pipeline didn't start
until after one or more additional changes were merged.

The AzDO pipelines appear to fetch with `-depth=20`, which should provide
enough history for almost any case.

Fixes dotnet#64392
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jan 29, 2022
@ghost ghost assigned BruceForstall Jan 29, 2022
@ghost
Copy link

ghost commented Jan 29, 2022

Tagging subscribers to this area: @JulieLeeMSFT
See info in area-owners.md if you want to be subscribed.

Issue Details

When uploading a JIT rolling build, use the git hash of the most recent
JIT change, not the git hash that was actually built. This handles the case
where a JIT change kicked off an AzDO pipeline, but the pipeline didn't start
until after one or more additional changes were merged.

The AzDO pipelines appear to fetch with -depth=20, which should provide
enough history for almost any case.

Fixes #64392

Author: BruceForstall
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@BruceForstall
Copy link
Contributor Author

I tested the "walk back" logic locally with various git hashes. I don't want to spend the effort testing it in the CI, since that would require very complicated setup including merging JIT and non-JIT changes almost concurrently. We'll just see how it goes when it's live.

@BruceForstall
Copy link
Contributor Author

@dotnet/jit-contrib

Copy link
Contributor

@kunalspathak kunalspathak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few thoughts.

# Enumerate the last change, starting with the jit_git_hash, that included JIT changes.
command = [ "git", "log", "--pretty=format:%H", jit_git_hash, "-1", "--", "src/coreclr/jit/*" ]
print("Invoking: {}".format(" ".join(command)))
proc = subprocess.Popen(command, stdout=subprocess.PIPE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not use run_command from jitutil.py`?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied/modified this code from elsewhere in jitrollingbuild.py. Looks like jitrollingbuild.py never uses run_command. In fact, it currently doesn't use jitutil at all. That might be a worthwhile (separate) cleanup at some point.

"Unable to set git_hash")

coreclr_args.verify(args,
"use_latest_jit_change",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this even an option? Why not do this way always? When will we ever pass use_latest_jit_change=False?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I'm testing "upload" locally, I often give it non-actual hashes, so I want that to still work.

Copy link
Contributor

@kunalspathak kunalspathak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BruceForstall BruceForstall merged commit 9122424 into dotnet:main Jan 29, 2022
@BruceForstall BruceForstall deleted the FixJitRollingBuildBuildDelayGitHash branch January 29, 2022 00:50
@ghost ghost locked as resolved and limited conversation to collaborators Feb 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JIT rolling build can build and upload non-JIT changes

2 participants