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
Issue #818: do shallow clone while retaining checkout abilitiy to specific SHA #843
Conversation
I realised in the event of shallow clone, this PR still fails to checkout to specific SHA. I am trying to resolve it. UPDATE: I did cross-check, with a test PR on main repo, and the logs seem to have restored the ability to point to a specific SHA. |
@nrmancuso, can we start reviewing this? |
Please fix codenarc meanwhile |
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.
Please share all evidence of testing in PR description.
Items:
d7b023c
to
ee3e713
Compare
@relentless-pursuit , please reply done to review items, if you are ready for review |
Yes, @romani. I am yet to do the testing of this PR as I have modified the code. Once, I attach the test results, I will respond to the review suggestions/comments and proceed further. |
Done. |
I have updated the description section of the PR. please let me know your feedback and what else needs to be done here. Also, the PR has some useless print statements. I will remove them once I have some clarity on where the PR is headed. |
@nrmancuso can we start reviewing? |
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.
Code looks good, few minor improvements that we missed in the last update:
@relentless-pursuit please link to your testing PR in the main repo in the PR description |
done |
ac9ba99
to
b2f4276
Compare
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.
Last from me, please rerun test and share CI output/link:
checkstyle-tester/diff.groovy
Outdated
if (!Files.exists(Paths.get(srcDestinationDir))) { | ||
def cloneCmd = getCloneShallowCmd(repoType, repoUrl, srcDestinationDir, commitId) | ||
println "Cloning $repoType repository '$repoName' to $srcDestinationDir folder ..." | ||
println "Cloning command: $cloneCmd" |
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 am good to leave this.
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.
Done.
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.
@relentless-pursuit did you get rid of this print statement?
02073e1
to
8b34315
Compare
@nrmancuso below is the link to the successful build by running my test PR on main repo. |
Please keep testing evidence in the PR description to have one source of truth. Build is successful, but it doesn't look like we are shallow cloning:
I suggest running this groovy script locally with a small project (maybe your own, something with 1 file or whatever) to debug to get a faster feedback loop. |
@nrmancuso I have updated the testing evidence in the PR description. Also, i assume you meant testing shallow clone in local. If i understood you right, I have attahced a log file showcasing occurence of shallow clone and other details in the PR description. Please let me know if it is in sync of what you were expecting. Thank you. UPDATE: |
@relentless-pursuit , please add to your PR doc update f10f82a#diff-1d82d916db8f81ee95ff589f11bde9990f0b83f950957a48e4a573d77e6fff5fR75 |
1ddc7bb
to
eb4a607
Compare
done |
Testing should be there checkstyle/checkstyle#14662 |
This is not done. I see the other PR in the main repo being pinged to me, but that isn't what I was originally asking. Are we going to use this function in this repo were we test out everything else for PRs here? Is the PR in the main repo going to be merged once this is merged? |
The other PR is a testing PR, which has been configured to test this specific PR. That is not going to be merged. Pardon me if am wrong, but what i understood is that the script in main repo i.e. validation.sh uses the diff.groovy in contribution repo. Hence, i followed the earlier suit of testing. |
Then we should update the CI here to use this option to ensure we are testing and somewhat validating future updates. |
Aren't we doing that in |
Show me then where we are using it in this repo's CI. Your configuration for this new parameter says it is not required and defaults to |
eb4a607
to
a3e27c7
Compare
.ci/validation.sh
Outdated
@@ -41,7 +41,7 @@ checkstyle-tester-diff-groovy-patch) | |||
sed -i'' 's/^guava/#guava/' ../.ci-temp/projects-to-test-on.properties | |||
sed -i'' 's/#checkstyle/checkstyle/' ../.ci-temp/projects-to-test-on.properties | |||
groovy diff.groovy -l ../.ci-temp/projects-to-test-on.properties \ | |||
-c my_check.xml -b master -p patch-branch -r ../.ci-temp/checkstyle | |||
-c my_check.xml -b master -p patch-branch -r ../.ci-temp/checkstyle -h true |
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.
@rnveach, i modified the CI to include shallow clone feature. please let me know if understood your concern right.
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.
Yes you did.
Does it make more sense if we can configure this be just -h
alone? It seems redundant to also specify true when this will only be used to make it true.
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.
Few lines can use long version of this patamer, just for diversity of testing and example of usage
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.
Based on my understanding, i have modified the description of the long version and documentation. Earlier, it required a parameter like true or false. Right now, the idea is to do shallow clone mandatorily, when we have such a parameter in CLI.
Few lines can use long version of this patamer, just for diversity of testing and example of usage
done.
a44ac64
to
ac5d60d
Compare
Please add to Line 85 in 3decd5c
|
24bd33b
to
fdb1207
Compare
done. |
@romani, the https://ci.appveyor.com/project/Checkstyle/contribution/builds/49778146 is failing after adding the parameter of shallowClone. |
failure was:
unrelated. |
Don't think you can restart a 404. https://downloads.apache.org/maven/maven-3/3.8.8/ is the lowest now. Looks like they removed 3.8.7 . |
Unrelated issue, let's merge without it, we will fix this download problem in separate PR |
…tiy to specific SHA
@rnveach , CI is fixed, this PR is rebased |
Resolves #818
This PR reuses the earlier PR on shallow clone PR, while reverted retaining checkout abilitiy to specific SHA.
I tested this PR on main repo checkstyle/checkstyle#14662, by following the footprints of what already has been done. I am attaching the test results below:
Successful build while retaining checkout to specific SHA:
https://app.circleci.com/pipelines/github/checkstyle/checkstyle/25238/workflows/51a420a4-ff1f-4137-89c0-802b6ecfcd81/jobs/577549
Sucessful build testing Shallow Clone:
https://app.circleci.com/pipelines/github/checkstyle/checkstyle/25238/workflows/51a420a4-ff1f-4137-89c0-802b6ecfcd81/jobs/577567