crossminer / scava

https://eclipse.org/scava/
Eclipse Public License 2.0
18 stars 13 forks source link

Metric providers cannot be found #424

Closed blueoly closed 4 years ago

blueoly commented 4 years ago

In the latest deployments of the platform using the docker images, I observed that a certain Metric Provider is missing, something that did not happen previously and I have made no changes to this metric provider (Docker antipatterns metric-provider). @ambpro told me he can find it when he deploys the platform from source. So, maybe something wrong happens during the CI process.

This may happen to other metric providers too. I have not observed it about others but it could be possible.

MarcioMateus commented 4 years ago

I did the metric-platform build from the command line using mvn clean install -DskipTests and I also couldn't find the org.eclipse.scava.metricprovider.trans.configuration.docker.antipatterns.DockerAntipatternTransMetricProvider when calling http://localhost:8182/analysis/metricproviders. However, I found the metric providers corresponding to the Docker dependencies and smells. I checked the configuration files and it seems to be similar.

I tried to check and do some modifications to the configuration files of the metric-provider and of the metric-platform but with no success.

Does anyone have any idea of what may be causing this behaviour.

tdegueul commented 4 years ago

I had a quick look without success. The platform indeed builds the project (see the logs), the resulting platform ZIP file contains the associated JAR too, and the feature.xml includes it. I have no idea :(

blueoly commented 4 years ago

@MarcioMateus this is strange because @ambpro told me that when he built the platform from source, he could find the metric provider http://localhost:8182/analysis/metricproviders.

ambpro commented 4 years ago

@blueoly

I did the metric-platform build from the command line using mvn clean install -DskipTests and I also couldn't find the org.eclipse.scava.metricprovider.trans.configuration.docker.antipatterns.DockerAntipatternTransMetricProvider when calling http://localhost:8182/analysis/metricproviders.

@MarcioMateus tested the metric-platform build manually using maven and tycho and he didn't check the code source using an IDE (as I did previously). Here you can find a screenshot of a docker anti-pattern metric from the http://localhost:8182/analysis/metricproviders API request docker-antipattern @MarcioMateus could you confirm that ?

MarcioMateus commented 4 years ago

@ambpro, yes I did the build without using Eclipse IDE. Only maven and tycho on the command line, and file modifications with with a file editor. http://localhost:8182/analysis/metricproviders didn't return the docker anti-pattern metric provider when running the binaries built (mac os X version).

creat89 commented 4 years ago

Hello @blueoly,

I think I know the reason because in the past I used see these issues. In the build.properties of org.eclipse.scava.metricprovider.trans.configuration.docker.antipatterns is not indicated that the bin should include the file plugin.xml. It should be just that.

creat89 commented 4 years ago

Commit https://github.com/crossminer/scava/commit/d9bcde31c6308fe33382f52f0edf1222edca25c0 should fix the error ;)

creat89 commented 4 years ago

BTW, not including the plugin.xml in the build.properties does not raise any error on Eclipse, but a warning. That's why it can go so easily unnoticed. As well, that's why in Eclipse it can run perfectly, but when you use the binaries the plug-in cannot be found.

MarcioMateus commented 4 years ago

Many thanks @creat89 !!! I confirm that this fix solved the issue on my side.

blueoly commented 4 years ago

Ok...... Many many many thanks @creat89 !

I close the issue.