-
Notifications
You must be signed in to change notification settings - Fork 53
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
use a shallow clone as we do not need history here (do not use anymore maven-scm but use more simple and faster direct git cli) #382
Conversation
53e10fe
to
30010cb
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.
Is the motivation to speed up PCT runs?
Probably OK for now. I am hesitant because this would cause -Dset.changelist
to not work on JEP-229 plugins. Currently we do not pass that, but it would be one way to solve a problem with plugins in multimodule repositories. Another way, possibly better but also more intrusive, would be rearrange how plugins are collected and the tests are orchestrated to get rid of AbstractMultiParentHook
and always run Maven from the repository root (presuming that is the aggregator POM!). I think not discussed explicitly but related to #318 (comment)
plugins-compat-tester/src/main/java/org/jenkins/tools/test/hook/AbstractMultiParentHook.java
Outdated
Show resolved
Hide resolved
yes and it does a bit.
|
@jglick it looks I forgot the same change for mono module repo. so done |
back to draft. as not sure this can even work with mono module repo because of the need to have a full git changelog history
need more changes to accommodate this feature. |
Yes, or
Yes, as designed. PCT will check out the commit, which corresponds exactly to the release. |
Oh yes good point!! my bad 🤦 we don't care in this case.
|
@imonteroperez thanks for approval. but still draft and need a bit more work ;) |
FYI I need to push a fix I have locally to get this work with the cd releases. |
…o not need history here Signed-off-by: Olivier Lamy <olamy@apache.org>
…k/AbstractMultiParentHook.java Co-authored-by: Jesse Glick <jglick@cloudbees.com>
Signed-off-by: Olivier Lamy <olamy@apache.org>
Signed-off-by: Olivier Lamy <olamy@apache.org>
Signed-off-by: Olivier Lamy <olamy@apache.org>
… pct was failing... Signed-off-by: Olivier Lamy <olamy@apache.org>
Signed-off-by: Olivier Lamy <olamy@apache.org>
… not a tag Signed-off-by: Olivier Lamy <olamy@apache.org>
…t history for unit tests Signed-off-by: Olivier Lamy <olamy@apache.org>
Signed-off-by: Olivier Lamy <olamy@apache.org>
8f64dde
to
305d9c5
Compare
done jenkinsci/bom#1613 but I don't have karma to add label |
addressed (downstream jenkinsci/bom
passes)
Signed-off-by: Olivier Lamy <olamy@apache.org>
https://github.com/jenkinsci/bom/pull/1613/checks?check_run_id=10035728045 currently failing? |
plugins-compat-tester/src/main/java/org/jenkins/tools/test/PluginCompatTester.java
Show resolved
Hide resolved
plugins-compat-tester/src/main/java/org/jenkins/tools/test/PluginCompatTester.java
Outdated
Show resolved
Hide resolved
} | ||
|
||
public void cloneFromSCM(PomData pomData, String name, String version, File checkoutDirectory, String tag, Map<String, Object> beforeCheckout) throws IOException { | ||
String scmTag = !("".equals(tag)) ? tag : getScmTag(pomData, name, version); |
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.
String scmTag = !("".equals(tag)) ? tag : getScmTag(pomData, name, version); | |
String scmTag = !tag.isEmpty() ? tag : getScmTag(pomData, name, version); |
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.
why not if we don't care about being NPE free.
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.
Is tag
supposed to be @CheckForNull
? For that matter, is ""
actually a legitimate argument?
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 don't know all the history/reasons of this code so I have just avoid changing it. (except avoid a possible NPE).
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 guess StringUtils.isNotEmpty(tag))
will do the job
plugins-compat-tester/src/main/java/org/jenkins/tools/test/hook/AbstractMultiParentHook.java
Outdated
Show resolved
Hide resolved
plugins-compat-tester/src/main/java/org/jenkins/tools/test/PluginCompatTester.java
Outdated
Show resolved
Hide resolved
plugins-compat-tester/src/main/java/org/jenkins/tools/test/PluginCompatTester.java
Outdated
Show resolved
Hide resolved
plugins-compat-tester/src/main/java/org/jenkins/tools/test/hook/AbstractMultiParentHook.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Olivier Lamy <olamy@apache.org>
https://ci.jenkins.io/blue/organizations/jenkins/Tools%2Fbom/detail/PR-1613/5/tests/ not sure maybe git and git-client plugins integrating the changes to run in shallow clone are not up2date in this weekly bom |
Is there some PR to fix |
Git client plugin 3.13.1 released 9 days ago with support for testing in shallow cloned repositories. It is included in the bom release 1742.vb_70478c1b_25f. Git client plugin 3.13.1 requires Jenkins 2.346.3 or newer. Either an exclusion will need to be made for 2.332.x or I'll need to backport that test change to a patch version that can support 2.332.x or this will need to wait until the BOM drops support for 2.332.x |
Ah, jenkinsci/git-client-plugin#944 was not previously linked from here that I noticed. |
Would be nice. Looks pretty simple right? |
I will see what it takes to backport |
https://issues.jenkins.io/browse/JENKINS-70174 notes that the git client plugin automated tests failed when using a shallow clone (depth == 1) of a single branch. The issue was fixed for Jenkins 2.346.3 and newer with the release of git client plugin 3.13.1. This release is a backport of that fix. No plugin functionality was changed in this release. It changes the automated tests when run from a shallow clone (depth == 1) of a single branch. jenkinsci#1613 is the key consumer in the plugin bill of materials. jenkinsci/plugin-compat-tester#382 is the key consumer in the plugin compatibility tester.
https://issues.jenkins.io/browse/JENKINS-70174 notes that the git client plugin automated tests failed when using a shallow clone (depth == 1) of a single branch. The issue was fixed for Jenkins 2.346.3 and newer with the release of git client plugin 3.13.1. This release is a backport of that fix. No plugin functionality was changed in this release. It changes the automated tests when run from a shallow clone (depth == 1) of a single branch. #1613 is the key consumer in the plugin bill of materials. jenkinsci/plugin-compat-tester#382 is the key consumer in the plugin compatibility tester.
Signed-off-by: Olivier Lamy <olamy@apache.org>
closing this as I have lost motivation to trying to get this merged..... |
Would you regain the motivation if, after merging in most of these changes in #404, I resolved conflicts (making this PR only a few lines of added code) and committed to timely responses? |
@basil feel free to do whatever you want the branch is still here in a fork https://github.com/olamy/plugin-compat-tester/tree/checkout-shallow as you copy over some changes in another PR I guess re activated shallow clone will be easy. |
I understand. I can assure you that any feedback left by me would be actionable. I do not intend to pick up the change myself, but the door is always open if you want to pick up where you left off with me as the reviewer. |
Signed-off-by: Olivier Lamy olamy@apache.org