When Gitlab pipeline fails Grafana Infinity cannot read log file

I use infinity data source (yesoreyeram-infinity-datasource) to read a CSV file from Gitlab Artifacts and display the content as a table. When the pipeline passes, Grafana can read the CSV file but when the pipeline fails Grafana gives me the error message “error while performing the infinity query. unsuccessful HTTP response. 404 Not Found” even though I see the CSV file has been created in the Gitlab Artifacts. The path to the CSV file is:

XXXX”.

It seems that if I already have a CSV file from a successful pipeline run then Grafana reads that just fine even though there is a newer CSV file from a more recent run that failed. If there are no CSV files from a successful run then Grafana hangs and gives me the 404 error.

what do you get if you ran that same rest api query outside of grafana?

Hi Yosiasz,

Thanks for your response. I ran the following command from the linux directory which is a clone directory of the project using the following command. And honestly I don’t know if the command is correct the way it is.

GET -C myusername:mypwd -s https://gitlab-us-ltd.xxx.com/api/v4/projects/1134/jobs/artifacts/master/raw/sim/xvhdl_cxmixer_log.csv?job=compile-cxmixer

It doesn’t work and the response is:

GET: No match

I presume I am doing something wrong. Any help is appreciated.

Thanks,

same response here

Might want to close one of these two threads.

I don’t think the command line works. So I cannot rely on that. But the CSV file is there and Grafana can read it when the pipeline is successful. When it is not, the pipeline still generates the CSV log file in the Gitalab Artifacts but Grafana keeps reading the log file from the previous successful pipeline runs and if I delete all the log files from the successful runs then Grafana gives me the 404 error even though there is a log file from a pipeline that failed. Is there a way for me to tell Grafana to read the latest CSV file? Also the other tread is different. That one works but returns all the failed jobs regardless of the timeline I specify on the top right corner of the panel.

the command line is for testing purposes because infinity does the same exact thing
You get the below when you click on Query Inspector.

and then Refresh button