-
Notifications
You must be signed in to change notification settings - Fork 28
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
Caching artifact downloads for call graph construction #363
Comments
We could also try to start a basic web server in the test and download the package from localhost, to avoid introducing any actual internet traffic. The important thing is that the refactoring will make it possible to cache packages, so we can eliminate downloads in other tests that make use of this class. |
Is this issue still valid? Now that all Maven coordinates are downloaded to the .m2 folder, it should be straight forward to get access to .jars without downloading them again. |
I can still look into this and extend the OPAL plugin to use the local JARs instead of downloading them again. |
Can you do it, or do you do it? |
@proksch |
One of us is missing the point of the issue. From my understanding, the problem is (or maybe was) that OPAL did download the jar files for the analysis from the internet, rather than opening it from the local file system. This issue has requested to change the behavior of I am not 100% how the proposed PR relates to that? I do not think that we need any kind of logic change in the OPAL plugin itself, what's required is a change in the |
In particular, I am talking about the various downloadPom methods and httpGetToFile, the implementations are completely brute-force and completely disrespect the cacheable nature of Maven. Instead, these methods should first check whether the file can be found in the local Looking at the discussion that we had with @michelescarlato and @MagielBruntink, this would also be the right place to implement the download logic for source .jars. Instead of just having parameters for group, artifact, and version and having two methods, one for poms and one for jars, we could reduce this to a single method with a much more general interface, in which we also allow to define the packaging type (e.g., |
Please let me clarify this.
That said, I can extend |
This case distinction is not a concern of the OPAL plugin, this is the task of the implementation logic of the downloader. I strongly disagree with handling this logic in the OPAL plugin. Would it make sense to clarify this task in person, before you spend more time on it? |
Sure, we can discuss this in person on Monday. @proksch, also, if I understand correctly, |
The |
The Resolver class is also relevant here. |
As described in #338, we can optimize the network traffic of the FASTEN pipeline by:
1- Downloads should be cached in a configurable folder.
2- The download logic should be refactored such that it can be mocked for the
CallGraphConstructorTest
to avoid a download and make the test faster.The text was updated successfully, but these errors were encountered: