Before you report this, we’d appreciate if you can search this forum to see if this issue has already been reported.
If you have done so, please check this box.
on
Describe the Bug
Merry Christmas!
Weird things happen when I work on my .gitlab-ci.yml file in Cursor.
Problem 1:
The problems panel shows multiple items with unique IDs that seem to be reporting the same errors multiple times. See screenshot 1
Problem 2:
When I click on any single problem, I see this screenshot 2.
(Text: The editor could not be opened due to an unexpected error: Unable
to resolve resource composer-code-block-anysphere://fhqtaasjxa
Try Again)
Steps to Reproduce
I’m not sure it can be reproduced independently. It may be a quirk of my specific setup or be related to my gitlab ci file specifically.
Expected Behavior
Regarding problem 1:
I expect a single collection item in the problems panel, named after the file for which problems are being reported, not multiple collection items, reporting the same problems multiple times and with cryptic unique IDs that mean nothing.
Regarding problem 2:
Clicking any single problem in the problems pane should jump me to the line in the file that’s causing the problem, not show that error.
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
I checked something that came to mind after posting: this appears to be specifically a Cursor problem. When looking at the same file in other VS Code based editors, I don’t see this behavior.
Turns out this was an “AI” fail. No amount of prompting helped fix this issue. I tried Sonnet 3.5 (latest) and Flash 2.0 exp… no dice.
Fascinating, really. These models are supremely capable but YAML linting apparently is a benchmark.
I now have this line at the top of my gitlab-ci.yml:
Could be helpful if you run into pipeline validation issues: rebrand.ly/ki2yesx
To be fair, this appears to be a relatively obscure situation affecting gitlab-ci validation, not YAML in general.
I spent an inordinate amount of time searching the web for “auto-lint and auto-fix gitlab-ci.yml against a provided schema in JSON”, which, you’d think, should be a standard thing to do… turns out it’s very niche and hard to research. That shortened URL I linked to explains the problem I was having and even comes with a sub-optimal workaround solution. It’s what I’m going with for now.
Though I’ve solved my linting/validation issue with my gitlab-ci file, the issue that I reported here still remains.
This is a bug in Cursor. If you disagree, do explain.
This is definitely a problem with the composer as it creates short snippets of code which it seems like the Cursor is trying to lint as if it’s normal code in your codebase.
I’ve reported this internally so hopefully we’ll have a fix in the future.