chaoss / grimoirelab-graal

A Generic Repository AnALyzer
GNU General Public License v3.0
21 stars 62 forks source link

[cocom] Request to Elasticsearch fails on grimoire_creation_date #84

Closed svdo closed 4 years ago

svdo commented 4 years ago

I'm running the cocom analysis, using grimoirelab/full-3p that I built myself from master (0.2.36 / c612e657fdd99e00c9389d0021612784eb1ec122), on a project from GitHub. When I open the cocom_study_project_wise_evolution_ccn_functions view, I get an error:

Error: Request to Elasticsearch failed: {"error":{"root_cause":[{"type":"query_shard_exception","reason":"No mapping found for [grimoire_creation_date] in order to sort on","index_uuid":"0qVhhLiPSN2JTIAQ72whWA","index":"cocom_chaoss_enrich"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"cocom_chaoss_enrich","node":"0sQ_NbQIRI-O8pt5Om2VIA","reason":{"type":"query_shard_exception","reason":"No mapping found for [grimoire_creation_date] in order to sort on","index_uuid":"0qVhhLiPSN2JTIAQ72whWA","index":"cocom_chaoss_enrich"}}]},"status":400}
KbnError@http://localhost:5601/bundles/commons.bundle.js?v=16428:56:25656
RequestFailure@http://localhost:5601/bundles/commons.bundle.js?v=16428:56:26448
http://localhost:5601/bundles/kibana.bundle.js?v=16428:61:655962
http://localhost:5601/bundles/commons.bundle.js?v=16428:56:19136
map@[native code]
http://localhost:5601/bundles/commons.bundle.js?v=16428:56:18480
processQueue@http://localhost:5601/bundles/commons.bundle.js?v=16428:35:132458
http://localhost:5601/bundles/commons.bundle.js?v=16428:35:133361
$digest@http://localhost:5601/bundles/commons.bundle.js?v=16428:35:144241
$apply@http://localhost:5601/bundles/commons.bundle.js?v=16428:35:147025
done@http://localhost:5601/bundles/commons.bundle.js?v=16428:35:100032
completeRequest@http://localhost:5601/bundles/commons.bundle.js?v=16428:35:104705
http://localhost:5601/bundles/commons.bundle.js?v=16428:35:105450

This is my projects json:

{
  "Fresco": {
    "git": ["https://github.com/philips-software/fresco-logistic-regression-2"],
    "github": ["https://github.com/philips-software/fresco-logistic-regression-2"],
    "colic": ["https://github.com/philips-software/fresco-logistic-regression-2"],
    "cocom": ["https://github.com/philips-software/fresco-logistic-regression-2"]
  }
}

This is the relevant part of my config:

[cocom]
raw_index = cocom_chaoss
enriched_index = cocom_chaoss_enrich
category = code_complexity_lizard_file
studies = [enrich_cocom_analysis]
branches = master
git-path = /tmp/git-cocom
worktree-path = /tmp/cocom/

[enrich_cocom_analysis]
out_index = cocom_chaoss_study
interval_months = [1]

[colic]
raw_index = colic_chaoss
enriched_index = colic_chaoss_enrich
category = code_license_nomos
studies = [enrich_colic_analysis]
exec-path = /usr/share/fossology/nomos/agent/nomossa
branches = master
git-path = /tmp/git-colic
worktree-path = /tmp/colic

[enrich_colic_analysis]
out_index = colic_chaoss_study
interval_months = [6]

Is this a bug? Am I doing something wrong? Thanks for your assistance!!

valeriocos commented 4 years ago

Hi @svdo,

A similar error message generally pops out when the index is empty. Do you remember the steps that produced this error? Thanks

svdo commented 4 years ago

Sorry @valeriocos, I don't remember. It could be that it was still building the indexes when I saw this. When I was seeing this, I didn't notice a pattern to when it would occur. I'm fine with closing this for now under the assumption that it was because the index was not yet filled. I'd reopen if I have more info. I'll leave it up to you how you want to handle this.

valeriocos commented 4 years ago

@svdo I have tried to reproduce this issue, but without success. The only difference is the param git-path = /tmp/git-colic which isn't needed anymore.

[cocom]
raw_index = cocom_chaoss
enriched_index = cocom_chaoss_enrich_xxx
category = code_complexity_lizard_file
studies = [enrich_cocom_analysis]
branches = master
worktree-path = /tmp/cocom/

[enrich_cocom_analysis]
out_index = cocom_chaoss_study_xxx
interval_months = [1]

Feel free to reopen the issue if needed