`cml send-comment --update`: Raises 'commit_id has been locked' error
See original GitHub issueWhen calling cml send-comment --update
from a python script using subprocess.run
, the following error is being raised:
"HttpError: Validation Failed: {\"resource\":\"CommitComment\",\"code\":\"custom\",\"field\":\"commit_id\",\"message\":\"commit_id has been locked\"}
at /usr/lib/node_modules/@dvcorg/cml/node_modules/@octokit/request/dist-node/index.js:86:21
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Job.doExecute (/usr/lib/node_modules/@dvcorg/cml/node_modules/bottleneck/light.js:405:18)","status":422}
Without --update
, the error is not being raised.
Code:
import subprocess
for i in range(3):
with open("report.md", "w") as f:
f.write(f"## {i}")
subprocess.run(
["cml", "send-comment", "--update", "report.md"],
check=True
)
Example failure: https://github.com/iterative/test-cml-send-comment-pr/runs/5036525998?check_suite_focus=true#step:4:7
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
MobiLink Getting Started - Sybase Infocenter
You only want to update data that has changed. In a MobiLink application the upload is based on the transaction log and so...
Read more >Director. - GovInfo
A general and locality salary increase for Federal employees, ... Executive Order 12866 This action has been determined to be not ...
Read more >Oracle® Workflow
access this data because the item itself has not yet been committed, and because you may have lock contentions with the main session....
Read more >Cloud-ready messaging with Spring Integration: Taming ...
The problem, amongst others, is that XA transactions do not scale, ... if the message has been committed but the JVM crashes after...
Read more >Oracle Workflow API Reference - Stanford University
Oracle Applications form can update many tables at once. ... because the item itself has not yet been committed, and because you may...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://github.community/t/comment-api-does-not-describe-commit-id-has-been-locked/159853/2
Try using a personal access token instead of
GITHUB_TOKEN
For the record, adding a PAT token with
repo
&workflow
permissions has solved the issue.However, it feels a little cumbersome to do this “only” to enable
--update
, while “no-update” works with the default token