cml: cml comment create error on GitLab

Please see the error logs below.

> $ cat reports/metrics.json >> report.md
> $ echo '![](reports/confusion_testing.png "Confusion Matrix")' >> report.md
> $ cml comment create report.md
> {"level":"error","message":"Not Found","stack":"Error: Not Found\n    at Gitlab.request (/usr/lib/node_modules/@dvcorg/cml/src/drivers/gitlab.js:553:13)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at async Gitlab.commitPrs (/usr/lib/node_modules/@dvcorg/cml/src/drivers/gitlab.js:105:17)\n    at async parseCommentTarget (/usr/lib/node_modules/@dvcorg/cml/src/commenttarget.js:39:25)\n    at async CML.commentCreate (/usr/lib/node_modules/@dvcorg/cml/src/cml.js:283:20)\n    at async Object.exports.handler (/usr/lib/node_modules/@dvcorg/cml/bin/cml/comment/create.js:11:15)"}
> Cleaning up file based variables
> 00:01
> ERROR: Job failed: exit code 1
> 


> $ cat reports/metrics.json >> report.md
> $ echo '![](reports/confusion_testing.png "Confusion Matrix")' >> report.md
> $ cml comment create --log=debug report.md
> {"level":"debug","message":"Gitlab API request, method: GET, url: \"https://gitlab-xxx.com/api/v4/version\""}
> {"level":"debug","message":"Gitlab API request, method: GET, url: \"https://gitlab-xxx.com/project/api/v4/version\""}
> {"level":"debug","message":"Response status is 404"}
> {"level":"debug","message":"Gitlab API request, method: GET, url: \"https://gitlab-xxx.com/api/v4/projects/project_repo/repository/commits/commit_num/merge_requests\""}
> {"level":"debug","message":"Response status is 404"}
> {"level":"debug","message":"Send analytics failed: Cannot read properties of undefined (reading 'startsWith')"}
> {"level":"error","message":"Not Found","stack":"Error: Not Found\n    at Gitlab.request (/usr/lib/node_modules/@dvcorg/cml/src/drivers/gitlab.js:553:13)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at async Gitlab.commitPrs (/usr/lib/node_modules/@dvcorg/cml/src/drivers/gitlab.js:105:17)\n    at async parseCommentTarget (/usr/lib/node_modules/@dvcorg/cml/src/commenttarget.js:39:25)\n    at async CML.commentCreate (/usr/lib/node_modules/@dvcorg/cml/src/cml.js:283:20)\n    at async Object.exports.handler (/usr/lib/node_modules/@dvcorg/cml/bin/cml/comment/create.js:11:15)"}
> Cleaning up file based variables
> 00:01
> ERROR: Job failed: exit code 1

The above is my debug log. Anyway, all the cml command are resulting in the same error. FYI, I am using custom built image with installed dvc and cml package. DVC is working fine but not cml part.

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Comments: 18 (13 by maintainers)

Most upvoted comments

Can you please run this and send us the output?

curl -v -H "Authorization: Bearer $REPO_TOKEN" https://$HOST/api/v4/projects/$PROJECT/repository/commits/$COMMIT_HASH/merge_requests/

I sent it via discord message sir, thanks.

Context: as per discord#cml/1069545494277279845, the API endpoint is working correctly.

$ curl -v -H "Authorization: Bearer [MASKED]" https://gitlab-aic.dynu.com/api/v4/version
{"version":"...","revision":"...", ..., "enterprise":true}