-
-
Notifications
You must be signed in to change notification settings - Fork 314
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
Fix stf sha issue #2913
Fix stf sha issue #2913
Conversation
system/common.xml
Outdated
@@ -75,21 +75,37 @@ | |||
<echo message="This branch does not exist!"/> | |||
</then> | |||
</if> | |||
<if> |
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.
Instead of if, should this be else block
? Also, I would like to have git checkout
logic once.
pseudocode:
run git rev-parse ${stf_branch} // failonerror="false" and get stf_sha1
If code=128 {
git rev-parse origin/${stf_branch} // set failonerror="true" and set stf_sha2
if code2 =128 {
// error. fail the build. if set failonerror="true" works as expected, we do not need this if block
} else {
// success. Set stf_sha
<property stf_sha value="${stf_sha2}"/>
}
}
if stf_sha is not set {
// set it to stf_sha1
<property stf_sha value="${stf_sha1}"/>
}
run git checkout -q -f ${stf_sha}
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 changed the logic according to the pseudocode, it is indeed a cleaner approach, and I also rerun on the grinder(1514,1515,1516).
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.
Thanks a lot, @xius666 !
Grinder for the default case: https://ci.adoptopenjdk.net/view/Test_grinder/job/Grinder/1518/ |
One more thing, could you update to set Line 53 in 182f216
If this fails, it means stf_repo is wrong. We should fail the build. |
@llxia thanks for the suggestion, changed it pl review |
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.
LGTM
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.
LGTM
No description provided.